#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
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
{
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
#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:
friend class WXDLLEXPORT wxTreeCtrl;
friend class WXDLLEXPORT wxGenericTreeCtrl;
- DECLARE_DYNAMIC_CLASS_NO_COPY(wxTreeEvent)
+ DECLARE_DYNAMIC_CLASS(wxTreeEvent)
};
typedef void (wxEvtHandler::*wxTreeEventFunction)(wxTreeEvent&);
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
// 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 ),