I2P

Invisible Internet Project


root/src/kadNodesListView.h @ ddf45b3c507084ec21e47b30873a91058b2fd979

Revision 28457d5df17ac5c53ba2d8113977afa51a5b5ade, 1.2 KB (checked in by mkvore-commit@…, 16 months ago)

i2p.imule.v2 without conflicting paths to amule 2.3.1

applied changes from 963c12a8a3b9d16273234e8c0b05db6c0935af3b

through 1758bc1bb8939e9be80ca6e2a28939a915ee279a

Line 
1//
2// C++ Interface: kadNodesListView
3//
4// Description: list of kad contacts in the routing zone
5//
6//
7// Author: MKVore <mkvore@mail.i2p>, (C) 2008
8//
9// Copyright: See COPYING file that comes with this distribution
10//
11//
12
13#include <wx/wx.h>
14#include <wx/listctrl.h>
15#include "GuiEvents.h"
16#include <vector>
17#include <map>
18
19namespace Kademlia
20{
21class CContact ;
22class CUInt128 ;
23}
24
25class KadNodesListView : public wxListView
26{
27public:
28        KadNodesListView(wxWindow* parent, wxWindowID id=-1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxLC_ICON, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxListCtrlNameStr);
29
30        void AddNode       ( Kademlia::CContact * contact  );
31        void DeleteNode    ( Kademlia::CContact * contact  );
32        void OnColumnLClick( wxListEvent & event );
33
34protected:
35        virtual wxString OnGetItemText(long item, long column) const;
36        virtual wxListItemAttr * OnGetItemAttr(long item) const;
37private :
38        void SortItems();
39        std::map<Kademlia::CUInt128, long> _contacts_map;
40        std::vector<Kademlia::CContact> _contacts_list ;
41        std::vector<Kademlia::CContact> _sorted_contacts_list ;
42
43        DECLARE_EVENT_TABLE()
44};
Note: See TracBrowser for help on using the browser.