FLImaging 6.11.5.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 "GUICheckBox.h"
13#include "GUIStaticText.h"
14#include "GUIListCtrl.h"
15#include "GUIListCtrlMassive.h"
16#include "GUISlider.h"
17#include "GUIDialogBase.h"
18
19
21namespace FLImaging
22{
24 namespace GUI
25 {
26 class CGUIButton;
27 class CGUIComboBox;
28 class CGUIEditCtrl;
29 class CGUIStaticText;
30 class CGUIPaneDialog;
31 class CGUIBoxLayout;
32 class CGUIGridLayout;
34 class CGUIScrollWnd;
35 class CInternalDialog;
36
45 {
53
62 };
63
71 class FL_EXPORT CGUIDialog : public CGUIDialogBase
72 {
73 DECLARE_DYNAMIC(CGUIDialog)
74 friend class CGUILayoutBase;
75 friend class CGUIBoxLayout;
76 friend class CGUIGridLayout;
77 friend class CGUIPaneDialog;
78 friend class CGUIManagerViewImageObjectImageFigure;
79
80 public:
87 CGUIDialog(CWnd* pParent = nullptr); // 표준 생성자입니다.
88 CGUIDialog(UINT nIDTemplate, CWnd* pParent = NULL);
89 CGUIDialog(LPCTSTR lpszTemplateName, CWnd* pParentWnd = NULL);
90 CGUIDialog(const CGUIDialog& rhs);
91 virtual ~CGUIDialog();
92
93 virtual BOOL Create(LPCTSTR lpszTemplateName, CWnd* pParentWnd = NULL)override;
94 virtual BOOL Create(UINT nIDTemplate, CWnd* pParentWnd = NULL)override;
95 virtual BOOL CreateIndirect(LPCDLGTEMPLATE lpDialogTemplate, CWnd* pParentWnd = NULL, void* lpDialogInit = NULL)override;
96 virtual BOOL CreateIndirect(HGLOBAL hDialogTemplate, CWnd* pParentWnd = NULL)override;
97
98 static CGUIDialog* CreateModelessDialog();
99
100 virtual void ShowCaption(bool bShow);
101 virtual bool IsCaptionVisible()const;
102
103 virtual void EnableScroll(bool bEnable, bool bIncludeButtons = true);
104 virtual bool IsScrollEnabled()const;
105
106 virtual void ShowOkButton(bool bShow);
107 virtual void ShowCancelButton(bool bShow);
108 virtual void ShowYesButton(bool bShow);
109 virtual void ShowNoButton(bool bShow);
110
111 virtual void EnableOkButton(bool bEnable);
112 virtual bool IsOkButtonEnabled()const;
113 virtual void EnableCancelButton(bool bEnable);
114 virtual bool IsCancelButtonEnabled()const;
115 virtual void EnableYesButton(bool bEnable);
116 virtual bool IsYesButtonEnabled()const;
117 virtual void EnableNoButton(bool bEnable);
118 virtual bool IsNoButtonEnabled()const;
119
120 virtual void SetMarginLeft(int32_t i32Margin);
121 virtual int32_t GetMarginLeft()const;
122 virtual void SetMarginTop(int32_t i32Margin);
123 virtual int32_t GetMarginTop()const;
124 virtual void SetMarginRight(int32_t i32Margin);
125 virtual int32_t GetMarginRight()const;
126 virtual void SetMarginBottom(int32_t i32Margin);
127 virtual int32_t GetMarginBottom()const;
128
129 virtual void SetIntervalSpacing(int32_t i32IntervalSpacing);
130 virtual int32_t GetIntervalSpacing() const;
131
132 virtual void SetTitleHeight(int32_t i32Height);
133 virtual int32_t GetTitleHeight()const;
134
135 virtual void SetOkButtonName(Base::CFLString<wchar_t> strOkBtnName);
136 virtual void SetCancelButtonName(Base::CFLString<wchar_t> strCancelBtnName);
137 virtual void SetYesButtonName(Base::CFLString<wchar_t> strYesBtnName);
138 virtual void SetNoButtonName(Base::CFLString<wchar_t> strNoBtnName);
139
140 virtual bool AdjustLayout();
141 virtual bool SetTitle(const Base::CFLString<wchar_t>& strTitle);
142 virtual Base::CFLString<wchar_t> GetTitle() const;
143
144 virtual void UpdateTheme();
145 virtual void SetWindowSize(int32_t i32Width, int32_t i32Height);
146
147 // 대화 상자 데이터입니다.
148 #ifdef AFX_DESIGN_TIME
149 enum
150 {
151 IDD = IDD_DIALOG_CUSTOM
152 };
153 #endif
154 DECLARE_MESSAGE_MAP()
155 public:
156 virtual void PostNcDestroy();
157 virtual int32_t Add(CGUILayoutBase* pLayout);
158 virtual CGUILayoutBase* GetAt(int32_t i32Index);
159 virtual BOOL OnInitDialog() override;
160 virtual bool SetFocusWnd(CGUIGridLayout* pLayout, int32_t i32Row, int32_t i32Col);
161 virtual bool SetFocusWnd(CGUIBoxLayout* pLayout, int32_t i32Idx);
162 virtual void OnReceiveBroadcast(const Base::CBroadcastMessage* pMessage) override;
163
164 virtual INT_PTR DoModal()override;
165
166 protected:
167 virtual void InitDefaults(); // Initialize member variables
168
169 protected:
170 virtual BOOL PreTranslateMessage(MSG* pMsg);
171 virtual void OnOK();
172 virtual void OnCancel();
173 virtual void OnYes();
174 virtual void OnNo();
175 virtual void DrawBorder(CDC* pDC);
176 virtual void DrawCloseButton(CDC* pDC);
177 virtual void DrawTitleRect(CDC* pDC);
178
179 virtual BOOL OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult);
180 virtual bool CreateButton();
181 virtual bool AdjustLayoutButton(int32_t i32BtnW, int32_t i32BtnH, int32_t i32BtnMargin, int32_t i32BtnSpace, int32_t i32BtnTop);
182 virtual BOOL HitTestGrip(MSG* pMsg);
183
184 DeclareGetClassType();
185
186 public:
187 CPoint m_pointPrev;
188
189 int32_t m_i32MinWidth;
190 int32_t m_i32MinHeight;
191
192 int32_t m_i32WndW;
193 int32_t m_i32WndH;
194 int32_t m_i32WndowWidthUserDefined;
195 int32_t m_i32WndowHeightUserDefined;
196 int32_t m_i32ContentsW;
197 int32_t m_i32ContentsH;
198 int32_t m_i32MarginL;
199 int32_t m_i32MarginT;
200 int32_t m_i32MarginR;
201 int32_t m_i32MarginB;
202
203 int32_t m_i32RowCnt;
204 int32_t m_i32ColCnt;
205 int32_t m_i32WndCtrlCnt;
206 int32_t m_i32BtnCnt;
207
208 int32_t m_i32TitleHeight;
209 bool m_bShowWindowOnAdjustLayout;
210
211 protected:
212 CInternalDialog* m_pInternal;
213
214 CRect m_rc;
215 CRect m_rcTop;
216 CRect m_rcBottom;
217 CRect m_rcLeft;
218 CRect m_rcRight;
219
220 CDC m_memDC;
221 CBitmap* m_pBmpOld;
222 CBitmap* m_pBmp;
223 bool m_bLButtonDown;
224 bool m_bLockWindowUpdate;
225
226 CRect m_rcCloseBtn;
227 CRect m_rcCaption;
228 CRect m_rcTitleRect;
229
230 int32_t m_i32IntervalSpacing;
231 int32_t m_i32HoveringBtn;
232 int32_t m_i32HoveringBtnBf;
233 COLORREF m_clrBorder;
234 COLORREF m_clrBorderActive;
235 COLORREF m_clrClientFill;
236 std::vector<CGUILayoutBase*>& m_vctLayout;
237 std::vector<CGUIDialogLayoutElement*>& m_vctInputWnd;
238 std::vector<CGUIListCtrlMassive*>& m_vctListCtrlMassive;
239
240 CBrush m_brBrush;
241 Base::CFLString<wchar_t> m_strTitle;
242
243 Base::CFLString<wchar_t> m_strOkBtnName;
244 Base::CFLString<wchar_t> m_strCancelBtnName;
245 Base::CFLString<wchar_t> m_strYesBtnName;
246 Base::CFLString<wchar_t> m_strNoBtnName;
247
248 CGUIScrollWnd* m_pScrollWnd;
249 CGUIButton* m_pBtnOK;
250 CGUIButton* m_pBtnCancel;
251 CGUIButton* m_pBtnYes;
252 CGUIButton* m_pBtnNo;
253
254 CGUIDialogLayoutElement* m_pWndCtrlOK;
255 CGUIDialogLayoutElement* m_pWndCtrlCancel;
256 CGUIDialogLayoutElement* m_pWndCtrlYes;
257 CGUIDialogLayoutElement* m_pWndCtrlNo;
258 CGUIPaneDialog* m_pParentPaneDialog;
259
260 bool m_bModeless;
261 bool m_bEnableScroll;
262 bool m_bScrollWndIncludeButtons;
263 bool m_bCreated;
264 bool m_bCenterWindowDone;
265 bool m_bShowCaption;
266 bool m_bShowOkBtn;
267 bool m_bShowCancelBtn;
268 bool m_bShowYesBtn;
269 bool m_bShowNoBtn;
270 bool m_bEnableOkBtn;
271 bool m_bEnableCancelBtn;
272 bool m_bEnableYesBtn;
273 bool m_bEnableNoBtn;
274 bool m_bInitBlock;
275 bool m_bIsResizable;
276 bool m_bAlreadyInsideProcedure;
277 bool m_bNcActive;
278
279 EOrientation m_eOrientation;
280
281 CGUILayoutBase* m_pFocusLayout;
282 CWnd* m_pFocusWnd;
283 int32_t m_i32FocusIdx;
284 int32_t m_i32FocusIdxRow;
285 int32_t m_i32FocusIdxCol;
286
287 public:
288 afx_msg BOOL OnEraseBkgnd(CDC* pDC);
289 afx_msg void OnPaint();
290 afx_msg void OnNcPaint();
291 afx_msg void OnMouseMove(UINT nFlags, CPoint point);
292 afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
293 afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
294 afx_msg void OnSetFocus(CWnd* pOldWnd);
295 afx_msg void OnKillFocus(CWnd* pNewWnd);
296 afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
297 afx_msg void OnDestroy();
298 afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
299 afx_msg void OnSize(UINT nType, int cx, int cy);
300 afx_msg BOOL OnNcActivate(BOOL bActive);
301 afx_msg void OnMouseLeave();
302 afx_msg void OnNcMouseMove(UINT nHitTest, CPoint point);
303 afx_msg void OnNcMouseLeave();
304};
305 }
306}
Template type 의 문자열 클래스
Definition FLString.h:34
버튼 클래스
Definition GUIButton.h:31
콤보박스 클래스
Definition GUIComboBox.h:28
virtual void OnReceiveBroadcast(const Base::CBroadcastMessage *pMessage) override
Callback 함수. BroadcastMessage를 수신받는 함수
CGUIDialog(CWnd *pParent=nullptr)
기본 생성자
문자열 편집 창 클래스
Definition GUIEditCtrl.h:30
저장할 데이터가 매우 많은 경우의 리스트 컨트롤 클래스
Definition GUIListCtrlMassive.h:38
Definition AESCryptography.h:18
Definition D2DObject.h:12
EOrientation
방향
Definition DefinitionsGUI.h:5823
ELayout
다이얼로그의 레이아웃
Definition GUIDialog.h:45
@ BoxLayout
박스 레이아웃
Definition GUIDialog.h:61
@ GridLayout
격자 레이아웃
Definition GUIDialog.h:52