Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

CtrlLibraryFrame.h

Go to the documentation of this file.
00001 //
00002 // CtrlLibraryFrame.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 #if !defined(AFX_CTRLLIBRARYFRAME_H__C39BE20E_4746_4FA8_B96D_B94ADC1F4ABA__INCLUDED_)
00023 #define AFX_CTRLLIBRARYFRAME_H__C39BE20E_4746_4FA8_B96D_B94ADC1F4ABA__INCLUDED_
00024 
00025 #pragma once
00026 
00027 #include "CtrlCoolBar.h"
00028 #include "CtrlLibraryTreeView.h"
00029 #include "CtrlLibraryHeaderBar.h"
00030 #include "CtrlLibraryHeaderPanel.h"
00031 #include "CtrlLibraryTip.h"
00032 #include "CtrlSchemaCombo.h"
00033 
00034 class CLibraryView;
00035 class CLibraryPanel;
00036 
00037 
00038 class CLibraryFrame : public CWnd
00039 {
00040 // Construction
00041 public:
00042         CLibraryFrame();
00043         virtual ~CLibraryFrame();
00044 
00045         DECLARE_DYNAMIC(CLibraryFrame)
00046 
00047 // Operations
00048 public:
00049         void    OnSkinChange();
00050         BOOL    Update(BOOL bForce = TRUE, BOOL bBestView = TRUE);
00051         BOOL    Display(CLibraryFolder* pFolder);
00052         BOOL    Display(CAlbumFolder* pFolder);
00053         BOOL    Display(CLibraryFile* pFile);
00054         BOOL    Select(DWORD nObject);
00055         void    DragObjects(CLibraryList* pList, CImageList* pImage, const CPoint& ptMouse);
00056 public:
00057         CLibraryTreeItem*       GetFolderSelection() const;
00058         CLibraryList*           GetViewSelection() const;
00059 
00060 // Data
00061 public:
00062         CLibraryTreeView        m_wndTree;
00063         CLibraryHeaderPanel     m_wndHeader;
00064         CCoolBarCtrl            m_wndTreeTop;
00065         CCoolBarCtrl            m_wndTreeBottom;
00066         CSchemaCombo            m_wndTreeTypes;
00067         CLibraryHeaderBar       m_wndViewTop;
00068         CCoolBarCtrl            m_wndViewBottom;
00069         CLibraryTipCtrl         m_wndViewTip;
00070         CEdit                           m_wndSearch;
00071 protected:
00072         CPtrList                        m_pViews;
00073         CLibraryView*           m_pView;
00074         CPtrList                        m_pPanels;
00075         CLibraryPanel*          m_pPanel;
00076 protected:
00077         int                                     m_nTreeSize;
00078         int                                     m_nPanelSize;
00079         BOOL                            m_bPanelShow;
00080         int                                     m_nHeaderSize;
00081         int                                     m_nTreeTypesHeight;
00082 protected:
00083         BOOL                            m_bUpdating;
00084         DWORD                           m_nLibraryCookie;
00085         DWORD                           m_nFolderCookie;
00086         CLibraryTreeItem*       m_pFolderSelection;
00087         CLibraryList*           m_pViewSelection;
00088         BOOL                            m_bViewSelection;
00089         CLibraryList            m_pViewEmpty;
00090         CLibraryList*           m_pDragList;
00091         CImageList*                     m_pDragImage;
00092         HCURSOR                         m_hCursMove;
00093         HCURSOR                         m_hCursCopy;
00094 
00095 // Implementation
00096 protected:
00097         BOOL            DoSizeTree();
00098         BOOL            DoSizePanel();
00099         void            UpdatePanel(BOOL bForce);
00100         void            SetView(CLibraryView* pView, BOOL bUpdate = TRUE, BOOL bUser = TRUE);
00101         void            SetPanel(CLibraryPanel* pPanel);
00102         void            CancelDrag();
00103         void            RunLocalSearch(CQuerySearch* pSearch);
00104 
00105 // Overrides
00106 public:
00107         //{{AFX_VIRTUAL(CLibraryFrame)
00108         public:
00109         virtual BOOL Create(CWnd* pParentWnd);
00110         virtual BOOL OnCmdMsg(UINT nID, int nCode, void* pExtra, AFX_CMDHANDLERINFO* pHandlerInfo);
00111         //}}AFX_VIRTUAL
00112 
00113 // Implementation
00114 public:
00115         virtual BOOL PreTranslateMessage(MSG* pMsg);
00116 protected:
00117     DECLARE_MESSAGE_MAP()
00118         afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00119         afx_msg void OnDestroy();
00120         afx_msg void OnSize(UINT nType, int cx, int cy);
00121         afx_msg void OnPaint();
00122         afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
00123         afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
00124         afx_msg BOOL OnMouseWheel(UINT nFlags, short zDelta, CPoint pt);
00125         afx_msg void OnLibraryRefresh();
00126         afx_msg void OnUpdateLibraryTreePhysical(CCmdUI* pCmdUI);
00127         afx_msg void OnLibraryTreePhysical();
00128         afx_msg void OnUpdateLibraryTreeVirtual(CCmdUI* pCmdUI);
00129         afx_msg void OnLibraryTreeVirtual();
00130         afx_msg void OnMouseMove(UINT nFlags, CPoint point);
00131         afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
00132         afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
00133         afx_msg void OnTimer(UINT nIDEvent);
00134         afx_msg void OnUpdateLibraryPanel(CCmdUI* pCmdUI);
00135         afx_msg void OnLibraryPanel();
00136         afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
00137         afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
00138         afx_msg void OnKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags);
00139         afx_msg void OnLibrarySearch();
00140         afx_msg void OnMeasureItem(int nIDCtl, LPMEASUREITEMSTRUCT lpMeasureItemStruct);
00141         afx_msg void OnLibrarySearchQuick();
00142         afx_msg void OnTreeSelection(NMHDR* pNotify, LRESULT* pResult);
00143         afx_msg void OnViewSelection();
00144         afx_msg void OnFilterTypes();
00145         afx_msg void OnToolbarReturn();
00146         afx_msg void OnToolbarEscape();
00147         afx_msg void OnSetFocus(CWnd* pOldWnd);
00148 
00149         friend class CLibraryHeaderBar;
00150         friend class CLibraryHeaderPanel;
00151         friend class CLibraryView;
00152 };
00153 
00154 //{{AFX_INSERT_LOCATION}}
00155 
00156 #define IDC_LIBRARY_FRAME       130
00157 #define IDC_SEARCH_BOX          108
00158 
00159 #endif // !defined(AFX_CTRLLIBRARYFRAME_H__C39BE20E_4746_4FA8_B96D_B94ADC1F4ABA__INCLUDED_)

Generated on Thu Dec 15 10:39:36 2005 for Shareaza 2.2.1.0 by  doxygen 1.4.2