00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
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
00041 public:
00042 CLibraryFrame();
00043 virtual ~CLibraryFrame();
00044
00045 DECLARE_DYNAMIC(CLibraryFrame)
00046
00047
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
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
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
00106 public:
00107
00108 public:
00109 virtual BOOL Create(CWnd* pParentWnd);
00110 virtual BOOL OnCmdMsg(UINT nID, int nCode, void* pExtra, AFX_CMDHANDLERINFO* pHandlerInfo);
00111
00112
00113
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
00155
00156 #define IDC_LIBRARY_FRAME 130
00157 #define IDC_SEARCH_BOX 108
00158
00159 #endif