Modified generic wxTreeCtrl to work under non-Unix platforms simultaneously
with the native control. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@7930 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -98,7 +98,11 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
||||
EVT_MENU(TreeTest_ToggleIcon, MyFrame::OnToggleIcon)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
#if USE_GENERIC_TREECTRL
|
||||
BEGIN_EVENT_TABLE(MyTreeCtrl, wxGenericTreeCtrl)
|
||||
#else
|
||||
BEGIN_EVENT_TABLE(MyTreeCtrl, wxTreeCtrl)
|
||||
#endif
|
||||
EVT_TREE_BEGIN_DRAG(TreeTest_Ctrl, MyTreeCtrl::OnBeginDrag)
|
||||
EVT_TREE_BEGIN_RDRAG(TreeTest_Ctrl, MyTreeCtrl::OnBeginRDrag)
|
||||
EVT_TREE_END_DRAG(TreeTest_Ctrl, MyTreeCtrl::OnEndDrag)
|
||||
@@ -513,7 +517,11 @@ void MyFrame::OnToggleIcon(wxCommandEvent& WXUNUSED(event))
|
||||
}
|
||||
|
||||
// MyTreeCtrl implementation
|
||||
#if USE_GENERIC_TREECTRL
|
||||
IMPLEMENT_DYNAMIC_CLASS(MyTreeCtrl, wxGenericTreeCtrl)
|
||||
#else
|
||||
IMPLEMENT_DYNAMIC_CLASS(MyTreeCtrl, wxTreeCtrl)
|
||||
#endif
|
||||
|
||||
MyTreeCtrl::MyTreeCtrl(wxWindow *parent, const wxWindowID id,
|
||||
const wxPoint& pos, const wxSize& size,
|
||||
|
@@ -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
|
||||
{
|
||||
|
Reference in New Issue
Block a user