FLImaging 6.5.8.1
GUIEditCtrl.h
1#pragma once
2
11#include "GUIEditBase.h"
12#include "GUIWndCtrlBase.h"
13
15namespace FLImaging
16{
18 namespace GUI
19 {
20 class CGUIDialogKernel;
21
29 class FL_EXPORT CGUIEditCtrl : public CGUIEditBase, public CGUIWndCtrlBase
30 {
31 public:
40
48 virtual ~CGUIEditCtrl();
49
65 virtual bool SetWndCtrlProcedureOnEndEdit(FLImaging::GUI::CWndCtrlProcedure* pFunc, bool bAutoDestroy = true);
66
78 virtual FLImaging::GUI::CWndCtrlProcedure* GetWndCtrlProcedureOnEndEdit() const;
79
89 virtual void ActivateWndCtrlProcedureOnEndEdit(bool bActivate);
90
101
102 public:
103 virtual const CResult SetValue(const Base::CFLString<wchar_t>& flstrValue) override;
104
105 static void SetBackgroundColor(COLORREF clr);
106 static COLORREF GetBackgroundColor();
107
108 static void SetBackgroundColorReadOnly(COLORREF clr);
109 static COLORREF GetBackgroundColorReadOnly();
110
111 static void SetBorderColorActive(COLORREF clr);
112 static COLORREF GetBorderColorActive();
113
114 static void SetTextColor(COLORREF clr);
115 static COLORREF GetTextColor();
116
117 static void SetTextColorReadOnly(COLORREF clr);
118 static COLORREF GetTextColorReadOnly();
119
120 protected:
121 void PreSubclassWindow();
122
123 virtual void OnEditPaste() override;
124 virtual void OnEditCut() override;
125
126 protected:
127 BOOL m_bCursorOnWnd;
128 BOOL m_bLButtonDown;
129 BOOL m_bEditing;
130 bool m_bSingleLine;
131
132 static COLORREF m_clrBk;
133 static COLORREF m_clrBkReadOnly;
134 static COLORREF m_clrBorderActive;
135 static COLORREF m_clrText;
136 static COLORREF m_clrTextReadOnly;
137
138 CWndCtrlProcedure* m_pProcedureOnEndEdit;
139 bool m_bProcedureOnEndEditAutoDestroy;
140 bool m_bWndCtrlProcedureOnEndEditActive;
141
142 friend class CGUIDialogKernel;
143 public:
144 DECLARE_MESSAGE_MAP()
145 afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
146 afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
147 afx_msg void OnMouseHover(UINT nFlags, CPoint point);
148 afx_msg void OnMouseLeave();
149 afx_msg void OnMouseMove(UINT nFlags, CPoint point);
150 afx_msg void OnSetFocus(CWnd* pOldWnd);
151 afx_msg void OnKillFocus(CWnd* pNewWnd);
152 afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags);
153 afx_msg int OnMouseActivate(CWnd* pDesktopWnd, UINT nHitTest, UINT message);
154 afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
155 afx_msg void OnNcPaint();
156 afx_msg HBRUSH CtlColor(CDC* pDC, UINT nCtlColor);
157 afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
158 afx_msg void OnEnKillfocus();
159 };
160 }
161}
Template type string class.
Definition INIUtilities.h:20
FLImaging module execution result object.
Definition ResultsDef.h:1514
Definition GUIDialogKernel.h:51
Text box class.
Definition GUIEditBase.h:27
Text box class.
Definition GUIEditCtrl.h:30
virtual void OnEditCut() override
Function that is invoked by a paste event.
virtual void ActivateWndCtrlProcedureOnEndEdit(bool bActivate)
Activates or deactivates the callback function for end-edit events.
CGUIEditCtrl()
Default constructor.
virtual FLImaging::GUI::CWndCtrlProcedure * GetWndCtrlProcedureOnEndEdit() const
Retrieves the callback function set for end-edit events.
virtual bool SetWndCtrlProcedureOnEndEdit(FLImaging::GUI::CWndCtrlProcedure *pFunc, bool bAutoDestroy=true)
Sets a callback function that will be triggered when editing ends.
virtual bool IsWndCtrlProcedureOnEndEditActivated() const
Checks whether the callback function for end-edit events is currently activated.
virtual const CResult SetValue(const Base::CFLString< wchar_t > &flstrValue) override
A function that sets the input value, the value is modified and stored for the input type you set.
virtual ~CGUIEditCtrl()
Default destructor.