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