wxTreeTextCtrl(void) {};
wxTreeTextCtrl( wxWindow *parent, const wxWindowID id,
bool *accept, wxString *res, wxTreeCtrl *owner,
- const wxString &value = "",
+ const wxString &value = wxEmptyString,
const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
int style = 0, const wxValidator& validator = wxDefaultValidator,
- const wxString &name = "wxTreeTextCtrlText" );
+ const wxString &name = wxTextCtrlNameStr );
void OnChar( wxKeyEvent &event );
void OnKillFocus( wxFocusEvent &event );
// retrieve items label
wxString GetItemText(const wxTreeItemId& item) const;
- // get the normal item image
- int GetItemImage(const wxTreeItemId& item) const;
- // get the selected item image
- int GetItemSelectedImage(const wxTreeItemId& item) const;
+ // get one of the images associated with the item (normal by default)
+ int GetItemImage(const wxTreeItemId& item,
+ wxTreeItemIcon which = wxTreeItemIcon_Normal) const;
// get the data associated with the item
wxTreeItemData *GetItemData(const wxTreeItemId& item) const;
// set items label
void SetItemText(const wxTreeItemId& item, const wxString& text);
- // set the normal item image
- void SetItemImage(const wxTreeItemId& item, int image);
- // set the selected item image
- void SetItemSelectedImage(const wxTreeItemId& item, int image);
+ // get one of the images associated with the item (normal by default)
+ void SetItemImage(const wxTreeItemId& item, int image,
+ wxTreeItemIcon which = wxTreeItemIcon_Normal);
// associate some data with the item
void SetItemData(const wxTreeItemId& item, wxTreeItemData *data);
// NB: this function is not reentrant and not MT-safe (FIXME)!
void SortChildren(const wxTreeItemId& item);
+ // deprecated functions: use Set/GetItemImage directly
+ // get the selected item image
+ int GetItemSelectedImage(const wxTreeItemId& item) const
+ { return GetItemImage(item, wxTreeItemIcon_Selected); }
+ // set the selected item image
+ void SetItemSelectedImage(const wxTreeItemId& item, int image)
+ { SetItemImage(item, image, wxTreeItemIcon_Selected); }
+
+ // implementation
+
// callbacks
void OnPaint( wxPaintEvent &event );
void OnSetFocus( wxFocusEvent &event );