diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2015-04-10 12:01:55 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2015-04-10 12:01:55 +0000 |
commit | 78f97fe198286a120370f6c56921205191f986b0 (patch) | |
tree | 96629174df34f22697c5eaad7cfe102f8f7fd5eb /protocols/Tox/src/tox_options.h | |
parent | bff791f9bd1828c66e1462a4a3f86a800b58ad13 (diff) |
Tox:
- switched to new api
- updated tox core
git-svn-id: http://svn.miranda-ng.org/main/trunk@12726 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Tox/src/tox_options.h')
-rw-r--r-- | protocols/Tox/src/tox_options.h | 108 |
1 files changed, 105 insertions, 3 deletions
diff --git a/protocols/Tox/src/tox_options.h b/protocols/Tox/src/tox_options.h index 19b61d6710..0b0e111513 100644 --- a/protocols/Tox/src/tox_options.h +++ b/protocols/Tox/src/tox_options.h @@ -1,10 +1,112 @@ #ifndef _TOX_OPTIONS_H_
#define _TOX_OPTIONS_H_
-struct ItemInfo
+class CToxOptionsMain : public CToxDlgBase
{
- int iItem;
- HWND hwndList;
+private:
+ typedef CToxDlgBase CSuper;
+
+ CCtrlEdit m_toxAddress;
+ CCtrlButton m_toxAddressCopy;
+ CCtrlButton m_profileCreate;
+ CCtrlButton m_profileImport;
+ CCtrlButton m_profileExport;
+
+ CCtrlEdit m_nickname;
+ CCtrlEdit m_password;
+ CCtrlEdit m_group;
+
+ CCtrlCheck m_enableUdp;
+ CCtrlCheck m_enableIPv6;
+
+protected:
+ void OnInitDialog();
+
+ void ToxAddressCopy_OnClick(CCtrlButton*);
+ void ProfileCreate_OnClick(CCtrlButton*);
+ void ProfileImport_OnClick(CCtrlButton*);
+ void ProfileExport_OnClick(CCtrlButton*);
+
+ void OnApply();
+
+public:
+ CToxOptionsMain(CToxProto *proto, int idDialog, HWND hwndParent = NULL);
+
+ static CDlgBase *CreateAccountManagerPage(void *param, HWND owner)
+ {
+ CToxOptionsMain *page = new CToxOptionsMain((CToxProto*)param, IDD_ACCOUNT_MANAGER, owner);
+ page->Show();
+ return page;
+ }
+
+ static CDlgBase *CreateOptionsPage(void *param) { return new CToxOptionsMain((CToxProto*)param, IDD_OPTIONS_MAIN); }
+};
+
+/////////////////////////////////////////////////////////////////////////////////
+
+class CToxNodeEditor : public CDlgBase
+{
+private:
+ typedef CDlgBase CSuper;
+
+ int m_iItem;
+ CCtrlListView *m_list;
+
+ CCtrlEdit m_ipv4;
+ CCtrlEdit m_ipv6;
+ CCtrlEdit m_port;
+ CCtrlEdit m_pkey;
+
+ CCtrlButton m_ok;
+
+protected:
+ void OnInitDialog();
+ void OnOk(CCtrlBase*);
+ void OnClose();
+
+public:
+ CToxNodeEditor(int iItem, CCtrlListView *m_list);
+};
+
+/****************************************/
+
+class CCtrlNodeList : public CCtrlListView
+{
+private:
+ typedef CCtrlListView CSuper;
+
+protected:
+ BOOL OnNotify(int idCtrl, NMHDR *pnmh);
+
+public:
+ CCtrlNodeList(CDlgBase* dlg, int ctrlId);
+
+ CCallback<TEventInfo> OnClick;
+};
+
+/****************************************/
+
+class CToxOptionsNodeList : public CToxDlgBase
+{
+private:
+ typedef CToxDlgBase CSuper;
+
+ CCtrlNodeList m_nodes;
+ CCtrlButton m_addNode;
+
+protected:
+ CToxOptionsNodeList(CToxProto *proto);
+
+ void OnInitDialog();
+ void OnApply();
+
+ void OnAddNode(CCtrlBase*);
+ void OnNodeListDoubleClick(CCtrlBase*);
+ void OnNodeListClick(CCtrlListView::TEventInfo *evt);
+ void OnNodeListKeyDown(CCtrlListView::TEventInfo *evt);
+
+public:
+ static CDlgBase *CreateOptionsPage(void *param) { return new CToxOptionsNodeList((CToxProto*)param); }
};
#endif //_TOX_OPTIONS_H_
\ No newline at end of file |