00001 // 00002 // CtrlBrowseFrame.h 00003 // 00004 // Copyright (c) Shareaza Development Team, 2002-2005. 00005 // This file is part of SHAREAZA (www.shareaza.com) 00006 // 00007 // Shareaza is free software; you can redistribute it 00008 // and/or modify it under the terms of the GNU General Public License 00009 // as published by the Free Software Foundation; either version 2 of 00010 // the License, or (at your option) any later version. 00011 // 00012 // Shareaza is distributed in the hope that it will be useful, 00013 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 // GNU General Public License for more details. 00016 // 00017 // You should have received a copy of the GNU General Public License 00018 // along with Shareaza; if not, write to the Free Software 00019 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00020 // 00021 00022 #pragma once 00023 00024 #include "CtrlCoolBar.h" 00025 #include "CtrlBrowseTree.h" 00026 #include "CtrlSearchDetailPanel.h" 00027 00028 class CMatchCtrl; 00029 class CG2Packet; 00030 class CQueryHit; 00031 class CBrowseTreeItem; 00032 00033 00034 class CBrowseFrameCtrl : public CWnd 00035 { 00036 // Construction 00037 public: 00038 CBrowseFrameCtrl(); 00039 virtual ~CBrowseFrameCtrl(); 00040 00041 DECLARE_DYNAMIC(CBrowseFrameCtrl) 00042 00043 // Attributes 00044 protected: 00045 CCoolBarCtrl m_wndTreeTop; 00046 CBrowseTreeCtrl m_wndTree; 00047 CSearchDetailPanel m_wndDetails; 00048 CMatchCtrl* m_wndList; 00049 BOOL m_bTreeVisible; 00050 int m_nTreeSize; 00051 BOOL m_bPanelEnable; 00052 BOOL m_bPanelVisible; 00053 int m_nPanelSize; 00054 CG2Packet* m_pTree[2]; 00055 int m_nTree; 00056 00057 // Operations 00058 public: 00059 virtual BOOL Create(CWnd* pParentWnd, CMatchCtrl* pMatch); 00060 void OnSkinChange(); 00061 void OnPhysicalTree(CG2Packet* pPacket); 00062 void OnVirtualTree(CG2Packet* pPacket); 00063 void OnSelChangeMatches(); 00064 protected: 00065 BOOL DoSizeTree(); 00066 BOOL DoSizePanel(); 00067 void SelectTree(CBrowseTreeItem* pItem, CQueryHit* pHit); 00068 00069 // Implementation 00070 protected: 00071 DECLARE_MESSAGE_MAP() 00072 afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); 00073 afx_msg void OnDestroy(); 00074 afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message); 00075 afx_msg void OnLButtonDown(UINT nFlags, CPoint point); 00076 afx_msg void OnSize(UINT nType, int cx, int cy); 00077 afx_msg void OnPaint(); 00078 afx_msg void OnUpdateSearchDetails(CCmdUI* pCmdUI); 00079 afx_msg void OnSearchDetails(); 00080 afx_msg void OnUpdateLibraryTreePhysical(CCmdUI *pCmdUI); 00081 afx_msg void OnLibraryTreePhysical(); 00082 afx_msg void OnUpdateLibraryTreeVirtual(CCmdUI *pCmdUI); 00083 afx_msg void OnLibraryTreeVirtual(); 00084 afx_msg void OnTreeSelection(NMHDR* pNotify, LRESULT* pResult); 00085 00086 }; 00087 00088 #define IDC_BROWSE_FRAME 110