source: branch_service/src/AdvHaliteDialog.hpp @ 495

Revision 495, 4.1 KB checked in by Eoin, 12 years ago (diff)

Changes seem ok.

Line 
1
2//         Copyright Eoin O'Callaghan 2006 - 2008.
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#include "advtabs/Files.hpp"
19
20#include "HaliteListManager.hpp"
21
22class HaliteWindow;
23
24class AdvHaliteDialog :
25        public ATL::CDialogImpl<AdvHaliteDialog>,
26        private WTL::CDialogResize<AdvHaliteDialog>
27{
28protected:
29        typedef AdvHaliteDialog thisClass;
30        typedef ATL::CDialogImpl<AdvHaliteDialog> baseClass;
31        typedef WTL::CDialogResize<AdvHaliteDialog> resizeClass;
32        friend class resizeClass;
33       
34public:
35        enum { IDD = HAL_ADVHALITEDLG };
36
37        AdvHaliteDialog(HaliteWindow& halWindow) :
38                m_torrent(halWindow),
39                m_peers(halWindow),
40                m_files(halWindow),
41                m_tracker(halWindow),
42                m_debug(halWindow)
43        {}
44
45        virtual BOOL PreTranslateMessage(MSG* pMsg)
46        {
47                return tabCtrl_.PreTranslateMessage(pMsg);
48        }
49
50        BEGIN_MSG_MAP_EX(thisClass)
51                MSG_WM_INITDIALOG(onInitDialog)
52                MSG_WM_CLOSE(onClose)
53                MSG_WM_SIZE(OnSize)
54
55                if(uMsg == WM_FORWARDMSG)
56                        if(PreTranslateMessage((LPMSG)lParam)) return TRUE;
57
58                CHAIN_MSG_MAP(resizeClass)
59                REFLECT_NOTIFICATIONS()
60        END_MSG_MAP()
61
62        BEGIN_DLGRESIZE_MAP(thisClass)
63                DLGRESIZE_CONTROL(HAL_TAB, (DLSZ_SIZE_X | DLSZ_SIZE_Y))
64                DLGRESIZE_CONTROL(HAL_ADVDLG_VERSION, (DLSZ_MOVE_X))
65
66        END_DLGRESIZE_MAP()
67
68        LRESULT onInitDialog(HWND, LPARAM);
69                void OnSize(UINT, WTL::CSize);
70        void onClose();
71
72protected:
73        void InitializeControls(void);
74        void InitializeValues(void);
75
76        CHalTabCtrl tabCtrl_;
77        boost::scoped_ptr<ThemeTestDialog> mp_dlg;
78        boost::scoped_ptr<AdvTorrentDialog> mp_dlg2;
79
80        AdvTorrentDialog m_torrent;
81        AdvPeerDialog m_peers;
82        AdvFilesDialog m_files;
83        AdvTrackerDialog m_tracker;
84        AdvDebugDialog m_debug;
85
86        HaliteWindow* mainHaliteWindow;
87};
Note: See TracBrowser for help on using the repository browser.