summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-05-20 18:21:14 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-05-20 18:21:14 +0000
commitb5bb7bfe0a4da1fb1e9664da06ec708c809dbe6d (patch)
tree4274cb6654eeb283e5f9e3f7cf1eb2735def0842 /include
parenta590c8d4c361070c87e1f4d708b00f936426ae6e (diff)
adaptation of CCtrlPages for the real life
git-svn-id: http://svn.miranda-ng.org/main/trunk@13719 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'include')
-rw-r--r--include/m_gui.h32
1 files changed, 22 insertions, 10 deletions
diff --git a/include/m_gui.h b/include/m_gui.h
index 51d2d3ddd0..01d5f1808f 100644
--- a/include/m_gui.h
+++ b/include/m_gui.h
@@ -852,7 +852,7 @@ class MIR_CORE_EXPORT CCtrlTreeView : public CCtrlBase
{
typedef CCtrlBase CSuper;
- HTREEITEM MoveItemAbove(HTREEITEM hItem, HTREEITEM hInsertAfter);
+ HTREEITEM MoveItemAbove(HTREEITEM hItem, HTREEITEM hInsertAfter);
public:
CCtrlTreeView(CDlgBase *dlg, int ctrlId);
@@ -990,6 +990,12 @@ protected:
/////////////////////////////////////////////////////////////////////////////////////////
// CCtrlTreeView
+#define PSN_INFOCHANGED 1
+#define PSN_PARAMCHANGED 2
+
+// force-send a PSN_INFOCHANGED to all pages
+#define PSM_FORCECHANGED (WM_USER+100)
+
class MIR_CORE_EXPORT CCtrlPages : public CCtrlBase
{
typedef CCtrlBase CSuper;
@@ -997,16 +1003,17 @@ class MIR_CORE_EXPORT CCtrlPages : public CCtrlBase
public:
CCtrlPages(CDlgBase *dlg, int ctrlId);
- void AddPage(TCHAR *ptszName, HICON hIcon, CCallback<void> onCreate = CCallback<void>(), void *param = NULL);
- void AttachDialog(int iPage, CDlgBase *pDlg);
-
+ void AddPage(TCHAR *ptszName, HICON hIcon, CDlgBase *pDlg);
void ActivatePage(int iPage);
-
protected:
virtual BOOL OnNotify(int idCtrl, NMHDR *pnmh);
- void OnInit();
- void OnDestroy();
+
+ virtual void OnInit();
+ virtual void OnDestroy();
+
+ virtual void OnApply();
+ virtual void OnReset();
virtual LRESULT CustomWndProc(UINT msg, WPARAM wParam, LPARAM lParam);
@@ -1014,14 +1021,19 @@ private:
HIMAGELIST m_hIml;
CDlgBase *m_pActivePage;
- struct TPageInfo
+ struct TPageInfo : public MZeroedObject
{
- CCallback<void> m_onCreate;
- void *m_param;
+ int m_pageId;
+ ptrT m_ptszHeader;
+ HICON m_hIcon;
+ BOOL m_bChanged;
CDlgBase *m_pDlg;
};
void ShowPage(CDlgBase *pDlg);
+
+ TPageInfo* GetCurrPage();
+ LIST<TPageInfo> m_pages;
};
/////////////////////////////////////////////////////////////////////////////////////////