summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2020-06-04 17:03:28 +0300
committerGeorge Hazan <ghazan@miranda.im>2020-06-04 17:03:28 +0300
commitf531ff887729783a7fe7a3e12ad12f658eefc7b0 (patch)
tree9e1844429448b6527ef7ca87163e44eafce250d8 /include
parent1c2e5d128a7176ae827dda1e2a8fcc64e772a148 (diff)
UI classes:
- CDlgBase::m_bSucceeded variable introduced to check whether IDOK was pressed or not; - unused/useless buttons with id=IDOK or IDCANCEL removed; - brnOk.OnClick replaced with OnApply calls; - unused/useless calls of EndDialog/EndModal removed; - minor code cleaning
Diffstat (limited to 'include')
-rw-r--r--include/m_gui.h16
1 files changed, 9 insertions, 7 deletions
diff --git a/include/m_gui.h b/include/m_gui.h
index 6b13667a83..5b92502f0b 100644
--- a/include/m_gui.h
+++ b/include/m_gui.h
@@ -399,7 +399,7 @@ public:
__forceinline HINSTANCE GetInst() const { return m_pPlugin.getInst(); }
__forceinline HWND GetHwnd() const { return m_hwnd; }
__forceinline void Hide() { Show(SW_HIDE); }
- __forceinline bool IsInitialized() const { return m_initialized; }
+ __forceinline bool IsInitialized() const { return m_bInitialized; }
__forceinline void SetMinSize(int x, int y) { m_iMinWidth = x, m_iMinHeight = y; }
__forceinline void SetParent(HWND hwnd) { m_hwndParent = hwnd; }
@@ -411,16 +411,18 @@ protected:
HWND m_hwnd = nullptr; // must be the first data item
HWND m_hwndParent = nullptr;
int m_idDialog;
+
bool m_isModal = false;
- bool m_initialized = false;
+ bool m_bInitialized = false;
bool m_forceResizable = false;
+ bool m_bSucceeded = false; // was IDOK pressed or not
bool m_bExiting = false; // window received WM_CLOSE and gonna die soon
- CMPluginBase &m_pPlugin;
-
enum { CLOSE_ON_OK = 0x1, CLOSE_ON_CANCEL = 0x2 };
BYTE m_autoClose; // automatically close dialog on IDOK/CANCEL commands. default: CLOSE_ON_OK|CLOSE_ON_CANCEL
+ CMPluginBase &m_pPlugin;
+
// override this handlers to provide custom functionality
// general messages
virtual bool OnInitDialog();
@@ -1464,11 +1466,11 @@ class MIR_APP_EXPORT CProtoIntDlgBase : public CDlgBase
public:
CProtoIntDlgBase(PROTO_INTERFACE *proto, int idDialog);
- void CreateLink(CCtrlData& ctrl, const char *szSetting, BYTE type, DWORD iValue);
- void CreateLink(CCtrlData& ctrl, const char *szSetting, wchar_t *szValue);
+ void CreateLink(CCtrlData &ctrl, const char *szSetting, BYTE type, DWORD iValue);
+ void CreateLink(CCtrlData &ctrl, const char *szSetting, wchar_t *szValue);
template<class T>
- __inline void CreateLink(CCtrlData& ctrl, CMOption<T> &option)
+ __inline void CreateLink(CCtrlData &ctrl, CMOption<T> &option)
{
ctrl.CreateDbLink(new CMOptionLink<T>(option));
}