]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/treectrl.h
more wxHtmlHelpFrame fixes (didn't store customization correctly, still needs some...
[wxWidgets.git] / include / wx / treectrl.h
index 799425a95fe335cb6b22e91a25c42494af899f18..ac3cee2263223448ccc9249ab5f447c6974fadfd 100644 (file)
@@ -8,6 +8,27 @@
 #include "wx/control.h"
 #include "wx/event.h"
 
+// ----------------------------------------------------------------------------
+// constants
+// ----------------------------------------------------------------------------
+
+// enum for different images associated with a treectrl item
+enum wxTreeItemIcon
+{
+    wxTreeItemIcon_Normal,              // not selected, not expanded
+    wxTreeItemIcon_Selected,            //     selected, not expanded
+    wxTreeItemIcon_Expanded,            // not selected,     expanded
+    wxTreeItemIcon_SelectedExpanded,    //     selected,     expanded
+    wxTreeItemIcon_Max
+};
+
+// tree ctrl default name
+#ifdef __WXMSW__
+    WXDLLEXPORT_DATA(extern const char*) wxTreeCtrlNameStr;
+#else
+    #define wxTreeCtrlNameStr "wxTreeCtrl"
+#endif
+
 // ----------------------------------------------------------------------------
 // include the platform-dependent wxTreeCtrl class
 // ----------------------------------------------------------------------------
@@ -41,7 +62,8 @@
 
 class WXDLLEXPORT wxTreeEvent : public wxNotifyEvent
 {
-friend wxTreeCtrl;
+    friend class WXDLLEXPORT wxTreeCtrl;
+
 public:
     wxTreeEvent(wxEventType commandType = wxEVT_NULL, int id = 0);
 
@@ -97,7 +119,7 @@ typedef void (wxEvtHandler::*wxTreeEventFunction)(wxTreeEvent&);
 #define EVT_TREE_GET_INFO(id, fn) { wxEVT_COMMAND_TREE_GET_INFO, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL },
 #define EVT_TREE_SET_INFO(id, fn) { wxEVT_COMMAND_TREE_SET_INFO, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL },
 
-// GetItem() is the item being expanded/collapsed, the "ING" versions can use 
+// GetItem() is the item being expanded/collapsed, the "ING" versions can use
 #define EVT_TREE_ITEM_EXPANDED(id, fn) { wxEVT_COMMAND_TREE_ITEM_EXPANDED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL },
 #define EVT_TREE_ITEM_EXPANDING(id, fn) { wxEVT_COMMAND_TREE_ITEM_EXPANDING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL },
 #define EVT_TREE_ITEM_COLLAPSED(id, fn) { wxEVT_COMMAND_TREE_ITEM_COLLAPSED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL },
@@ -120,5 +142,11 @@ typedef void (wxEvtHandler::*wxTreeEventFunction)(wxTreeEvent&);
 // GetItem() returns the item that was activated (double click, enter, space)
 #define EVT_TREE_ITEM_ACTIVATED(id, fn) { wxEVT_COMMAND_TREE_ITEM_ACTIVATED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL },
 
+// GetItem() returns the item that was clicked on
+#define EVT_TREE_ITEM_RIGHT_CLICK(id, fn) { wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL },
+#define EVT_TREE_ITEM_MIDDLE_CLICK(id, fn) { wxEVT_COMMAND_TREE_ITEM_MIDDLE_CLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL },
+
 #endif
     // _WX_TREECTRL_H_BASE_
+
+