]> git.saurik.com Git - wxWidgets.git/blame_incremental - contrib/samples/gizmos/splittree/tree.h
Fix so the value given to wxTextEntryDialog::SetValue will actually be
[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#include "wx/wx.h"
16#include "wx/gizmos/splittree.h"
17
18class TestValueWindow;
19
20// Define a new application type, each program should derive a class from wxApp
21class MyApp : public wxApp
22{
23public:
24 // override base class virtuals
25 // ----------------------------
26
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();
31};
32
33// Define a new frame type: this is going to be our main frame
34class MyFrame : public wxFrame
35{
36public:
37 // ctor(s)
38 MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size);
39
40 // event handlers (these functions should _not_ be virtual)
41 void OnQuit(wxCommandEvent& event);
42 void OnAbout(wxCommandEvent& event);
43
44protected:
45 wxRemotelyScrolledTreeCtrl* m_tree;
46 wxThinSplitterWindow* m_splitter;
47 wxSplitterScrolledWindow* m_scrolledWindow;
48 //wxScrolledWindow* m_scrolledWindow;
49 TestValueWindow* m_valueWindow;
50
51private:
52 // any class wishing to process wxWindows events must use this macro
53 DECLARE_EVENT_TABLE()
54};
55
56// ----------------------------------------------------------------------------
57// constants
58// ----------------------------------------------------------------------------
59
60// IDs for the controls and the menu commands
61enum
62{
63 // menu items
64 Minimal_Quit = 100,
65 Minimal_About
66};
67
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
73
74class TestTree: public wxRemotelyScrolledTreeCtrl
75{
76 DECLARE_CLASS(TestTree)
77public:
78 TestTree(wxWindow* parent, wxWindowID id, const wxPoint& pt = wxDefaultPosition,
79 const wxSize& sz = wxDefaultSize, long style = wxTR_HAS_BUTTONS);
80 ~TestTree();
81
82 DECLARE_EVENT_TABLE()
83protected:
84 wxImageList* m_imageList;
85};
86
87class TestValueWindow: public wxTreeCompanionWindow
88{
89public:
90 TestValueWindow(wxWindow* parent, wxWindowID id = -1,
91 const wxPoint& pos = wxDefaultPosition,
92 const wxSize& sz = wxDefaultSize,
93 long style = 0);
94
95//// Overrides
96
97//// Events
98
99//// Data members
100protected:
101
102 DECLARE_EVENT_TABLE()
103};
104
105
106
107#endif
108 // _TREE_H_