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 TestValueWindow
* m_valueWindow
;
51 // any class wishing to process wxWindows events must use this macro
55 // ----------------------------------------------------------------------------
57 // ----------------------------------------------------------------------------
59 // IDs for the controls and the menu commands
67 #define idTREE_CTRL 2000
68 #define idSPLITTER_WINDOW 2001
69 #define idVALUE_WINDOW 2002
70 #define idMAIN_FRAME 2003
71 #define idSCROLLED_WINDOW 2004
73 class TestTree
: public wxRemotelyScrolledTreeCtrl
75 DECLARE_CLASS(TestTree
)
77 TestTree(wxWindow
* parent
, wxWindowID id
, const wxPoint
& pt
= wxDefaultPosition
,
78 const wxSize
& sz
= wxDefaultSize
, long style
= wxTR_HAS_BUTTONS
);
81 void OnPaint(wxPaintEvent
& event
);
84 wxImageList
* m_imageList
;
87 class TestValueWindow
: public wxWindow
90 TestValueWindow(wxWindow
* parent
, wxWindowID id
= -1,
91 const wxPoint
& pos
= wxDefaultPosition
,
92 const wxSize
& sz
= wxDefaultSize
,
98 void OnSize(wxSizeEvent
& event
);
103 DECLARE_EVENT_TABLE()