- wxTreeCtrl *m_owner;
- GtkWidget *m_parentwidget;
- GtkTreeItem *m_widget;
- GtkTree *m_tree;
- long m_mask;
- long m_itemId;
- long m_state;
- long m_stateMask;
- wxString m_text;
- int m_image;
- int m_selectedImage;
- int m_children;
- wxList m_childlist;
- long m_data;
-
- wxTreeItem();
- wxTreeItem(GtkWidget *parent, const wxTreeItem &item);
- ~wxTreeItem();
-
- void Create();
-
- void AddChild(wxTreeItem *child);
- void DeleteChildren();
- bool HasChildren();
- wxTreeItem *FindItem(long itemId) const;
- wxTreeItem *FindItem(GtkTreeItem *item) const;
-
- // Accessors
- inline long GetMask() const { return m_mask; }
- inline long GetItemId() const { return m_itemId; }
- inline long GetState() const { return m_state; }
- inline long GetStateMask() const { return m_stateMask; }
- inline wxString GetText() const { return m_text; }
- inline int GetImage() const { return m_image; }
- inline int GetSelectedImage() const { return m_selectedImage; }
- inline const wxList &GetChildren() const { return m_childlist; }
- inline long GetData() const { return m_data; }
-
- inline void SetMask(long mask) { m_mask = mask; }
- inline void SetItemId(long id) { m_itemId = m_itemId = id; }
- inline void GetState(long state) { m_state = state; }
- inline void SetStateMask(long stateMask) { m_stateMask = stateMask; }
- inline void GetText(const wxString& text) { m_text = text; }
- inline void SetImage(int image) { m_image = image; }
- inline void SetSelectedImage(int selImage) { m_selectedImage = selImage; }
- inline void SetChildren(const wxList &children) { m_childlist = children; }
- inline void SetData(long data) { m_data = data; }
-
- int NumberOfVisibleDescendents();
-private:
- friend wxTreeCtrl;
- friend void gtk_treeitem_expand_callback(GtkWidget *widget, wxTreeItem *treeitem);
- friend void gtk_treeitem_collapse_callback(GtkWidget *widget, wxTreeItem *treeitem);
- friend void gtk_treeitem_select_callback( GtkWidget *WXUNUSED(widget), wxTreeItem *treeitem);
- friend void gtk_treeitem_deselect_callback( GtkWidget *WXUNUSED(widget), wxTreeItem *treeitem);
-
- void AddSubtree();
- void PrepareEvent(wxTreeEvent &event);
- void SendDelete(wxWindow *target);
- void SendExpand(wxWindow *target);
- void SendExpanding(wxWindow *target);
- void SendCollapse(wxWindow *target);
- void SendCollapsing(wxWindow *target);
- void SendSelChanged(wxWindow *target);
- void SendSelChanging(wxWindow *target);
-
- inline wxTreeItem *GetChild(long no) {
- return (wxTreeItem *)(m_childlist.Nth(no)->Data());
- }
- inline long GetChildrenNumber() {
- return m_childlist.Number();
- }
-
- guit expand_handler;
- guit collapse_handler;
-
- DECLARE_DYNAMIC_CLASS(wxTreeItem)
+ long m_mask;
+ long m_itemId;
+ long m_state;
+ long m_stateMask;
+ wxString m_text;
+ int m_image;
+ int m_selectedImage;
+ int m_children;
+ long m_data;
+
+ wxTreeItem();
+
+// Accessors
+ inline long GetMask() const { return m_mask; }
+ inline long GetItemId() const { return m_itemId; }
+ inline long GetState() const { return m_state; }
+ inline long GetStateMask() const { return m_stateMask; }
+ inline wxString GetText() const { return m_text; }
+ inline int GetImage() const { return m_image; }
+ inline int GetSelectedImage() const { return m_selectedImage; }
+ inline int GetChildren() const { return m_children; }
+ inline long GetData() const { return m_data; }
+
+ inline void SetMask(long mask) { m_mask = mask; }
+ inline void SetItemId(long id) { m_itemId = m_itemId = id; }
+ inline void SetState(long state) { m_state = state; }
+ inline void SetStateMask(long stateMask) { m_stateMask = stateMask; }
+ inline void GetText(const wxString& text) { m_text = text; }
+ inline void SetImage(int image) { m_image = image; }
+ inline void GetSelectedImage(int selImage) { m_selectedImage = selImage; }
+ inline void SetChildren(int children) { m_children = children; }
+ inline void SetData(long data) { m_data = data; }