]>
Commit | Line | Data |
---|---|---|
1 | ///////////////////////////////////////////////////////////////////////////// | |
2 | // Name: proplist.h | |
3 | // Purpose: Property sheet sample | |
4 | // Author: Julian Smart | |
5 | // Modified by: | |
6 | // Created: 04/01/98 | |
7 | // RCS-ID: $Id$ | |
8 | // Copyright: (c) Julian Smart | |
9 | // Licence: wxWindows license | |
10 | ///////////////////////////////////////////////////////////////////////////// | |
11 | ||
12 | #ifdef __GNUG__ | |
13 | #pragma interface "proplist.h" | |
14 | #endif | |
15 | ||
16 | #ifndef _PROPTEST_H_ | |
17 | #define _PROPTEST_H_ | |
18 | ||
19 | #include "wx/proplist.h" | |
20 | #include "wx/propform.h" | |
21 | ||
22 | class MyChild; | |
23 | ||
24 | // Define a new application | |
25 | class MyFrame; | |
26 | class MyApp: public wxApp | |
27 | { | |
28 | public: | |
29 | MyApp(void); | |
30 | bool OnInit(void); | |
31 | ||
32 | void RegisterValidators(void); | |
33 | void PropertyListTest(bool useDialog); | |
34 | void PropertyFormTest(bool useDialog); | |
35 | ||
36 | MyFrame* m_mainFrame; | |
37 | wxWindow* m_childWindow; | |
38 | }; | |
39 | ||
40 | DECLARE_APP(MyApp) | |
41 | ||
42 | // Define a new frame | |
43 | class MyFrame: public wxFrame | |
44 | { | |
45 | public: | |
46 | MyFrame(wxFrame *frame, const wxString& title, const wxPoint& pos, const wxSize& size, long type); | |
47 | ||
48 | void OnCloseWindow(wxCloseEvent& event); | |
49 | void OnQuit(wxCommandEvent& event); | |
50 | void OnDialogList(wxCommandEvent& event); | |
51 | void OnFrameList(wxCommandEvent& event); | |
52 | void OnDialogForm(wxCommandEvent& event); | |
53 | void OnFrameForm(wxCommandEvent& event); | |
54 | void OnAbout(wxCommandEvent& event); | |
55 | ||
56 | DECLARE_EVENT_TABLE() | |
57 | }; | |
58 | ||
59 | class PropListFrame: public wxPropertyListFrame | |
60 | { | |
61 | public: | |
62 | PropListFrame(wxPropertyListView *v, wxFrame *parent, const wxString& title, | |
63 | const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, | |
64 | long style = wxDEFAULT_FRAME_STYLE, const wxString& name = "frame"): | |
65 | wxPropertyListFrame(v, parent, title, pos, size, style, name) | |
66 | { | |
67 | } | |
68 | ||
69 | void OnCloseWindow(wxCloseEvent& event); | |
70 | ||
71 | DECLARE_EVENT_TABLE() | |
72 | }; | |
73 | ||
74 | class PropListDialog: public wxPropertyListDialog | |
75 | { | |
76 | public: | |
77 | PropListDialog(wxPropertyListView *v, wxWindow *parent, const wxString& title, | |
78 | const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, | |
79 | long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = "dialogBox"): | |
80 | wxPropertyListDialog(v, parent, title, pos, size, style, name) | |
81 | { | |
82 | } | |
83 | ||
84 | void OnCloseWindow(wxCloseEvent& event); | |
85 | ||
86 | DECLARE_EVENT_TABLE() | |
87 | }; | |
88 | ||
89 | class PropFormFrame: public wxPropertyFormFrame | |
90 | { | |
91 | public: | |
92 | PropFormFrame(wxPropertyFormView *v, wxFrame *parent, const wxString& title, | |
93 | const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, | |
94 | long style = wxDEFAULT_FRAME_STYLE, const wxString& name = "frame"): | |
95 | wxPropertyFormFrame(v, parent, title, pos, size, style, name) | |
96 | { | |
97 | } | |
98 | ||
99 | void OnCloseWindow(wxCloseEvent& event); | |
100 | void OnSize(wxSizeEvent& event); | |
101 | ||
102 | DECLARE_EVENT_TABLE() | |
103 | }; | |
104 | ||
105 | class PropFormDialog: public wxPropertyFormDialog | |
106 | { | |
107 | public: | |
108 | PropFormDialog(wxPropertyFormView *v, wxWindow *parent, const wxString& title, | |
109 | const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, | |
110 | long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = "dialogBox"): | |
111 | wxPropertyFormDialog(v, parent, title, pos, size, style, name) | |
112 | { | |
113 | } | |
114 | ||
115 | void OnCloseWindow(wxCloseEvent& event); | |
116 | ||
117 | DECLARE_EVENT_TABLE() | |
118 | }; | |
119 | ||
120 | #define PROPERTY_QUIT 1 | |
121 | #define PROPERTY_ABOUT 2 | |
122 | #define PROPERTY_TEST_DIALOG_LIST 3 | |
123 | #define PROPERTY_TEST_FRAME_LIST 4 | |
124 | #define PROPERTY_TEST_DIALOG_FORM 5 | |
125 | #define PROPERTY_TEST_FRAME_FORM 6 | |
126 | ||
127 | #endif | |
128 |