source: trunk/src/NewTorrentPeersAD.hpp @ 420

Revision 420, 1.5 KB checked in by Eoin, 12 years ago (diff)

Framework for Web seeds and DHT nodes in torrent creation in place.

Line 
1
2//         Copyright Eóin 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 "GenericAddDialog.hpp"
10
11class NewTorrent_PeersAddDialog :
12        public CDialogImpl<NewTorrent_PeersAddDialog>,
13        public WTLx::GenericAddDialog<NewTorrent_PeersAddDialog, IDD_TRACKEDIT>,
14        public CDialogResize<NewTorrent_PeersAddDialog>,
15        public CWinDataExchangeEx<NewTorrent_PeersAddDialog>
16{
17public:
18        typedef NewTorrent_PeersAddDialog thisClass;
19        typedef WTLx::GenericAddDialog<thisClass, IDD_TRACKEDIT> genericBaseClass;
20        typedef CDialogResize<thisClass> resizeClass;
21       
22public:
23        NewTorrent_PeersAddDialog(wstring title, hal::TrackerDetail& tracker) :
24                genericBaseClass(title, "genericAddDlgs/NewTorrentAddPeers", "NewTorrentAddPeers"),
25                tracker_(tracker)
26        {}
27
28    BEGIN_MSG_MAP_EX(thisClass)
29                CHAIN_MSG_MAP(resizeClass)
30                CHAIN_MSG_MAP(genericBaseClass)
31    END_MSG_MAP()
32
33    BEGIN_DDX_MAP(thisClass)
34                DDX_EX_STDWSTRING(IDC_TRACKER_EDIT_URL, tracker_.url);
35        DDX_INT(IDC_TRACKER_EDIT_TIER, tracker_.tier)
36    END_DDX_MAP()       
37
38        BEGIN_DLGRESIZE_MAP(thisClass)
39                DLGRESIZE_CONTROL(IDC_TRACKER_EDIT_URL, DLSZ_SIZE_X)
40                DLGRESIZE_CONTROL(IDC_TRACKER_EDIT_TIER, DLSZ_MOVE_X)
41                DLGRESIZE_CONTROL(IDOK, DLSZ_MOVE_X|DLSZ_MOVE_Y)
42                DLGRESIZE_CONTROL(IDCANCEL, DLSZ_MOVE_X|DLSZ_MOVE_Y)
43        END_DLGRESIZE_MAP()
44
45private:
46        wstring title_;
47        hal::TrackerDetail& tracker_;
48};
Note: See TracBrowser for help on using the repository browser.