source: src/AdvHaliteDialog.hpp @ 268

Revision 268, 2.1 KB checked in by Eoin, 12 years ago (diff)

Added copyright eventually.

Line 
1
2//         Copyright Eóin O'Callaghan 2006 - 2007.
3// Distributed under the Boost Software License, Version 1.0.
4//    (See accompanying file LICENSE_1_0.txt or copy at
5//          http://www.boost.org/LICENSE_1_0.txt)
6
7#pragma once
8
9#include "stdAfx.hpp"
10#include "DdxEx.hpp"
11
12#include "HaliteTabCtrl.hpp"
13#include "advtabs/ThemeTestDialog.hpp"
14#include "advtabs/Torrent.hpp"
15#include "advtabs/Peers.hpp"
16#include "advtabs/Tracker.hpp"
17#include "advtabs/Debug.hpp"
18
19#include "HaliteListManager.hpp"
20
21//class HaliteListViewCtrl;
22//template <class TBase>
23//class CHaliteListViewCtrl;
24
25//typedef CHaliteListViewCtrl<HaliteListViewCtrl>::selection_manage_class ListViewManager;
26
27class HaliteWindow;
28
29class AdvHaliteDialog :
30        public CDialogImpl<AdvHaliteDialog>,
31        private CDialogResize<AdvHaliteDialog>
32{
33protected:
34        typedef AdvHaliteDialog thisClass;
35        typedef CDialogImpl<AdvHaliteDialog> baseClass;
36        typedef CDialogResize<AdvHaliteDialog> resizeClass;
37        friend class resizeClass;
38       
39public:
40        enum { IDD = IDD_ADVHALITEDLG };
41
42        AdvHaliteDialog(HaliteWindow& halWindow) :
43                m_torrent(halWindow),
44                m_peers(halWindow),
45                m_tracker(halWindow),
46                m_debug(halWindow)
47        {}
48
49        BOOL PreTranslateMessage(MSG* pMsg)
50        {
51                return this->IsDialogMessage(pMsg);
52        }
53
54        BEGIN_MSG_MAP_EX(thisClass)
55                MSG_WM_INITDIALOG(onInitDialog)
56                MSG_WM_CLOSE(onClose)
57                MSG_WM_SIZE(OnSize)
58
59                if(uMsg == WM_FORWARDMSG)
60                        if(PreTranslateMessage((LPMSG)lParam)) return TRUE;
61
62                CHAIN_MSG_MAP(resizeClass)
63                REFLECT_NOTIFICATIONS()
64        END_MSG_MAP()
65
66        BEGIN_DLGRESIZE_MAP(thisClass)
67                DLGRESIZE_CONTROL(IDC_TAB, (DLSZ_SIZE_X | DLSZ_SIZE_Y))
68                DLGRESIZE_CONTROL(IDC_ADVDLG_VERSION, (DLSZ_MOVE_X))
69
70        END_DLGRESIZE_MAP()
71
72        LRESULT onInitDialog(HWND, LPARAM);
73        void OnSize(UINT, CSize);
74        void onClose();
75
76protected:
77        void InitializeControls(void);
78        void InitializeValues(void);
79
80        CHalTabCtrl m_tabCtrl;
81        boost::scoped_ptr<ThemeTestDialog> mp_dlg;
82        boost::scoped_ptr<AdvTorrentDialog> mp_dlg2;
83
84        AdvTorrentDialog m_torrent;
85        AdvPeerDialog m_peers;
86        AdvTrackerDialog m_tracker;
87        AdvDebugDialog m_debug;
88
89        HaliteWindow* mainHaliteWindow;
90};
Note: See TracBrowser for help on using the repository browser.