Navbar.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. 
  2. #pragma once
  3. #include "ViewTree.h"
  4. #include "DrawerCtrl.h"
  5. #include "NavListCtrl.h"
  6. class CNavToolBar : public CMFCToolBar
  7. {
  8. virtual void OnUpdateCmdUI(CFrameWnd* /*pTarget*/, BOOL bDisableIfNoHndler)
  9. {
  10. CMFCToolBar::OnUpdateCmdUI((CFrameWnd*)GetOwner(), bDisableIfNoHndler);
  11. }
  12. virtual BOOL AllowShowOnList() const { return FALSE; }
  13. };
  14. class CNavbar : public CDockablePane
  15. {
  16. public:
  17. CNavbar() noexcept;
  18. virtual ~CNavbar();
  19. void AdjustLayout();
  20. void OnChangeVisualStyle();
  21. protected:
  22. CNavToolBar m_wndToolBar;
  23. CViewTree m_wndClassView;
  24. CImageList m_ClassViewImages;
  25. UINT m_nCurrSort;
  26. #if 1
  27. CImageList m_listImage;
  28. CDrawerCtrl m_DrawerCtrl;
  29. CNavListCtrl m_NavQuarter;
  30. CNavListCtrl m_NavOthers;
  31. void InitNavCtrl();
  32. #endif
  33. // 重写
  34. public:
  35. virtual BOOL PreTranslateMessage(MSG* pMsg);
  36. protected:
  37. afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  38. afx_msg void OnSize(UINT nType, int cx, int cy);
  39. afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
  40. afx_msg void OnClassAddMemberFunction();
  41. afx_msg void OnClassAddMemberVariable();
  42. afx_msg void OnClassDefinition();
  43. afx_msg void OnClassProperties();
  44. afx_msg void OnNewFolder();
  45. afx_msg void OnPaint();
  46. afx_msg void OnSetFocus(CWnd* pOldWnd);
  47. afx_msg LRESULT OnChangeActiveTab(WPARAM, LPARAM);
  48. afx_msg void OnSort(UINT id);
  49. afx_msg void OnUpdateSort(CCmdUI* pCmdUI);
  50. DECLARE_MESSAGE_MAP()
  51. public:
  52. afx_msg BOOL OnEraseBkgnd(CDC* pDC);
  53. };