4#include "GUIWndCtrlBase.h"
5#include "GUIStyledCtrlBase.h"
15 class FL_EXPORT CGUIViewToolBar :
public CMFCToolBar,
public CGUIWndCtrlBase,
public CGUIStyledCtrlBase
17 friend class CGUIChildFrameBase;
18 friend class CGUIViewImageBase;
22 CGUIViewToolBar(
const CGUIViewToolBar& rh);
23 virtual ~CGUIViewToolBar();
26 virtual void MakeToolBarBehaveLikeTitleBar(
bool bToolBarBehaveLikeTitleBar, UINT nCloseBtnID, UINT nMaximizeBtnID, UINT nMinimizeBtnID, UINT nRestoreBtnID);
27 virtual bool BehaveLikeTitleBar();
28 virtual void OnFillBackground(CDC* pDC);
29 virtual void SetText(Base::CFLString<wchar_t> strText);
31 virtual void SetCloseButtonID(UINT nID);
32 virtual void SetMaximizeButtonID(UINT nID);
33 virtual void SetMinimizeButtonID(UINT nID);
34 virtual void UpdateTheme();
36 virtual void SetToolBarMinWidth(int32_t i32Minwidth);
37 virtual int32_t GetToolBarMinWidth();
39 virtual void SetTitleRectMinWidth(int32_t i32Minwidth);
40 virtual int32_t GetTitleRectMinWidth();
42 virtual void SetLeftItemMinPosX(int32_t i32Min);
43 virtual int32_t GetLeftItemMinPosX();
45 virtual void SetButtonWidth(int32_t i32Width);
46 virtual int32_t GetButtonWidth();
48 virtual void SetDrawEllipsisDropdown(
bool bDraw);
49 virtual bool IsDrawEllipsisDropdown();
51 CRect GetTitleBarRect();
52 void SetTitleBarRect(CRect rtTitleBar);
55 void SetParentView(CGUIViewImageBase* pView);
56 CGUIViewImageBase* GetParentView();
58 CWnd* GetMovableParent();
60 void UpdateTitleBarRect();
62 virtual const CResult UpdateStyle();
67 virtual void UpdatePosition();
69 virtual CMFCToolBarButton* GetCloseButton();
70 virtual CMFCToolBarButton* GetMaximizeButton();
71 virtual CMFCToolBarButton* GetRestoreButton();
72 virtual CMFCToolBarButton* GetMinimizeButton();
75 virtual int HitTest(CPoint point)
override;
76 Base::CFLString<wchar_t> m_strTitle;
83 bool m_bLButtonDblClk;
85 CRect m_rtEllipsisDropdown;
87 int32_t m_i32ButtonWidth;
88 int32_t m_i32SeparatorWidth;
89 int32_t m_i32ButtonHeight;
90 int32_t m_i32MinWidth;
91 int32_t m_i32ItemWidthLeft;
92 int32_t m_i32LeftItemMinPosX;
93 int32_t m_i32TitleBarMinWidth;
94 int32_t m_i32ItemWidthRight;
95 int32_t m_i32ItemCountRight;
96 int32_t m_i32ItemCount;
97 int32_t m_i32LeftStartPos;
98 std::vector<int32_t>& m_vctStartPos;
100 int32_t m_iHitButton;
102 UINT m_nCloseButtonID;
103 UINT m_nMaximizeButtonID;
104 UINT m_nRestoreButtonID;
105 UINT m_nMinimizeButtonID;
106 UINT m_nCloseButtonIndex;
107 UINT m_nMaximizeButtonIndex;
108 UINT m_nRestoreButtonIndex;
109 UINT m_nMinimizeButtonIndex;
114 bool m_bFixedParentView;
117 CPoint m_ptPrevMouse;
118 double m_f64MoveThreshold;
119 double m_f64MoveDistance;
121 CGUIViewImageBase* m_pParentView;
123 bool m_bSyncWindowTitle;
124 bool m_bToolBarBehaveLikeTitleBar;
125 bool m_bDrawEllipsisDropdown;
129 CRect m_crPrevWindow;
130 bool m_bMouseDragMaximize;
132 Base::CPerformanceCounter m_pcLastUpdateCounter;
133 volatile bool m_bUpdateAvailable;
134 volatile bool m_bUpdateBlocked;
135 volatile bool m_bRemainingUpdateThread;
136 HANDLE m_hThreadRemainingUpdate;
138 bool m_bWindowSizeUpdated;
140 virtual void JudgeUpdateAvailable();
141 virtual bool IsUpdateAvailable();
142 static unsigned __stdcall InternalThreadRemainingUpdate(
void* pParam);
143 void InitializeThreadRemainingUpdate();
144 void TerminateThreadRemainingUpdate();
147 void DoPaint(CDC* pDCPaint);
148 BOOL DrawButton(CDC* pDC, CMFCToolBarButton* pButton, CMFCToolBarImages* pImages, BOOL bHighlighted, BOOL bDrawDisabledImages);
151 DECLARE_MESSAGE_MAP()
152 afx_msg
int OnCreate(LPCREATESTRUCT lpCreateStruct);
153 afx_msg BOOL OnEraseBkgnd(CDC* pDC);
154 afx_msg
void OnLButtonDown(UINT nFlags, CPoint point);
155 afx_msg
void OnLButtonUp(UINT nFlags, CPoint point);
156 afx_msg
void OnMouseMove(UINT nFlags, CPoint point);
157 afx_msg
void OnKillFocus(CWnd* pNewWnd);
158 afx_msg
void OnLButtonDblClk(UINT nFlags, CPoint point);
159 afx_msg
void OnRButtonDown(UINT nFlags, CPoint point);
160 afx_msg
void OnMButtonDown(UINT nFlags, CPoint point);
161 afx_msg
void OnNcPaint();
162 afx_msg
void OnSize(UINT nType,
int cx,
int cy);
163 afx_msg
void OnDestroy();
165 friend class CGUIManagerView;
166 friend class CGUIViewGraph;
Manager class responsible for the creation, destruction, and overall management of all GUI view insta...
Definition GUIManagerView.h:58
A class of view base.
Definition GUIViewImageBase.h:44
Definition D2DObject.h:12