- MyListCtrl(wxWindow *parent, const wxWindowID id, const wxPoint& pos,
- const wxSize& size, long style):
- wxListCtrl(parent, id, pos, size, style)
- {
- }
-
- void OnBeginDrag(wxListEvent& event);
- void OnBeginRDrag(wxListEvent& event);
- void OnBeginLabelEdit(wxListEvent& event);
- void OnEndLabelEdit(wxListEvent& event);
- void OnDeleteItem(wxListEvent& event);
- void OnGetInfo(wxListEvent& event);
- void OnSetInfo(wxListEvent& event);
- void OnSelected(wxListEvent& event);
- void OnDeselected(wxListEvent& event);
- void OnListKeyDown(wxListEvent& event);
-
- DECLARE_EVENT_TABLE()
+ MyListCtrl(wxWindow *parent,
+ const wxWindowID id,
+ const wxPoint& pos,
+ const wxSize& size,
+ long style)
+ : wxListCtrl(parent, id, pos, size, style),
+ m_attr(*wxBLUE, *wxLIGHT_GREY, wxNullFont)
+ {
+ }
+
+ // add one item to the listctrl in report mode
+ void InsertItemInReportView(int i);
+
+ void OnColClick(wxListEvent& event);
+ void OnColRightClick(wxListEvent& event);
+ void OnColBeginDrag(wxListEvent& event);
+ void OnColDragging(wxListEvent& event);
+ void OnColEndDrag(wxListEvent& event);
+ void OnBeginDrag(wxListEvent& event);
+ void OnBeginRDrag(wxListEvent& event);
+ void OnBeginLabelEdit(wxListEvent& event);
+ void OnEndLabelEdit(wxListEvent& event);
+ void OnDeleteItem(wxListEvent& event);
+ void OnDeleteAllItems(wxListEvent& event);
+ void OnGetInfo(wxListEvent& event);
+ void OnSetInfo(wxListEvent& event);
+ void OnSelected(wxListEvent& event);
+ void OnDeselected(wxListEvent& event);
+ void OnListKeyDown(wxListEvent& event);
+ void OnActivated(wxListEvent& event);
+ void OnFocused(wxListEvent& event);
+ void OnCacheHint(wxListEvent& event);
+
+ void OnChar(wxKeyEvent& event);
+
+private:
+ void SetColumnImage(int col, int image);
+
+ void LogEvent(const wxListEvent& event, const wxChar *eventName);
+
+ virtual wxString OnGetItemText(long item, long column) const;
+ virtual int OnGetItemImage(long item) const;
+ virtual wxListItemAttr *OnGetItemAttr(long item) const;
+
+ wxListItemAttr m_attr;
+
+ DECLARE_EVENT_TABLE()