1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: Testing tree functionality
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
16 #include "wx/gizmos/splittree.h"
18 class TestValueWindow
;
20 // Define a new application type, each program should derive a class from wxApp
21 class MyApp
: public wxApp
24 // override base class virtuals
25 // ----------------------------
27 // this one is called on application startup and is a good place for the app
28 // initialization (doing it here and not in the ctor allows to have an error
29 // return: if OnInit() returns false, the application terminates)
30 virtual bool OnInit();
33 // Define a new frame type: this is going to be our main frame
34 class MyFrame
: public wxFrame
38 MyFrame(const wxString
& title
, const wxPoint
& pos
, const wxSize
& size
);
40 // event handlers (these functions should _not_ be virtual)
41 void OnQuit(wxCommandEvent
& event
);
42 void OnAbout(wxCommandEvent
& event
);
45 wxRemotelyScrolledTreeCtrl
* m_tree
;
46 wxThinSplitterWindow
* m_splitter
;
47 wxSplitterScrolledWindow
* m_scrolledWindow
;
48 //wxScrolledWindow* m_scrolledWindow;
49 TestValueWindow
* m_valueWindow
;
52 // any class wishing to process wxWidgets events must use this macro
56 // ----------------------------------------------------------------------------
58 // ----------------------------------------------------------------------------
60 // IDs for the controls and the menu commands
68 #define idTREE_CTRL 2000
69 #define idSPLITTER_WINDOW 2001
70 #define idVALUE_WINDOW 2002
71 #define idMAIN_FRAME 2003
72 #define idSCROLLED_WINDOW 2004
74 class TestTree
: public wxRemotelyScrolledTreeCtrl
76 DECLARE_CLASS(TestTree
)
78 TestTree(wxWindow
* parent
, wxWindowID id
, const wxPoint
& pt
= wxDefaultPosition
,
79 const wxSize
& sz
= wxDefaultSize
, long style
= wxTR_HAS_BUTTONS
);
84 wxImageList
* m_imageList
;
87 class TestValueWindow
: public wxTreeCompanionWindow
90 TestValueWindow(wxWindow
* parent
, wxWindowID id
= -1,
91 const wxPoint
& pos
= wxDefaultPosition
,
92 const wxSize
& sz
= wxDefaultSize
,
102 DECLARE_EVENT_TABLE()