summaryrefslogtreecommitdiff
path: root/plugins/Import/src/stdafx.h
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-10-18 20:39:20 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-10-18 20:39:20 +0300
commitfba89acdf4814afe7547fd3c24b428ab42aa0a81 (patch)
treeae36ebdd0c362ff7890281f6b26fa0508e9119b8 /plugins/Import/src/stdafx.h
parent3bf5f14f6f970e4be61a3b4f2c073a113937efc5 (diff)
Import moved to UI classes
Diffstat (limited to 'plugins/Import/src/stdafx.h')
-rw-r--r--plugins/Import/src/stdafx.h108
1 files changed, 97 insertions, 11 deletions
diff --git a/plugins/Import/src/stdafx.h b/plugins/Import/src/stdafx.h
index 3fa8d721fc..4aed993c33 100644
--- a/plugins/Import/src/stdafx.h
+++ b/plugins/Import/src/stdafx.h
@@ -69,29 +69,115 @@ struct CMPlugin : public PLUGIN<CMPlugin>
// Keys
#define IMP_KEY_FR "FirstRun" // First run
-#define WIZM_GOTOPAGE (WM_USER+10) // wParam=resource id, lParam=dlgproc
+#define WIZM_GOTOPAGE (WM_USER+10) // wParam=0, lParam=page class
#define WIZM_DISABLEBUTTON (WM_USER+11) // wParam=0:back, 1:next, 2:cancel
#define WIZM_SETCANCELTEXT (WM_USER+12) // lParam=(char*)newText
#define WIZM_ENABLEBUTTON (WM_USER+13) // wParam=0:back, 1:next, 2:cancel
#define PROGM_SETPROGRESS (WM_USER+10) // wParam=0..100
#define PROGM_ADDMESSAGE (WM_USER+11) // lParam=(char*)szText
+#define PROGM_START (WM_USER+100)
+
+class CWizardPageDlg : public CDlgBase
+{
+ CCtrlButton btnOk, btnCancel;
+
+protected:
+ virtual void OnNext() PURE;
+ virtual void OnCancel();
+
+public:
+ CWizardPageDlg(int dlgId);
+
+ void onClick_Ok(CCtrlButton*) { OnNext(); }
+ void onClick_Cancel(CCtrlButton*) { OnCancel(); }
+};
void AddMessage(const wchar_t* fmt, ...);
+LRESULT RunWizard(CWizardPageDlg*, bool bModal);
+
+class CIntroPageDlg : public CWizardPageDlg
+{
+public:
+ CIntroPageDlg();
+
+ bool OnInitDialog() override;
+ void OnNext() override;
+};
-struct WizardDlgParam
+class CProgressPageDlg : public CWizardPageDlg
{
- WPARAM wParam;
- LPARAM lParam;
+public:
+ CProgressPageDlg();
+
+ bool OnInitDialog() override;
+ void OnNext() override;
+ INT_PTR DlgProc(UINT, WPARAM, LPARAM) override;
};
-INT_PTR CALLBACK WizardDlgProc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam);
-INT_PTR CALLBACK WizardIntroPageProc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam);
-INT_PTR CALLBACK ProgressPageProc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam);
-INT_PTR CALLBACK MirandaPageProc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam);
-INT_PTR CALLBACK MirandaOptionsPageProc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam);
-INT_PTR CALLBACK MirandaAdvOptionsPageProc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam);
-INT_PTR CALLBACK FinishedPageProc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam);
+class CMirandaPageDlg : public CWizardPageDlg
+{
+ void SearchForLists(const wchar_t *mirandaPath, const wchar_t *mirandaProf);
+
+ CCtrlButton btnBack, btnOther;
+ CCtrlListBox list;
+
+public:
+ CMirandaPageDlg();
+
+ bool OnInitDialog() override;
+ void OnDestroy() override;
+ void OnNext() override;
+
+ void onClick_Back(CCtrlButton*);
+ void onClick_Other(CCtrlButton*);
+
+ void onSelChanged_list(CCtrlListBox*);
+};
+
+class CMirandaOptionsPageDlg : public CWizardPageDlg
+{
+ CCtrlButton btnBack;
+
+public:
+ CMirandaOptionsPageDlg();
+
+ bool OnInitDialog() override;
+ void OnNext() override;
+
+ void onClick_Back(CCtrlButton*);
+};
+
+class CMirandaAdvOptionsPageDlg : public CWizardPageDlg
+{
+ CCtrlButton btnBack;
+ CCtrlCheck chkSince, chkAll, chkOutgoing, chkIncoming, chkMsg, chkUrl, chkFT, chkOther;
+
+public:
+ CMirandaAdvOptionsPageDlg();
+
+ bool OnInitDialog() override;
+ void OnNext() override;
+
+ void onClick_Back(CCtrlButton*);
+
+ void onChange_Since(CCtrlCheck*);
+ void onChange_All(CCtrlCheck*);
+ void onChange_Msg(CCtrlCheck*);
+ void onChange_Url(CCtrlCheck*);
+ void onChange_FT(CCtrlCheck*);
+ void onChange_Other(CCtrlCheck*);
+};
+
+class CFinishedPageDlg : public CWizardPageDlg
+{
+public:
+ CFinishedPageDlg();
+
+ bool OnInitDialog() override;
+ void OnNext() override;
+ void OnCancel() override;
+};
bool IsDuplicateEvent(MCONTACT hContact, DBEVENTINFO dbei);