Changeset 509 for trunk/src/NewTorrentPeersAD.hpp
- Timestamp:
- 07/21/08 05:33:36 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/NewTorrentPeersAD.hpp
r495 r509 6 6 7 7 #pragma once 8 9 #define ID_NTPLVM_BEGIN 19000 10 #define ID_NTPLVM_NEW ID_NTPLVM_BEGIN + 1 11 #define ID_NTPLVM_EDIT ID_NTPLVM_BEGIN + 2 12 #define ID_NTPLVM_DELETE ID_NTPLVM_BEGIN + 3 13 #define HAL_NTPLVM_NAMES ID_NTPLVM_BEGIN + 4 8 14 9 15 #define HAL_NEWT_ADD_PEERS 14500 … … 22 28 #ifndef RC_INVOKED 23 29 30 #include <boost/signals.hpp> 31 #include <boost/function.hpp> 32 33 #include "stdAfx.hpp" 34 #include "global/string_conv.hpp" 35 #include "halIni.hpp" 36 #include "HaliteSortListViewCtrl.hpp" 37 24 38 #include "GenericAddDialog.hpp" 39 #include "GenericAddListView.hpp" 25 40 26 41 class NewTorrent_PeersAddDialog : … … 112 127 }; 113 128 129 class NewTorrent_PeersListViewCtrl : 130 public CHaliteSortListViewCtrl<NewTorrent_PeersListViewCtrl>, 131 public hal::IniBase<NewTorrent_PeersListViewCtrl>, 132 public WTLx::GenericAddListView<NewTorrent_PeersListViewCtrl, true>, 133 private boost::noncopyable 134 { 135 typedef NewTorrent_PeersListViewCtrl thisClass; 136 typedef hal::IniBase<thisClass> iniClass; 137 typedef CHaliteSortListViewCtrl<thisClass> listClass; 138 typedef WTLx::GenericAddListView<thisClass, true> genericAddlistClass; 139 140 friend class listClass; 141 142 public: 143 enum { 144 LISTVIEW_ID_MENU = HAL_GENERIC_ADD_LV_MENU, 145 LISTVIEW_ID_COLUMNNAMES = HAL_NTPLVM_NAMES, 146 LISTVIEW_ID_COLUMNWIDTHS = HAL_TRACKER_LISTVIEW_DEFAULTS 147 }; 148 149 NewTorrent_PeersListViewCtrl() : 150 iniClass("listviews/NewTorrentPeers", "NewPeersListView") 151 {} 152 153 BEGIN_MSG_MAP_EX(thisClass) 154 MSG_WM_DESTROY(OnDestroy) 155 156 CHAIN_MSG_MAP(genericAddlistClass) 157 CHAIN_MSG_MAP(listClass) 158 DEFAULT_REFLECTION_HANDLER() 159 END_MSG_MAP() 160 161 void uiUpdate(const hal::torrent_details_ptr pT); 162 void saveSettings(); 163 164 friend class boost::serialization::access; 165 template<class Archive> 166 void serialize(Archive& ar, const unsigned int version) 167 { 168 ar & boost::serialization::make_nvp("listview", boost::serialization::base_object<listClass>(*this)); 169 } 170 171 void newItem(); 172 void editItem(int); 173 void deleteItem(int); 174 175 private: 176 void OnAttach(); 177 void OnDestroy(); 178 }; 179 180 typedef NewTorrent_PeersListViewCtrl::SelectionManager NewTorrent_PeersListViewManager; 181 114 182 #endif
Note: See TracChangeset
for help on using the changeset viewer.