FLImaging 6.5.8.1
GUIDialog.h
1#pragma once
2
3#include <vector>
4#include "GUIWndCtrlBase.h"
5#include "GUIEditCtrl.h"
6#include "GUILayoutBase.h"
7#include "GUIBoxLayout.h"
8#include "GUIGridLayout.h"
9
10#include "GUIButton.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"
17#include "GUISlider.h"
18#include "GUIDialogBase.h"
19
20
22namespace FLImaging
23{
25 namespace GUI
26 {
27 class CGUIButton;
28 class CGUIComboBox;
29 class CGUIEditCtrl;
30 class CGUIStaticText;
31 class CGUIPaneDialog;
32 class CGUIBoxLayout;
33 class CGUIGridLayout;
34 class CGUIListCtrlMassive;
35 class CGUIScrollWnd;
36 class CInternalDialog;
37
46 {
54
63 };
64
72 class FL_EXPORT CGUIDialog : public CGUIDialogBase
73 {
74 DECLARE_DYNAMIC(CGUIDialog)
75 friend class CGUILayoutBase;
76 friend class CGUIBoxLayout;
77 friend class CGUIGridLayout;
78 friend class CGUIPaneDialog;
79 friend class CGUIManagerViewImageObjectImageFigure;
80
81 public:
88 CGUIDialog(CWnd* pParent = nullptr); // 표준 생성자입니다.
89 CGUIDialog(UINT nIDTemplate, CWnd* pParent = NULL);
90 CGUIDialog(LPCTSTR lpszTemplateName, CWnd* pParentWnd = NULL);
91 CGUIDialog(const CGUIDialog& rhs);
92 virtual ~CGUIDialog();
93
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;
98
99 static CGUIDialog* CreateModelessDialog();
100
101 virtual void ShowCaption(bool bShow);
102 virtual bool IsCaptionVisible()const;
103
104 virtual void EnableScroll(bool bEnable, bool bIncludeButtons = true);
105 virtual bool IsScrollEnabled()const;
106
107 virtual void ShowOkButton(bool bShow);
108 virtual void ShowCancelButton(bool bShow);
109 virtual void ShowYesButton(bool bShow);
110 virtual void ShowNoButton(bool bShow);
111
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;
120
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;
129
130 virtual void SetIntervalSpacing(int32_t i32IntervalSpacing);
131 virtual int32_t GetIntervalSpacing() const;
132
133 virtual void SetTitleHeight(int32_t i32Height);
134 virtual int32_t GetTitleHeight()const;
135
136 virtual void SetOkButtonName(Base::CFLString<wchar_t> strOkBtnName);
137 virtual void SetCancelButtonName(Base::CFLString<wchar_t> strCancelBtnName);
138 virtual void SetYesButtonName(Base::CFLString<wchar_t> strYesBtnName);
139 virtual void SetNoButtonName(Base::CFLString<wchar_t> strNoBtnName);
140
141 virtual bool AdjustLayout();
142 virtual bool SetTitle(const Base::CFLString<wchar_t>& strTitle);
143 virtual Base::CFLString<wchar_t> GetTitle() const;
144
145 virtual void UpdateTheme();
146 virtual void SetWindowSize(int32_t i32Width, int32_t i32Height);
147
148 // 대화 상자 데이터입니다.
149 #ifdef AFX_DESIGN_TIME
150 enum
151 {
152 IDD = IDD_DIALOG_CUSTOM
153 };
154 #endif
155 DECLARE_MESSAGE_MAP()
156 public:
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;
164
165 virtual INT_PTR DoModal()override;
166
167 protected:
168 virtual BOOL PreTranslateMessage(MSG* pMsg);
169 virtual void OnOK();
170 virtual void OnCancel();
171 virtual void OnYes();
172 virtual void OnNo();
173 virtual void DrawBorder(CDC* pDC);
174 virtual void DrawCloseButton(CDC* pDC);
175
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);
180
181 DeclareGetClassType();
182
183 public:
184 CPoint m_pointPrev;
185
186 int32_t m_i32MinWidth;
187 int32_t m_i32MinHeight;
188
189 int32_t m_i32WndW;
190 int32_t m_i32WndH;
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;
199
200 int32_t m_i32RowCnt;
201 int32_t m_i32ColCnt;
202 int32_t m_i32WndCtrlCnt;
203 int32_t m_i32BtnCnt;
204
205 int32_t m_i32TitleHeight;
206 bool m_bShowWindowOnAdjustLayout;
207
208 protected:
209 CInternalDialog* m_pInternal;
210
211 CRect m_rc;
212 CRect m_rcTop;
213 CRect m_rcBottom;
214 CRect m_rcLeft;
215 CRect m_rcRight;
216
217 CDC m_memDC;
218 CBitmap* m_pBmpOld;
219 CBitmap* m_pBmp;
220 bool m_bLButtonDown;
221 bool m_bLockWindowUpdate;
222
223 CRect m_rcCloseBtn;
224 CRect m_rcCaption;
225
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;
233 std::vector<CGUIListCtrlMassive*>& m_vctListCtrlMassive;
234
235 CBrush m_brBrush;
236 Base::CFLString<wchar_t> m_strTitle;
237
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;
242
243 CGUIScrollWnd* m_pScrollWnd;
244 CGUIButton* m_pBtnOK;
245 CGUIButton* m_pBtnCancel;
246 CGUIButton* m_pBtnYes;
247 CGUIButton* m_pBtnNo;
248
249 CGUIDialogLayoutElement* m_pWndCtrlOK;
250 CGUIDialogLayoutElement* m_pWndCtrlCancel;
251 CGUIDialogLayoutElement* m_pWndCtrlYes;
252 CGUIDialogLayoutElement* m_pWndCtrlNo;
253 CGUIPaneDialog* m_pParentPaneDialog;
254
255 bool m_bModeless;
256 bool m_bEnableScroll;
257 bool m_bScrollWndIncludeButtons;
258 bool m_bCreated;
259 bool m_bCenterWindowDone;
260 bool m_bShowCaption;
261 bool m_bShowOkBtn;
262 bool m_bShowCancelBtn;
263 bool m_bShowYesBtn;
264 bool m_bShowNoBtn;
265 bool m_bEnableOkBtn;
266 bool m_bEnableCancelBtn;
267 bool m_bEnableYesBtn;
268 bool m_bEnableNoBtn;
269 bool m_bInitBlock;
270 bool m_bIsResizable;
271 bool m_bAlreadyInsideProcedure;
272
273 EOrientation m_eOrientation;
274
275 CGUILayoutBase* m_pFocusLayout;
276 CWnd* m_pFocusWnd;
277 int32_t m_i32FocusIdx;
278 int32_t m_i32FocusIdxRow;
279 int32_t m_i32FocusIdxCol;
280
281 public:
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);
294};
295 }
296}
Template type 의 문자열 클래스
Definition INIUtilities.h:20
버튼 클래스
Definition GUIButton.h:31
다이얼로그 클래스
Definition GUIDialog.h:73
CGUIDialog(CWnd *pParent=nullptr)
기본 생성자
저장할 데이터가 매우 많은 경우의 리스트 컨트롤 클래스
Definition GUIListCtrlMassive.h:37
EOrientation
방향
Definition GUIDefinitions.h:5467
ELayout
다이얼로그의 레이아웃
Definition GUIDialog.h:46
@ BoxLayout
박스 레이아웃
Definition GUIDialog.h:62
@ GridLayout
격자 레이아웃
Definition GUIDialog.h:53