X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0cd936a4fb390aaf318f1a751546e08a531a3bda..23a59c2cbe8489445b9c26dee4a77e2d20a999c2:/include/wx/treebase.h diff --git a/include/wx/treebase.h b/include/wx/treebase.h index fab586e27a..28ec4e5271 100644 --- a/include/wx/treebase.h +++ b/include/wx/treebase.h @@ -158,7 +158,11 @@ enum wxTreeItemIcon #define wxTR_FULL_ROW_HIGHLIGHT 0x2000 // highlight full horz space +#ifdef __WXGTK20__ +#define wxTR_DEFAULT_STYLE (wxTR_HAS_BUTTONS | wxTR_NO_LINES) +#else #define wxTR_DEFAULT_STYLE (wxTR_HAS_BUTTONS | wxTR_LINES_AT_ROOT) +#endif // deprecated, don't use #define wxTR_MAC_BUTTONS 0 @@ -327,6 +331,7 @@ BEGIN_DECLARE_EVENT_TYPES() DECLARE_EVENT_TYPE(wxEVT_COMMAND_TREE_END_DRAG, 617) DECLARE_EVENT_TYPE(wxEVT_COMMAND_TREE_STATE_IMAGE_CLICK, 618) DECLARE_EVENT_TYPE(wxEVT_COMMAND_TREE_ITEM_GETTOOLTIP, 619) + DECLARE_EVENT_TYPE(wxEVT_COMMAND_TREE_ITEM_MENU, 620) END_DECLARE_EVENT_TYPES() // GetItem() returns the item being dragged, GetPoint() the mouse coords @@ -375,6 +380,9 @@ END_DECLARE_EVENT_TYPES() // GetItem() returns the item that was activated (double click, enter, space) #define EVT_TREE_ITEM_ACTIVATED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_TREE_ITEM_ACTIVATED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxTreeEventFunction, & fn ), NULL ), +// GetItem() returns the item for which the context menu shall be shown +#define EVT_TREE_ITEM_MENU(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_TREE_ITEM_MENU, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxTreeEventFunction, & fn ), (wxObject *) NULL ), + // GetItem() returns the item that was clicked on #define EVT_TREE_ITEM_RIGHT_CLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxTreeEventFunction, & fn ), NULL ), #define EVT_TREE_ITEM_MIDDLE_CLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_TREE_ITEM_MIDDLE_CLICK, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxTreeEventFunction, & fn ), NULL ),