4#include "GUIWndCtrlBase.h"
5#include "GUIEditCtrl.h"
6#include "GUILayoutBase.h"
7#include "GUIBoxLayout.h"
8#include "GUIGridLayout.h"
11#include "GUIComboBox.h"
12#include "GUIComboBox.h"
13#include "GUICheckBox.h"
14#include "GUIStaticText.h"
15#include "GUIListCtrl.h"
16#include "GUIListCtrlMassive.h"
18#include "GUIDialogBase.h"
34 class CGUIListCtrlMassive;
36 class CInternalDialog;
75 friend class CGUILayoutBase;
76 friend class CGUIBoxLayout;
77 friend class CGUIGridLayout;
78 friend class CGUIPaneDialog;
79 friend class CGUIManagerViewImageObjectImageFigure;
89 CGUIDialog(UINT nIDTemplate, CWnd* pParent = NULL);
90 CGUIDialog(LPCTSTR lpszTemplateName, CWnd* pParentWnd = NULL);
94 virtual BOOL Create(LPCTSTR lpszTemplateName, CWnd* pParentWnd = NULL)
override;
95 virtual BOOL Create(UINT nIDTemplate, CWnd* pParentWnd = NULL)
override;
96 virtual BOOL CreateIndirect(LPCDLGTEMPLATE lpDialogTemplate, CWnd* pParentWnd = NULL,
void* lpDialogInit = NULL)
override;
97 virtual BOOL CreateIndirect(HGLOBAL hDialogTemplate, CWnd* pParentWnd = NULL)
override;
101 virtual void ShowCaption(
bool bShow);
102 virtual bool IsCaptionVisible()
const;
104 virtual void EnableScroll(
bool bEnable,
bool bIncludeButtons =
true);
105 virtual bool IsScrollEnabled()
const;
107 virtual void ShowOkButton(
bool bShow);
108 virtual void ShowCancelButton(
bool bShow);
109 virtual void ShowYesButton(
bool bShow);
110 virtual void ShowNoButton(
bool bShow);
112 virtual void EnableOkButton(
bool bEnable);
113 virtual bool IsOkButtonEnabled()
const;
114 virtual void EnableCancelButton(
bool bEnable);
115 virtual bool IsCancelButtonEnabled()
const;
116 virtual void EnableYesButton(
bool bEnable);
117 virtual bool IsYesButtonEnabled()
const;
118 virtual void EnableNoButton(
bool bEnable);
119 virtual bool IsNoButtonEnabled()
const;
121 virtual void SetMarginLeft(int32_t i32Margin);
122 virtual int32_t GetMarginLeft()
const;
123 virtual void SetMarginTop(int32_t i32Margin);
124 virtual int32_t GetMarginTop()
const;
125 virtual void SetMarginRight(int32_t i32Margin);
126 virtual int32_t GetMarginRight()
const;
127 virtual void SetMarginBottom(int32_t i32Margin);
128 virtual int32_t GetMarginBottom()
const;
130 virtual void SetIntervalSpacing(int32_t i32IntervalSpacing);
131 virtual int32_t GetIntervalSpacing()
const;
133 virtual void SetTitleHeight(int32_t i32Height);
134 virtual int32_t GetTitleHeight()
const;
141 virtual bool AdjustLayout();
145 virtual void UpdateTheme();
146 virtual void SetWindowSize(int32_t i32Width, int32_t i32Height);
149 #ifdef AFX_DESIGN_TIME
152 IDD = IDD_DIALOG_CUSTOM
155 DECLARE_MESSAGE_MAP()
157 virtual
void PostNcDestroy();
158 virtual int32_t Add(CGUILayoutBase* pLayout);
159 virtual CGUILayoutBase* GetAt(int32_t i32Index);
160 virtual BOOL OnInitDialog() override;
161 virtual
bool SetFocusWnd(CGUIGridLayout* pLayout, int32_t i32Row, int32_t i32Col);
162 virtual
bool SetFocusWnd(CGUIBoxLayout* pLayout, int32_t i32Idx);
163 virtual
void OnReceiveBroadcast(const Base::CBroadcastMessage* pMessage) override;
165 virtual INT_PTR DoModal()override;
168 virtual BOOL PreTranslateMessage(MSG* pMsg);
170 virtual
void OnCancel();
171 virtual
void OnYes();
173 virtual
void DrawBorder(CDC* pDC);
174 virtual
void DrawCloseButton(CDC* pDC);
176 virtual BOOL OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult);
177 virtual
bool CreateButton();
178 virtual
bool AdjustLayoutButton(int32_t i32BtnW, int32_t i32BtnH, int32_t i32BtnMargin, int32_t i32BtnSpace, int32_t i32BtnTop);
179 virtual BOOL HitTestGrip(MSG* pMsg);
181 DeclareGetClassType();
186 int32_t m_i32MinWidth;
187 int32_t m_i32MinHeight;
191 int32_t m_i32WndowWidthUserDefined;
192 int32_t m_i32WndowHeightUserDefined;
193 int32_t m_i32ContentsW;
194 int32_t m_i32ContentsH;
195 int32_t m_i32MarginL;
196 int32_t m_i32MarginT;
197 int32_t m_i32MarginR;
198 int32_t m_i32MarginB;
202 int32_t m_i32WndCtrlCnt;
205 int32_t m_i32TitleHeight;
206 bool m_bShowWindowOnAdjustLayout;
209 CInternalDialog* m_pInternal;
221 bool m_bLockWindowUpdate;
226 int32_t m_i32IntervalSpacing;
227 int32_t m_i32HoveringBtn;
228 int32_t m_i32HoveringBtnBf;
229 COLORREF m_clrBorder;
230 COLORREF m_clrClientFill;
231 std::vector<CGUILayoutBase*>& m_vctLayout;
232 std::vector<CGUIDialogLayoutElement*>& m_vctInputWnd;
236 Base::CFLString<
wchar_t> m_strTitle;
238 Base::CFLString<
wchar_t> m_strOkBtnName;
239 Base::CFLString<
wchar_t> m_strCancelBtnName;
240 Base::CFLString<
wchar_t> m_strYesBtnName;
241 Base::CFLString<
wchar_t> m_strNoBtnName;
243 CGUIScrollWnd* m_pScrollWnd;
249 CGUIDialogLayoutElement* m_pWndCtrlOK;
250 CGUIDialogLayoutElement* m_pWndCtrlCancel;
251 CGUIDialogLayoutElement* m_pWndCtrlYes;
252 CGUIDialogLayoutElement* m_pWndCtrlNo;
253 CGUIPaneDialog* m_pParentPaneDialog;
256 bool m_bEnableScroll;
257 bool m_bScrollWndIncludeButtons;
259 bool m_bCenterWindowDone;
262 bool m_bShowCancelBtn;
266 bool m_bEnableCancelBtn;
267 bool m_bEnableYesBtn;
271 bool m_bAlreadyInsideProcedure;
275 CGUILayoutBase* m_pFocusLayout;
277 int32_t m_i32FocusIdx;
278 int32_t m_i32FocusIdxRow;
279 int32_t m_i32FocusIdxCol;
282 afx_msg BOOL OnEraseBkgnd(CDC* pDC);
283 afx_msg
void OnPaint();
284 afx_msg
void OnNcPaint();
285 afx_msg
void OnMouseMove(UINT nFlags, CPoint point);
286 afx_msg
void OnLButtonDown(UINT nFlags, CPoint point);
287 afx_msg
void OnLButtonUp(UINT nFlags, CPoint point);
288 afx_msg
void OnSetFocus(CWnd* pOldWnd);
289 afx_msg
void OnKillFocus(CWnd* pNewWnd);
290 afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
291 afx_msg
void OnDestroy();
292 afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
293 afx_msg
void OnSize(UINT nType,
int cx,
int cy);
Template type string class.
Definition INIUtilities.h:20
A file of dialog class.
Definition GUIDialog.h:73
CGUIDialog(CWnd *pParent=nullptr)
Default constructor.
ListControl classes in very many data to store.
Definition GUIListCtrlMassive.h:37
EOrientation
Direction.
Definition GUIDefinitions.h:5467
ELayout
A layout of dialog.
Definition GUIDialog.h:46
@ BoxLayout
Box layout.
Definition GUIDialog.h:62
@ GridLayout
Grid layout.
Definition GUIDialog.h:53