]>
Commit | Line | Data |
---|---|---|
58580a7e JS |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: tree.h | |
3 | // Purpose: Testing tree functionality | |
4 | // Author: Julian Smart | |
5 | // Modified by: | |
6 | // Created: 04/01/98 | |
7 | // RCS-ID: $Id$ | |
8 | // Copyright: (c) Julian Smart | |
9 | // Licence: wxWindows licence | |
10 | ///////////////////////////////////////////////////////////////////////////// | |
11 | ||
12 | #ifndef _TREE_H_ | |
13 | #define _TREE_H_ | |
14 | ||
694f70fa WS |
15 | #ifdef __GNUG__ |
16 | #pragma interface "tree.h" | |
17 | #endif | |
18 | ||
58580a7e JS |
19 | #include "wx/wx.h" |
20 | #include "wx/gizmos/splittree.h" | |
21 | ||
22 | class TestValueWindow; | |
23 | ||
24 | // Define a new application type, each program should derive a class from wxApp | |
25 | class MyApp : public wxApp | |
26 | { | |
27 | public: | |
28 | // override base class virtuals | |
29 | // ---------------------------- | |
30 | ||
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(); | |
35 | }; | |
36 | ||
37 | // Define a new frame type: this is going to be our main frame | |
38 | class MyFrame : public wxFrame | |
39 | { | |
40 | public: | |
41 | // ctor(s) | |
42 | MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size); | |
43 | ||
44 | // event handlers (these functions should _not_ be virtual) | |
45 | void OnQuit(wxCommandEvent& event); | |
46 | void OnAbout(wxCommandEvent& event); | |
47 | ||
48 | protected: | |
49 | wxRemotelyScrolledTreeCtrl* m_tree; | |
50 | wxThinSplitterWindow* m_splitter; | |
694f70fa WS |
51 | wxSplitterScrolledWindow* m_scrolledWindow; |
52 | //wxScrolledWindow* m_scrolledWindow; | |
53 | TestValueWindow* m_valueWindow; | |
58580a7e JS |
54 | |
55 | private: | |
be5a51fb | 56 | // any class wishing to process wxWidgets events must use this macro |
58580a7e JS |
57 | DECLARE_EVENT_TABLE() |
58 | }; | |
59 | ||
60 | // ---------------------------------------------------------------------------- | |
61 | // constants | |
62 | // ---------------------------------------------------------------------------- | |
63 | ||
64 | // IDs for the controls and the menu commands | |
65 | enum | |
66 | { | |
67 | // menu items | |
68 | Minimal_Quit = 100, | |
69 | Minimal_About | |
70 | }; | |
71 | ||
72 | #define idTREE_CTRL 2000 | |
73 | #define idSPLITTER_WINDOW 2001 | |
694f70fa WS |
74 | #define idVALUE_WINDOW 2002 |
75 | #define idMAIN_FRAME 2003 | |
58580a7e JS |
76 | #define idSCROLLED_WINDOW 2004 |
77 | ||
78 | class TestTree: public wxRemotelyScrolledTreeCtrl | |
79 | { | |
694f70fa | 80 | DECLARE_CLASS(TestTree) |
58580a7e JS |
81 | public: |
82 | TestTree(wxWindow* parent, wxWindowID id, const wxPoint& pt = wxDefaultPosition, | |
83 | const wxSize& sz = wxDefaultSize, long style = wxTR_HAS_BUTTONS); | |
694f70fa | 84 | ~TestTree(); |
1ed01484 | 85 | |
58580a7e JS |
86 | DECLARE_EVENT_TABLE() |
87 | protected: | |
694f70fa | 88 | wxImageList* m_imageList; |
58580a7e JS |
89 | }; |
90 | ||
1a584f14 | 91 | class TestValueWindow: public wxTreeCompanionWindow |
58580a7e JS |
92 | { |
93 | public: | |
a2d49353 | 94 | TestValueWindow(wxWindow* parent, wxWindowID id = wxID_ANY, |
58580a7e JS |
95 | const wxPoint& pos = wxDefaultPosition, |
96 | const wxSize& sz = wxDefaultSize, | |
97 | long style = 0); | |
98 | ||
99 | //// Overrides | |
100 | ||
101 | //// Events | |
694f70fa | 102 | |
58580a7e JS |
103 | //// Data members |
104 | protected: | |
105 | ||
106 | DECLARE_EVENT_TABLE() | |
107 | }; | |
108 | ||
109 | ||
110 | ||
111 | #endif | |
112 | // _TREE_H_ |