All Classes Functions Variables
MyListCtrlCheckbox.h
1 #ifndef MYLISTCTRL_H
2 #define MYLISTCTRL_H
3 
4 #include <wx/listctrl.h>
5 #include <wx/imaglist.h>
6 #include <vector>
7 
8 class Record;
9 
10 class MyListCtrlCheckbox : public wxListCtrl
11 {
12  public:
13  MyListCtrlCheckbox(wxWindow *parent, wxWindowID id, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize,
14  long style=wxLC_ICON, const wxValidator &validator=wxDefaultValidator, const wxString &name=wxListCtrlNameStr);
15  virtual ~MyListCtrlCheckbox();
16 
17  std::vector<long> GetCheckedIds() const;
18  std::vector<long> GetUncheckedIds() const;
19  std::vector<wxUIntPtr> GetCheckedData() const;
20  std::vector<wxUIntPtr> GetUncheckedData() const;
21  bool IsChecked(long item) const;
22  void SetChecked(long item, bool checked);
23 
24  protected:
25  std::vector<long> GetAllItems() const;
26  void OnMouseEvent(wxMouseEvent& event);
27  bool CreateIcons();
28  virtual void OnClickedCheckbox( long item );
29 
30  private:
31 
32  const wxSize m_imageSize;
33  wxImageList m_imageList;
34 
35 };
36 
37 #endif // MYLISTCTRL_H