]> git.saurik.com Git - wxWidgets.git/blame - samples/xrc/rc/objref.xrc
Line endings fixes in bakefile-generated files.
[wxWidgets.git] / samples / xrc / rc / objref.xrc
CommitLineData
0526c8cc
VZ
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<resource version="2.3.0.1" xmlns="http://www.wxwidgets.org/wxxrc">
3 <object class="wxDialog" name="objref_dialog">
4 <object class="wxFlexGridSizer">
5 <object class="sizeritem">
6 <object class="wxNotebook" name="objref_notebook">
7 <object class="notebookpage">
8 <object class="wxPanel" name="page1">
9 <object class="wxFlexGridSizer">
10 <object class="sizeritem">
11 <object class="wxTextCtrl" name="description_text">
12 <value>This dialog demonstrates the use of object references and ID arrays.\n\nAs you turn the pages of the notebook, you will notice that each has an identical section at the bottom. Instead of writing that section's xml several times, this is done just once, as a wxPanel named 'bottom__panel'. The panel is then added to each page's sizer by the single line: &lt;object__ref ref=&quot;bottom__panel&quot;/&gt;</value>
13 <style>wxTE_MULTILINE|wxTE_READONLY</style>
14 </object>
15 <option>1</option>
16 <flag>wxALL|wxEXPAND</flag>
17 <border>5</border>
18 </object>
19 <object class="sizeritem">
20 <object_ref ref="bottom_panel"/>
21 <flag>wxEXPAND</flag>
22 </object>
23 <cols>1</cols>
24 <rows>0</rows>
25 <vgap>0</vgap>
26 <hgap>10</hgap>
27 <growablecols>0</growablecols>
28 <growablerows>0</growablerows>
29 <growablerows>1</growablerows>
30 </object>
31 </object>
32 <label>Page 1</label>
33 </object>
34 <object class="notebookpage">
35 <object_ref ref="page1"/>
36 <label>Page 1 copy</label>
37 </object>
38 <object class="notebookpage">
39 <object class="wxPanel" name="page2">
40 <object class="wxFlexGridSizer">
41 <object class="sizeritem">
42 <object class="wxTextCtrl" name="description_text">
43 <value>ID ranges are a way to simplify the management of several similar controls, especially their event-handling.\nAn ID range is declared by putting something like this into the XRC file:\n &lt;ids-range name=&quot;check&quot; size=&quot;3&quot; start=&quot;10000&quot; /&gt;\n'size' and 'start' being optional.\n\nIf you then give an item the name 'check[2]', it will be allocated that ID in the range.\n\nBy default the IDs in a range are negative, being assigned by wxWindow::NewControlId. If you wish, you can specify the start of the range; if so, the IDs *must* be positive (and it's your responsibility to avoid clashes, so start above wxID__HIGHEST).</value>
44 <style>wxTE_MULTILINE|wxTE_READONLY</style>
45 </object>
46 <option>1</option>
47 <flag>wxALL|wxEXPAND</flag>
48 <border>5</border>
49 </object>
50 <object class="sizeritem">
51 <object class="wxBoxSizer">
52 <object class="spacer">
53 <option>1</option>
54 <flag>wxLEFT</flag>
55 <border>100</border>
56 </object>
57 <object class="sizeritem">
58 <object class="wxBoxSizer">
59 <object class="sizeritem">
60 <object class="wxStaticText">
61 <label>Uncheck to disable a row</label>
62 </object>
63 </object>
64 <object class="sizeritem">
65 <object_ref ref="checkboxes"/>
66 <flag>wxALIGN_CENTRE</flag>
67 </object>
68 <orient>wxVERTICAL</orient>
69 </object>
70 <flag>wxALIGN_CENTRE_VERTICAL</flag>
71 </object>
72 <orient>wxHORIZONTAL</orient>
73 <object class="spacer">
74 <size>50,-1</size>
75 </object>
76 <object class="sizeritem">
77 <object class="wxStaticBoxSizer">
78 <object class="sizeritem">
79 <object class="wxGridSizer">
80 <object class="sizeritem">
81 <object class="wxStaticBitmap" name="first_row[0]">
82 <bitmap>update.gif</bitmap>
ff1aede6 83 <tooltip>See the tooltip!</tooltip>
0526c8cc
VZ
84 </object>
85 </object>
86 <object class="sizeritem">
87 <object class="wxStaticBitmap" name="first_row[1]">
88 <bitmap>basicdlg.xpm</bitmap>
89 </object>
90 </object>
91 <object class="sizeritem">
92 <object class="wxStaticBitmap" name="first_row[2]">
93 <bitmap>controls.xpm</bitmap>
94 </object>
95 </object>
96 <object class="sizeritem">
97 <object class="wxStaticBitmap" name="second_row[0]">
98 <bitmap>custclas.xpm</bitmap>
99 </object>
100 </object>
101 <object class="sizeritem">
102 <object class="wxStaticBitmap" name="second_row[1]">
103 <bitmap>derivdlg.xpm</bitmap>
104 </object>
105 </object>
106 <object class="sizeritem">
107 <object class="wxStaticBitmap" name="second_row[2]">
108 <bitmap>platform.xpm</bitmap>
109 </object>
110 </object>
111 <object class="sizeritem">
112 <object class="wxStaticBitmap" name="third_row[0]">
113 <bitmap>objrefdlg.xpm</bitmap>
114 </object>
115 </object>
116 <object class="sizeritem">
117 <object class="wxStaticBitmap" name="third_row[1]">
118 <bitmap>uncenter.xpm</bitmap>
119 </object>
120 </object>
121 <object class="sizeritem">
122 <object class="wxStaticBitmap" name="third_row[2]">
123 <bitmap>variable.xpm</bitmap>
124 </object>
125 </object>
126 <rows>3</rows>
127 <vgap>7</vgap>
128 <hgap>7</hgap>
129 </object>
130 <flag>wxALL</flag>
131 <border>3</border>
132 </object>
133 <label>Icons</label>
134 <orient>wxVERTICAL</orient>
135 </object>
136 <flag>wxALIGN_CENTRE_VERTICAL</flag>
137 </object>
138 <object class="spacer">
139 <option>1</option>
140 <flag>wxLEFT</flag>
141 <border>100</border>
142 </object>
143 </object>
144 <flag>wxTOP|wxBOTTOM|wxEXPAND</flag>
145 <border>15</border>
146 </object>
147 <object class="sizeritem">
148 <object_ref ref="bottom_panel"/>
149 <option>1</option>
150 <flag>wxEXPAND</flag>
151 </object>
152 <cols>1</cols>
153 <rows>0</rows>
154 <vgap>0</vgap>
155 <hgap>10</hgap>
156 <growablecols>0</growablecols>
157 <growablerows>0</growablerows>
158 <growablerows>2</growablerows>
159 </object>
160 </object>
161 <label>Icons</label>
162 </object>
163 <object class="notebookpage">
164 <object class="wxPanel" name="page3">
165 <object class="wxFlexGridSizer">
166 <object class="sizeritem">
167 <object class="wxTextCtrl" name="description_text">
168 <value>This not very useful calculator demonstrates some features of ID ranges. One range is defined for the number keys, and another for the operators.\n\nIf you look at the .xrc file, you'll see that I wrote:\n &lt;ids-range name=&quot;digits&quot; size=&quot;8&quot;/&gt;\ncreating that range with a size of 8 (I must have forgotten to count my thumbs). The code will still work, though: the actual number of range items is counted when the file is loaded, and the range extended if necessary to accommodate them. However if the size is too big, it isn't truncated.\n\nAn ID range always has the special items defined: &lt;rangename&gt;[start] and &lt;rangename&gt;[end]. So, for the range 'digits', digits[start] == digits[0], and digits[end] == digits[9]. [end] will always refer to the end of the range, even if there's no object with that ID.\n\nThe digits of the calculator are named 'digits[0]' to 'digits[9]'. Adjacent range items are guaranteed to be assigned consecutive IDs, so code such as this will work as expected:\n for (int n=XRCID(&quot;digits[start]&quot;); n &lt; XRCID(&quot;digits[end]&quot;); ++n) { DoFoo(n); }\nor\n int index = event.GetId() - XRCID(&quot;digits[0]&quot;);</value>
169 <style>wxTE_MULTILINE|wxTE_READONLY</style>
170 </object>
171 <option>1</option>
172 <flag>wxALL|wxEXPAND</flag>
173 <border>5</border>
174 </object>
175 <object class="sizeritem">
176 <object class="wxStaticBoxSizer">
177 <object class="sizeritem">
178 <object class="wxGridBagSizer">
179 <object class="sizeritem">
180 <object class="wxButton" name="digits[7]">
181 <label>7</label>
182 <style>wxBU_EXACTFIT</style>
183 </object>
184 <flag>wxEXPAND</flag>
185 <cellpos>0,0</cellpos>
186 </object>
187 <object class="sizeritem">
188 <object class="wxButton" name="digits[8]">
189 <label>8</label>
190 <style>wxBU_EXACTFIT</style>
191 </object>
192 <flag>wxEXPAND</flag>
193 <cellpos>0,1</cellpos>
194 </object>
195 <object class="sizeritem">
196 <object class="wxButton" name="digits[9]">
197 <label>9</label>
198 <style>wxBU_EXACTFIT</style>
199 </object>
200 <flag>wxEXPAND</flag>
201 <cellpos>0,2</cellpos>
202 </object>
203 <object class="sizeritem">
204 <object class="wxButton" name="operators[3]">
205 <label>/</label>
206 <style>wxBU_EXACTFIT</style>
207 </object>
208 <flag>wxEXPAND</flag>
209 <cellpos>0,3</cellpos>
210 </object>
211 <object class="sizeritem">
212 <object class="wxButton" name="digits[4]">
213 <label>4</label>
214 <style>wxBU_EXACTFIT</style>
215 </object>
216 <flag>wxEXPAND</flag>
217 <cellpos>1,0</cellpos>
218 </object>
219 <object class="sizeritem">
220 <object class="wxButton" name="digits[5]">
221 <label>5</label>
222 <style>wxBU_EXACTFIT</style>
223 </object>
224 <flag>wxEXPAND</flag>
225 <cellpos>1,1</cellpos>
226 </object>
227 <object class="sizeritem">
228 <object class="wxButton" name="digits[6]">
229 <label>6</label>
230 <style>wxBU_EXACTFIT</style>
231 </object>
232 <flag>wxEXPAND</flag>
233 <cellpos>1,2</cellpos>
234 </object>
235 <object class="sizeritem">
236 <object class="wxButton" name="operators[2]">
237 <label>X</label>
238 <style>wxBU_EXACTFIT</style>
239 </object>
240 <flag>wxEXPAND</flag>
241 <cellpos>1,3</cellpos>
242 </object>
243 <object class="sizeritem">
244 <object class="wxButton" name="digits[1]">
245 <label>1</label>
246 <style>wxBU_EXACTFIT</style>
247 </object>
248 <flag>wxEXPAND</flag>
249 <cellpos>2,0</cellpos>
250 </object>
251 <object class="sizeritem">
252 <object class="wxButton" name="digits[2]">
253 <label>2</label>
254 <style>wxBU_EXACTFIT</style>
255 </object>
256 <flag>wxEXPAND</flag>
257 <cellpos>2,1</cellpos>
258 </object>
259 <object class="sizeritem">
260 <object class="wxButton" name="digits[3]">
261 <label>3</label>
262 <style>wxBU_EXACTFIT</style>
263 </object>
264 <flag>wxEXPAND</flag>
265 <cellpos>2,2</cellpos>
266 </object>
267 <object class="sizeritem">
268 <object class="wxButton" name="operators[1]">
269 <label>-</label>
270 <style>wxBU_EXACTFIT</style>
271 </object>
272 <flag>wxEXPAND</flag>
273 <cellpos>2,3</cellpos>
274 </object>
275 <object class="sizeritem">
276 <object class="wxButton" name="digits[0]">
277 <label>0</label>
278 <style>wxBU_EXACTFIT</style>
279 </object>
280 <flag>wxEXPAND</flag>
281 <cellpos>3,0</cellpos>
282 </object>
283 <object class="sizeritem">
284 <object class="wxButton" name="operators[4]">
285 <label>=</label>
286 <style>wxBU_EXACTFIT</style>
287 </object>
288 <flag>wxEXPAND</flag>
289 <cellpos>3,1</cellpos>
290 </object>
291 <object class="sizeritem">
292 <object class="wxButton" name="operators[end]">
293 <label>Cl</label>
294 <style>wxBU_EXACTFIT</style>
295 </object>
296 <flag>wxEXPAND</flag>
297 <cellpos>3,2</cellpos>
298 </object>
299 <object class="sizeritem">
300 <object class="wxButton" name="operators[0]">
301 <label>+</label>
302 <style>wxBU_EXACTFIT</style>
303 </object>
304 <flag>wxEXPAND</flag>
305 <cellpos>3,3</cellpos>
306 </object>
307 <object class="sizeritem">
308 <object class="wxTextCtrl" name="result"/>
309 <flag>wxEXPAND</flag>
310 <cellpos>4,0</cellpos>
311 <cellspan>1,4</cellspan>
312 </object>
313 <vgap>5</vgap>
314 <hgap>5</hgap>
315 </object>
316 <flag>wxALL</flag>
317 <border>5</border>
318 </object>
319 <label>Calculator</label>
320 <orient>wxVERTICAL</orient>
321 </object>
322 <flag>wxTOP|wxALIGN_CENTRE_HORIZONTAL</flag>
323 <border>10</border>
324 </object>
325 <object class="sizeritem">
326 <object_ref ref="bottom_panel"/>
327 <option>1</option>
328 <flag>wxEXPAND</flag>
329 </object>
330 <cols>1</cols>
331 <rows>0</rows>
332 <vgap>0</vgap>
333 <hgap>10</hgap>
334 <growablecols>0</growablecols>
335 <growablerows>0</growablerows>
336 <growablerows>2</growablerows>
337 </object>
338 </object>
339 <label>Calc</label>
340 </object>
341 </object>
342 <option>1</option>
343 <flag>wxGROW|wxALIGN_CENTER_VERTICAL|wxALL</flag>
344 <border>5</border>
345 </object>
346 <object class="sizeritem">
347 <object class="wxButton" name="wxID_OK">
348 <label>OK</label>
349 <default>1</default>
350 </object>
351 <flag>wxTOP|wxBOTTOM|wxALIGN_CENTRE</flag>
352 <border>20</border>
353 </object>
354 <cols>1</cols>
355 <rows>0</rows>
356 <vgap>0</vgap>
357 <hgap>0</hgap>
358 <growablecols>0</growablecols>
359 <growablerows>0</growablerows>
360 </object>
361 <title>Object References and ID Ranges Example</title>
362 <centered>1</centered>
363 <style>wxCAPTION|wxSYSTEM_MENU|wxRESIZE_BORDER</style>
364 <exstyle>wxDIALOG_EX_CONTEXTHELP</exstyle>
365 </object>
366 <object class="wxPanel" name="bottom_panel">
367 <object class="wxBoxSizer">
368 <orient>wxVERTICAL</orient>
369 <object class="sizeritem">
370 <object class="wxStaticLine">
371 <style>wxLI_HORIZONTAL</style>
372 </object>
373 <flag>wxTOP|wxEXPAND</flag>
374 <border>20</border>
375 </object>
376 <object class="sizeritem">
377 <object class="wxStaticText">
378 <label>Log window:</label>
379 </object>
380 <flag>wxTOP</flag>
381 <border>5</border>
382 </object>
383 <object class="sizeritem">
384 <object class="wxTextCtrl" name="log_text">
385 <size>-1,100</size>
386 <style>wxTE_MULTILINE</style>
387 </object>
388 <option>1</option>
389 <flag>wxEXPAND</flag>
390 </object>
391 </object>
392 </object>
393 <object class="wxPanel" name="checkboxes">
394 <object class="wxBoxSizer">
395 <orient>wxVERTICAL</orient>
396 <object class="sizeritem">
397 <object class="wxCheckBox" name="check[0]">
398 <checked>1</checked>
399 </object>
400 </object>
401 <object class="sizeritem">
402 <object class="wxCheckBox" name="check[1]">
403 <checked>1</checked>
404 </object>
405 </object>
406 <object class="sizeritem">
407 <object class="wxCheckBox" name="check[2]">
408 <checked>1</checked>
409 </object>
410 </object>
411 </object>
412 </object>
413 <ids-range name="check" size="3" start="10000"/>
414 <ids-range name="first_row"/>
415 <ids-range name="second_row"/>
416 <ids-range name="third_row"/>
417 <ids-range name="digits" size="8"/>
418 <ids-range name="operators"/>
419</resource>