X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5301d9333612e6d80f285752d26718475fce6c98..d062e17fca1a1fc0b82b269da4a7ad271075ba2b:/samples/treectrl/treectrl.h?ds=sidebyside diff --git a/samples/treectrl/treectrl.h b/samples/treectrl/treectrl.h index 6a6dc6702f..3f89a72064 100644 --- a/samples/treectrl/treectrl.h +++ b/samples/treectrl/treectrl.h @@ -9,6 +9,16 @@ // Licence: wxWindows license ///////////////////////////////////////////////////////////////////////////// +#define USE_GENERIC_TREECTRL 0 + +#if USE_GENERIC_TREECTRL +#include "wx/generic/treectlg.h" +#ifndef wxTreeCtrl +#define wxTreeCtrl wxGenericTreeCtrl +#define sm_classwxTreeCtrl sm_classwxGenericTreeCtrl +#endif +#endif + // Define a new application type class MyApp : public wxApp { @@ -60,7 +70,10 @@ public: void OnBeginLabelEdit(wxTreeEvent& event); void OnEndLabelEdit(wxTreeEvent& event); void OnDeleteItem(wxTreeEvent& event); + void OnRMouseUp(wxMouseEvent& event); void OnGetInfo(wxTreeEvent& event); + void OnTreeRMouseClick(wxTreeEvent& event); + void OnItemRightClick(wxTreeEvent& event); void OnSetInfo(wxTreeEvent& event); void OnItemExpanded(wxTreeEvent& event); void OnItemExpanding(wxTreeEvent& event); @@ -84,6 +97,8 @@ public: void DoToggleIcon(const wxTreeItemId& item); + void ShowMenu(wxTreeItemId id, const wxPoint& pt); + protected: virtual int OnCompareItems(const wxTreeItemId& i1, const wxTreeItemId& i2);