| 1 |
#ifndef MYTREECTRL_H |
| 2 |
#define MYTREECTRL_H |
| 3 |
|
| 4 |
#include "wx/dataview.h" // Base class: wxDataViewTreeCtrl |
| 5 |
|
| 6 |
// Proxy class for wxTreeCtrl based on wxDataViewTreeCtrl |
| 7 |
class MyTreeCtrl : public wxDataViewTreeCtrl |
| 8 |
{ |
| 9 |
wxDataViewItemArray m_children; |
| 10 |
size_t m_next; |
| 11 |
|
| 12 |
public: |
| 13 |
MyTreeCtrl(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, |
| 14 |
const wxSize& size = wxDefaultSize, long style = wxDV_NO_HEADER | wxDV_SINGLE | wxDV_ROW_LINES); |
| 15 |
virtual ~MyTreeCtrl(); |
| 16 |
|
| 17 |
wxDataViewItem AddRoot(const wxString& name, int imgId = -1, int expandImgId = -1); |
| 18 |
void SelectItem(const wxDataViewItem& item, bool select); |
| 19 |
wxDataViewItem GetFirstChild(const wxDataViewItem& item); |
| 20 |
wxDataViewItem GetNextChild(const wxDataViewItem& item); |
| 21 |
bool ItemHasChildren(const wxDataViewItem& item) const; |
| 22 |
}; |
| 23 |
|
| 24 |
#endif // MYTREECTRL_H |