]> git.saurik.com Git - wxWidgets.git/blame_incremental - contrib/samples/gizmos/splittree/tree.h
Avoid warnings from mgl headers if possible.
[wxWidgets.git] / contrib / samples / gizmos / splittree / tree.h
... / ...
CommitLineData
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
15#ifdef __GNUG__
16 #pragma interface "tree.h"
17#endif
18
19#include "wx/wx.h"
20#include "wx/gizmos/splittree.h"
21
22class TestValueWindow;
23
24// Define a new application type, each program should derive a class from wxApp
25class MyApp : public wxApp
26{
27public:
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
38class MyFrame : public wxFrame
39{
40public:
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
48protected:
49 wxRemotelyScrolledTreeCtrl* m_tree;
50 wxThinSplitterWindow* m_splitter;
51 wxSplitterScrolledWindow* m_scrolledWindow;
52 //wxScrolledWindow* m_scrolledWindow;
53 TestValueWindow* m_valueWindow;
54
55private:
56 // any class wishing to process wxWidgets events must use this macro
57 DECLARE_EVENT_TABLE()
58};
59
60// ----------------------------------------------------------------------------
61// constants
62// ----------------------------------------------------------------------------
63
64// IDs for the controls and the menu commands
65enum
66{
67 // menu items
68 Minimal_Quit = 100,
69 Minimal_About
70};
71
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
77
78class TestTree: public wxRemotelyScrolledTreeCtrl
79{
80 DECLARE_CLASS(TestTree)
81public:
82 TestTree(wxWindow* parent, wxWindowID id, const wxPoint& pt = wxDefaultPosition,
83 const wxSize& sz = wxDefaultSize, long style = wxTR_HAS_BUTTONS);
84 ~TestTree();
85
86 DECLARE_EVENT_TABLE()
87protected:
88 wxImageList* m_imageList;
89};
90
91class TestValueWindow: public wxTreeCompanionWindow
92{
93public:
94 TestValueWindow(wxWindow* parent, wxWindowID id = wxID_ANY,
95 const wxPoint& pos = wxDefaultPosition,
96 const wxSize& sz = wxDefaultSize,
97 long style = 0);
98
99//// Overrides
100
101//// Events
102
103//// Data members
104protected:
105
106 DECLARE_EVENT_TABLE()
107};
108
109
110
111#endif
112 // _TREE_H_