]> git.saurik.com Git - wxWidgets.git/blame - utils/configtool/src/configbrowser.cpp
Fix docs for Bind
[wxWidgets.git] / utils / configtool / src / configbrowser.cpp
CommitLineData
61775320
JS
1/////////////////////////////////////////////////////////////////////////////
2// Name: configbrowser.cpp
3// Purpose:
4// Author:
5// Modified by:
6// Created:
7// RCS-ID:
8// Copyright:
9// Licence:
10/////////////////////////////////////////////////////////////////////////////
11
12////@begin includes
13#include "wx/wx.h"
14#include "wx/splitter.h"
15#include "wx/treectrl.h"
16////@end includes
17
18#include "configbrowser.h"
19
20////@begin XPM images
21////@end XPM images
22
23/*!
24 * ctConfigurationBrowserWindow type definition
25 */
26
27IMPLEMENT_CLASS( ctConfigurationBrowserWindow, wxPanel )
28
29/*!
30 * ctConfigurationBrowserWindow event table definition
31 */
32
33BEGIN_EVENT_TABLE( ctConfigurationBrowserWindow, wxPanel )
34
35////@begin ctConfigurationBrowserWindow event table entries
36 EVT_TREE_SEL_CHANGED( ID_CONFIGURATION_BROWSER_TREECTRL, ctConfigurationBrowserWindow::OnConfigurationBrowserTreectrl )
37
38////@end ctConfigurationBrowserWindow event table entries
39
40END_EVENT_TABLE()
41
42/*!
43 * ctConfigurationBrowserWindow constructor
44 */
45
46ctConfigurationBrowserWindow::ctConfigurationBrowserWindow( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style )
47{
48////@begin ctConfigurationBrowserWindow member initialisation
49////@end ctConfigurationBrowserWindow member initialisation
50
51 wxPanel::Create( parent, id, pos, size, style );
52
53 CreateControls();
54}
55
56/*!
57 * Control creation for ctConfigurationBrowserWindow
58 */
59
60void ctConfigurationBrowserWindow::CreateControls()
61{
62////@begin ctConfigurationBrowserWindow content construction
63
64 ctConfigurationBrowserWindow* item1 = this;
65
66 wxBoxSizer* item2 = new wxBoxSizer(wxVERTICAL);
67 item1->SetSizer(item2);
68 item1->SetAutoLayout(TRUE);
69
70 wxSplitterWindow* item3 = new wxSplitterWindow(item1, ID_CONFIGBROWSER_SPLITTERWINDOW, wxDefaultPosition, wxSize(400, 400), wxSP_3DBORDER|wxSP_3DSASH|wxNO_BORDER|wxNO_FULL_REPAINT_ON_RESIZE);
71 wxTreeCtrl* item4 = new wxTreeCtrl(item3, ID_CONFIGURATION_BROWSER_TREECTRL, wxDefaultPosition, wxSize(100, 100), wxTR_SINGLE|wxNO_BORDER);
72 ctConfigurationBrowserControlPanel* item5 = new ctConfigurationBrowserControlPanel(item3, ID_PANEL, wxDefaultPosition, wxSize(100, 80), wxNO_BORDER|wxTAB_TRAVERSAL);
73 item3->SplitVertically(item4, item5, 200);
74 item2->Add(item3, 1, wxGROW, 5);
75
76////@end ctConfigurationBrowserWindow content construction
77}
78
79/*!
80 * Event handler for ID_CONFIGURATION_BROWSER_TREECTRL
81 */
82
83void ctConfigurationBrowserWindow::OnConfigurationBrowserTreectrl( wxTreeEvent& event )
84{
85 // Replace with custom code
86 event.Skip();
87}
88
89/*!
90 * Should we show tooltips?
91 */
92
93bool ctConfigurationBrowserWindow::ShowToolTips()
94{
95 return TRUE;
96}
97
98/*!
99 * ctConfigurationBrowserControlPanel type definition
100 */
101
102IMPLEMENT_CLASS( ctConfigurationBrowserControlPanel, wxPanel )
103
104/*!
105 * ctConfigurationBrowserControlPanel event table definition
106 */
107
108BEGIN_EVENT_TABLE( ctConfigurationBrowserControlPanel, wxPanel )
109
110////@begin ctConfigurationBrowserControlPanel event table entries
111 EVT_BUTTON( ID_ADD_CONFIGURATION, ctConfigurationBrowserControlPanel::OnAddConfiguration )
112 EVT_UPDATE_UI( ID_ADD_CONFIGURATION, ctConfigurationBrowserControlPanel::OnUpdateAddConfiguration )
113
114 EVT_BUTTON( ID_REMOVE_CONFIGURATION, ctConfigurationBrowserControlPanel::OnRemoveConfiguration )
115 EVT_UPDATE_UI( ID_REMOVE_CONFIGURATION, ctConfigurationBrowserControlPanel::OnUpdateRemoveConfiguration )
116
117 EVT_BUTTON( ID_RENAME_CONFIGURATION, ctConfigurationBrowserControlPanel::OnRenameConfiguration )
118 EVT_UPDATE_UI( ID_RENAME_CONFIGURATION, ctConfigurationBrowserControlPanel::OnUpdateRenameConfiguration )
119
120////@end ctConfigurationBrowserControlPanel event table entries
121
122END_EVENT_TABLE()
123
124/*!
125 * ctConfigurationBrowserControlPanel constructor
126 */
127
128ctConfigurationBrowserControlPanel::ctConfigurationBrowserControlPanel( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style )
129{
130////@begin ctConfigurationBrowserControlPanel member initialisation
131////@end ctConfigurationBrowserControlPanel member initialisation
132
133////@begin ctConfigurationBrowserControlPanel creation
134 wxPanel::Create( parent, id, pos, size, style );
135
136 CreateControls();
137////@end ctConfigurationBrowserControlPanel creation
138}
139
140/*!
141 * Control creation for ctConfigurationBrowserControlPanel
142 */
143
144void ctConfigurationBrowserControlPanel::CreateControls()
145{
146////@begin ctConfigurationBrowserControlPanel content construction
147
148 ctConfigurationBrowserControlPanel* item5 = this;
149
150 wxBoxSizer* item6 = new wxBoxSizer(wxVERTICAL);
151 item5->SetSizer(item6);
152 item5->SetAutoLayout(TRUE);
153
154 wxStaticText* item7 = new wxStaticText(item5, wxID_STATIC, _("Browse, add and remove configurations"), wxDefaultPosition, wxDefaultSize, 0);
155 item6->Add(item7, 0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxADJUST_MINSIZE, 5);
156
157 item6->Add(5, 5, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
158
159 wxButton* item9 = new wxButton(item5, ID_ADD_CONFIGURATION, _("&Add..."), wxDefaultPosition, wxDefaultSize, 0);
160 item6->Add(item9, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
161
162 wxButton* item10 = new wxButton(item5, ID_REMOVE_CONFIGURATION, _("&Remove..."), wxDefaultPosition, wxDefaultSize, 0);
163 item6->Add(item10, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
164
165 wxButton* item11 = new wxButton(item5, ID_RENAME_CONFIGURATION, _("&Rename..."), wxDefaultPosition, wxDefaultSize, 0);
166 item6->Add(item11, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
167
168 item6->Add(5, 5, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
169
170 wxStaticText* item13 = new wxStaticText(item5, ID_CONFIGURATION_NAME, _("Configuration:"), wxDefaultPosition, wxDefaultSize, 0);
171 item6->Add(item13, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 5);
172
173 wxTextCtrl* item14 = new wxTextCtrl(item5, ID_CONFIGURATION_DESCRIPTION, _(""), wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_RICH);
174 item6->Add(item14, 1, wxGROW|wxALL, 5);
175
176////@end ctConfigurationBrowserControlPanel content construction
177}
178
179/*!
180 * Event handler for ID_ADD_CONFIGURATION
181 */
182
183void ctConfigurationBrowserControlPanel::OnAddConfiguration( wxCommandEvent& event )
184{
185 // Replace with custom code
186 event.Skip();
187}
188
189/*!
190 * Update event handler for ID_ADD_CONFIGURATION
191 */
192
193void ctConfigurationBrowserControlPanel::OnUpdateAddConfiguration( wxUpdateUIEvent& event )
194{
195 // Replace with custom code
196 event.Skip();
197}
198
199/*!
200 * Event handler for ID_REMOVE_CONFIGURATION
201 */
202
203void ctConfigurationBrowserControlPanel::OnRemoveConfiguration( wxCommandEvent& event )
204{
205 // Replace with custom code
206 event.Skip();
207}
208
209/*!
210 * Update event handler for ID_REMOVE_CONFIGURATION
211 */
212
213void ctConfigurationBrowserControlPanel::OnUpdateRemoveConfiguration( wxUpdateUIEvent& event )
214{
215 // Replace with custom code
216 event.Skip();
217}
218
219/*!
220 * Event handler for ID_RENAME_CONFIGURATION
221 */
222
223void ctConfigurationBrowserControlPanel::OnRenameConfiguration( wxCommandEvent& event )
224{
225 // Replace with custom code
226 event.Skip();
227}
228
229/*!
230 * Update event handler for ID_RENAME_CONFIGURATION
231 */
232
233void ctConfigurationBrowserControlPanel::OnUpdateRenameConfiguration( wxUpdateUIEvent& event )
234{
235 // Replace with custom code
236 event.Skip();
237}
238
239/*!
240 * Should we show tooltips?
241 */
242
243bool ctConfigurationBrowserControlPanel::ShowToolTips()
244{
245 return TRUE;
246}