X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/27822825224f251f3a9a7602883a04fe6d1c3f50..ff3795eeaf49717c7d09b286326cf0cedd476377:/include/wx/treebase.h?ds=sidebyside diff --git a/include/wx/treebase.h b/include/wx/treebase.h index fe2cb9135b..5ca616edd8 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 @@ -197,7 +201,7 @@ static const int wxTREE_HITTEST_ONITEM = wxTREE_HITTEST_ONITEMICON | wxTREE_HITTEST_ONITEMLABEL; // tree ctrl default name -WXDLLEXPORT_DATA(extern const wxChar*) wxTreeCtrlNameStr; +extern WXDLLEXPORT_DATA(const wxChar*) wxTreeCtrlNameStr; // ---------------------------------------------------------------------------- // wxTreeItemAttr: a structure containing the visual attributes of an item @@ -244,6 +248,9 @@ class WXDLLEXPORT wxTreeEvent : public wxNotifyEvent { public: wxTreeEvent(wxEventType commandType = wxEVT_NULL, int id = 0); + wxTreeEvent(const wxTreeEvent & event); + + virtual wxEvent *Clone() const { return new wxTreeEvent(*this); } // accessors // get the item on which the operation was performed or the newly @@ -279,7 +286,7 @@ public: #if WXWIN_COMPATIBILITY_2_2 // for compatibility only, don't use - int GetCode() const { return m_evtKey.GetKeyCode(); } + wxDEPRECATED( int GetCode() const); #endif // WXWIN_COMPATIBILITY_2_2 private: @@ -294,7 +301,7 @@ private: friend class WXDLLEXPORT wxTreeCtrl; friend class WXDLLEXPORT wxGenericTreeCtrl; - DECLARE_DYNAMIC_CLASS_NO_COPY(wxTreeEvent) + DECLARE_DYNAMIC_CLASS(wxTreeEvent) }; typedef void (wxEvtHandler::*wxTreeEventFunction)(wxTreeEvent&); @@ -324,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 @@ -372,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 ),