doxygen warnings and formatting fixes
[wxWidgets.git] / docs / doxygen / overviews / xrc_format.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: xrc_format.h
3 // Purpose: XRC format specification
4 // Author: Vaclav Slavik
5 // RCS-ID: $Id$
6 // Licence: wxWindows license
7 /////////////////////////////////////////////////////////////////////////////
8
9
10 /*
11 NOTE: to make doxygen happy about <custom-tags> we're forced to
12 escape all < and > symbols which appear inside a doxygen comment
13 */
14
15
16 /**
17
18 @page overview_xrcformat XRC file format
19
20 Table of contents:
21 @li @ref overview_xrcformat_overview
22 @li @ref overview_xrcformat_root
23 @li @ref overview_xrcformat_objects
24 @li @ref overview_xrcformat_object
25 @li @ref overview_xrcformat_object_ref
26 @li @ref overview_xrcformat_datatypes
27 @li @ref overview_xrcformat_windows
28 @li @ref overview_xrcformat_std_props
29 @li @ref overview_xrcformat_controls
30 @li @ref overview_xrcformat_sizers
31 @li @ref overview_xrcformat_other_objects
32 @li @ref overview_xrcformat_platform
33 @li @ref overview_xrcformat_extending
34 @li @ref overview_xrcformat_extending_subclass
35 @li @ref overview_xrcformat_extending_unknown
36 @li @ref overview_xrcformat_extending_custom
37 @li @ref overview_xrcformat_packed
38 @li @ref overview_xrcformat_oldversions
39
40 This document describes the format of XRC resource files, as used by wxXmlResource.
41
42
43 <hr>
44
45
46 @section overview_xrcformat_overview Overview
47
48 XRC file is a XML file with all of its elements in the
49 @c http://www.wxwidgets.org/wxxrc namespace. For backward compatibility,
50 @c http://www.wxwindows.org/wxxrc namespace is accepted as well (and treated
51 as identical to @c http://www.wxwidgets.org/wxxrc), but it shouldn't be used
52 in new XRC files.
53
54 XRC file contains definitions for one or more @em objects -- typically
55 windows. The objects may themselves contain child objects.
56
57 Objects defined at the top level, under the
58 @ref overview_xrcformat_root "root element", can be accessed using
59 wxXmlResource::LoadDialog() and other LoadXXX methods. They must have
60 @c name attribute that is used as LoadXXX's argument (see
61 @ref overview_xrcformat_object for details).
62
63 Child objects are not directly accessible via wxXmlResource, they can only
64 be accessed using XRCCTRL().
65
66
67 @section overview_xrcformat_root Root element: \<resource\>
68
69 The root element is always @c \<resource\>. It has one optional attribute, @c
70 version. If set, it specifies version of the file. In absence of @c version
71 attribute, the default is @c "0.0.0.0".
72
73 The version consists of four integers separated by periods. The first three
74 components are major, minor and release number of the wxWidgets release when
75 the change was introduced, the last one is revision number and is 0 for the
76 first incompatible change in given wxWidgets release, 1 for the second and so
77 on. The version changes only if there was an incompatible change introduced;
78 merely adding new kind of objects does not constitute incompatible change.
79
80 At the time of writing, the latest version is @c "2.5.3.0".
81
82 Note that even though @c version attribute is optional, it should always be
83 specified to take advantage of the latest capabilities:
84
85 @code
86 <?xml version="1.0"?>
87 <resource xmlns="http://www.wxwidgets.org/wxxrc" version="2.5.3.0">
88 ...
89 </resource>
90 @endcode
91
92 @c \<resource\> may have arbitrary number of
93 @ref overview_xrcformat_objects "object elements" as its children; they are referred
94 to as @em toplevel objects in the rest of this document. Unlike objects defined
95 deeper in the hierarchy, toplevel objects @em must have their @c name attribute
96 set and it must be set to a value unique among root's children.
97
98
99
100 @section overview_xrcformat_objects Defining objects
101
102 @subsection overview_xrcformat_object \<object\>
103
104 The @c \<object\> element represents a single object (typically a GUI element)
105 and it usually maps directly to a wxWidgets class instance. It has one
106 mandatory attribute, @c class, and optional @c name and @c subclass attributes.
107
108 The @c class attribute must always be present, it tells XRC what wxWidgets
109 object should be created and by which wxXmlResourceHandler.
110
111 @c name is the identifier used to identify the object. This name serves three
112 purposes:
113
114 -# It is used by wxXmlResource's various LoadXXX() methods to find the
115 resource by name passed as argument.
116 -# wxWindow's name (see wxWindow::GetName()) is set to it.
117 -# Numeric ID of a window or menu item is derived from the name.
118 If the value represents an integer (in decimal notation), it is used for
119 the numeric ID unmodified. If it is one of the wxID_XXX literals defined
120 by wxWidgets (see @ref page_stockitems), its respective value is used.
121 Otherwise, the name is transformed into dynamically generated ID. See
122 wxXmlResource::GetXRCID() for more information.
123
124 Name attributes must be unique at the top level (where the name is used to
125 load resources) and should be unique among all controls within the same
126 toplevel window (wxDialog, wxFrame).
127
128 The @c subclass attribute optional name of class whose constructor will be
129 called instead of the constructor for "class".
130 See @ref overview_xrcformat_extending_subclass for more details.
131
132 @c \<object\> element may -- and almost always do -- have children elements.
133 These come in two varieties:
134
135 -# Object's properties. A @em property is a value describing part of object's
136 behaviour, for example the "label" property on wxButton defines its label.
137 In the most common form, property is a single element with text content
138 ("<label>Cancel</label>"), but they may use nested subelements too (e.g.
139 @ref overview_xrcformat_type_font "font property"). A property can only be
140 listed once in an object's definition.
141 -# Child objects. Window childs, sizers, sizer items or notebook pages
142 are all examples of child objects. They are represented using nested
143 @c \<object\> elements and are can be repeated more than once. The specifics
144 of which object classes are allowed as children are class-specific and
145 are documented below in @ref overview_xrcformat_controls.
146
147 Example:
148 @code
149 <object class="wxDialog" name="example_dialog">
150 <!-- properties: -->
151 <title>Non-Derived Dialog Example</title>
152 <centered>1</centered>
153 <!-- child objects: -->
154 <object class="wxBoxSizer">
155 <orient>wxVERTICAL</orient>
156 <cols>1</cols>
157 <rows>0</rows>
158 ...
159 </object>
160 </object>
161 @endcode
162
163
164 @subsection overview_xrcformat_object_ref \<object_ref\>
165
166 Anywhere an @c \<object\> element can be used, @c \<object_ref\> may be used
167 instead. @c \<object_ref\> is a @em reference to another named (i.e. with the
168 @c name attribute) @c \<object\> element. It has one mandatory attribute,
169 @c ref, with value containing the name of a named @c \<object\> element. When an
170 @c \<object_ref\> is encountered, a copy of the referenced @c \<object\> element
171 is made in place of @c \<object_ref\> occurrence and processed as usual.
172
173 For example, the following code:
174 @code
175 <object class="wxDialog" name="my_dlg">
176 ...
177 </object>
178 <object_ref name="my_dlg_alias" ref="my_dlg"/>
179 @endcode
180 is equivalent to
181 @code
182 <object class="wxDialog" name="my_dlg">
183 ...
184 </object>
185 <object class="wxDialog" name="my_dlg_alias">
186 ... <!-- same as in my_dlg -->
187 </object>
188 @endcode
189
190 Additionally, it is possible to override some parts of the referenced object
191 in the @c \<object_ref\> pointing to it. This is useful for putting repetitive
192 parts of XRC definitions into a template that can be reused and customized in
193 several places. The two parts are merged as follows:
194
195 -# The referred object is used as the initial content.
196 -# All attributes set on @c \<object_ref\> are added to it.
197 -# All child elements of @c \<object_ref\> are scanned. If an element with
198 the same name (and, if specified, the @c name attribute too) is found
199 in the referred object, they are recursively merged.
200 -# Child elements in @c \<object_ref\> that do not have a match in the referred
201 object are appended to the list of children of the resulting element by
202 default. Optionally, they may have @c insert_at attribute with two possible
203 values, "begin" or "end". When set to "begin", the element is prepended to
204 the list of children instead of appended.
205
206 For example, "my_dlg" in this snippet:
207 @code
208 <object class="wxDialog" name="template">
209 <title>Dummy dialog</title>
210 <size>400,400</size>
211 </object>
212 <object_ref ref="template" name="my_dlg">
213 <title>My dialog</title>
214 <centered>1</centered>
215 </object>
216 @endcode
217 is identical to:
218 @code
219 <object_ref ref="template" name="my_dlg">
220 <title>My dialog</title>
221 <size>400,400</size>
222 <centered>1</centered>
223 </object>
224 @endcode
225
226
227 @section overview_xrcformat_datatypes Data types
228
229 There are several property data types that are frequently reused by different
230 properties. Rather than describing their format in the documentation of
231 every property, we list commonly used types in this section and document
232 their format.
233
234
235 @subsection overview_xrcformat_type_bool Boolean
236
237 Boolean values are expressed using either "1" literal (true) or "0" (false).
238
239
240 @subsection overview_xrcformat_type_float Floating-point value
241
242 Floating point values use POSIX (C locale) formatting -- decimal separator
243 is "." regardless of the locale.
244
245
246 @subsection overview_xrcformat_type_colour Colour
247
248 Colour specification can be either any string colour representation accepted
249 by wxColour::Set() or any wxSYS_COLOUR_XXX symbolic name accepted by
250 wxSystemSettings::GetColour(). In particular, the following forms are supported:
251
252 @li named colours from wxColourDatabase
253 @li HTML-like "#rrggbb" syntax (but not "#rgb")
254 @li CSS-style "rgb(r,g,b)" and "rgba(r,g,b,a)"
255 @li wxSYS_COLOUR_XXX symbolic names
256
257 Some examples:
258 @code
259 <fg>red</fg>
260 <fg>#ff0000</fg>
261 <fg>rgb(255,0,0)</fg>
262 <fg>wxSYS_COLOUR_HIGHLIGHT</fg>
263 @endcode
264
265
266 @subsection overview_xrcformat_type_size Size
267
268 Sizes and positions have the form of string with two comma-separated integer
269 components, with optional "d" suffix. Semi-formally:
270
271 size := x "," y ["d"]
272
273 where x and y are integers. Either of the components (or both) may be "-1" to
274 signify default value. As a shortcut, empty string is equivalent to "-1,-1"
275 (= wxDefaultSize or wxDefaultPosition).
276
277 When the "d" suffix is used, integer values are interpreted as
278 @ref wxWindow::ConvertDialogToPixels() "dialog units" in the parent window.
279
280 Examples:
281 @code
282 42,-1
283 100,100
284 100,50d
285 @endcode
286
287 @subsection overview_xrcformat_type_pos Position
288
289 Same as @ref overview_xrcformat_type_size.
290
291
292 @subsection overview_xrcformat_type_dimension Dimension
293
294 Similarly to @ref overview_xrcformat_type_size "sizes", dimensions are expressed
295 as integers with optional "d" suffix. When "d" suffix is used, the integer
296 preceding it is interpreted as dialog units in the parent window.
297
298
299 @subsection overview_xrcformat_type_text Text
300
301 String properties use several escape sequences that are translated according to
302 the following table:
303 @beginDefList
304 @itemdef{ "_", "&" (used for accelerators in wxWidgets) }
305 @itemdef{ "__", "_" }
306 @itemdef{ "\n", line break }
307 @itemdef{ "\r", carriage return }
308 @itemdef{ "\t", tab }
309 @itemdef{ "\\", "\" }
310 @endDefList
311
312 By default, the text is translated using wxLocale::GetTranslation() before
313 it is used. This can be disabled either globally by not passing
314 wxXRC_USE_LOCALE to wxXmlResource constructor, or by setting the @c translate
315 attribute on the property node to "0":
316 @code
317 <!-- this is not translated: -->
318 <label translate="0">_Unix</label>
319 <!-- but this is: -->
320 <help>Use Unix-style newlines</help>
321 @endcode
322
323 @note Even though the "_" character is used instead of "&" for accelerators,
324 it is still possible to use "&". The latter has to be encoded as "&amp;",
325 though, so using "_" is more convenient.
326
327 @see @ref overview_xrcformat_pre_v2530, @ref overview_xrcformat_pre_v2301
328
329
330 @subsection overview_xrcformat_type_text_notrans Non-translatable text
331
332 Like @ref overview_xrcformat_type_text, but the text is never translated and
333 @c translate attribute cannot be used.
334
335
336 @subsection overview_xrcformat_type_string URL
337
338 An unformatted string. Unlike with @ref overview_xrcformat_type_text, no escaping
339 or translations are done.
340
341
342 @subsection overview_xrcformat_type_url URL
343
344 Any URL accepted by wxFileSystem (typically relative to XRC file's location,
345 but can be absolute too). Unlike with @ref overview_xrcformat_type_text, no escaping
346 or translations are done.
347
348
349 @subsection overview_xrcformat_type_bitmap Bitmap
350
351 Bitmap properties contain specification of a single bitmap or icon. In the most
352 basic form, their text value is simply a relative filename (or another
353 wxFileSystem URL) of the bitmap to use. For example:
354 @code
355 <object class="tool" name="wxID_NEW">
356 <tooltip>New</tooltip>
357 <bitmap>new.png</bitmap>
358 </object>
359 @endcode
360 The value is interpreted as path relative to the location of XRC file where the
361 reference occurs.
362
363 Alternatively, it is possible to specify the bitmap using wxArtProvider IDs.
364 In this case, the property element has no textual value (filename) and instead
365 has the @c stock_id XML attribute that contains stock art ID as accepted by
366 wxArtProvider::GetBitmap(). This can be either custom value (if the app uses
367 app-specific art provider) or one of the predefined wxART_XXX constants.
368
369 Optionally, @c stock_client attribute may be specified too and contain one of
370 the predefined wxArtClient values. If it is not specified, the default client
371 ID most appropriate in the context where the bitmap is referenced will be used.
372 In most cases, specifying @c stock_client is not needed.
373
374 Examples of stock bitmaps usage:
375 @code
376 <bitmap stock_id="fixed-width"/> <!-- custom app-specific art -->
377 <bitmap stock_id="wxART_FILE_OPEN"/> <!-- standard art -->
378 @endcode
379
380 Specifying the bitmap directly and using @c stock_id are mutually exclusive.
381
382
383 @subsection overview_xrcformat_type_style Style
384
385 Style properties (such as window's style or sizer flags) use syntax similar to
386 C++: the style value is OR-combination of individual flags. Symbolic names
387 identical to those used in C++ code are used for the flags. Flags are separated
388 with "|" (whitespace is allowed but not required around it).
389
390 The flags that are allowed for a given property are context-dependent.
391
392 Examples:
393 @code
394 <style>wxCAPTION|wxSYSTEM_MENU | wxRESIZE_BORDER</style>
395 <exstyle>wxDIALOG_EX_CONTEXTHELP</exstyle>
396 @endcode
397
398
399 @subsection overview_xrcformat_type_font Font
400
401 XRC uses similar, but more flexible, abstract description of fonts to that
402 used by wxFont class. A font can be described either in terms of its elementary
403 properties, or it can be derived from one of system fonts.
404
405 The font property element is "composite" element: unlike majority of
406 properties, it doesn't have text value but contains several child elements
407 instead. These children are handled in the same way as object properties
408 and can be one of the following "sub-properties":
409
410 @beginTable
411 @hdr3col{property, type, description}
412 @row3col{size, unsigned integer,
413 Pixel size of the font (default: wxNORMAL_FONT's size or @c sysfont's
414 size if the @c sysfont property is used.}
415 @row3col{style, enum,
416 One of "normal", "italic" or "slant" (default: normal).}
417 @row3col{weight, enum,
418 One of "normal", "bold" or "light" (default: normal).}
419 @row3col{family, enum,
420 One of "roman", "script", "decorative", "swiss", "modern" or "teletype"
421 (default: roman).}
422 @row3col{underlined, @ref overview_xrcformat_type_bool,
423 Whether the font should be underlined (default: 0).}
424 @row3col{face, ,
425 Comma-separated list of face names; the first one available is used
426 (default: unspecified).}
427 @row3col{encoding, ,
428 Charset of the font, unused in Unicode build), as string
429 (default: unspecified).}
430 @row3col{sysfont, ,
431 Symbolic name of system standard font(one of wxSYS_*_FONT constants).}
432 @row3col{relativesize, float,
433 Float, font size relative to chosen system font's size; can only be
434 used when 'sysfont' is used and when 'size' is not used.}
435 @endTable
436
437 All of them are optional, if they are missing, appropriate wxFont default is
438 used. If the @c sysfont property is used, then the defaults are taken from it
439 instead.
440
441 Examples:
442 @code
443 <font>
444 <!-- fixed font: Arial if available, fall back to Helvetica -->
445 <face>arial,helvetica</face>
446 <size>12</size>
447 </font>
448
449 <font>
450 <!-- enlarged, enboldened standard font: -->
451 <sysfont>wxSYS_DEFAULT_GUI_FONT</sysfont>
452 <weight>bold</weight>
453 <relativesize>1.5</relativesize>
454 </font>
455 @endcode
456
457
458 @section overview_xrcformat_windows Controls and windows
459
460 This section describes support wxWindow-derived classes in XRC format.
461
462 @subsection overview_xrcformat_std_props Standard properties
463
464 The following properties are always (unless stated otherwise in
465 control-specific docs) available for @em windows objects. They are omitted
466 from properties lists below.
467
468 @beginTable
469 @hdr3col{property, type, description}
470 @row3col{pos, @ref overview_xrcformat_type_pos,
471 Initial position of the window (default: wxDefaultPosition).}
472 @row3col{size, @ref overview_xrcformat_type_size,
473 Initial size of the window (default: wxDefaultSize).}
474 @row3col{style, @ref overview_xrcformat_type_style,
475 Window style for this control. The allowed values depend on what
476 window is being created, consult respective class' constructor
477 documentation for details (default: window-dependent default, usually
478 wxFOO_DEFAULT_STYLE if defined for class wxFoo, 0 if not).}
479 @row3col{exstyle, @ref overview_xrcformat_type_style,
480 Extra style for the window, if any. See wxWindow::SetExtraStyle()
481 (default: not set).}
482 @row3col{fg, @ref overview_xrcformat_type_colour,
483 Foreground colour of the window (default: window's default).}
484 @row3col{bg, @ref overview_xrcformat_type_colour,
485 Background colour of the window (default: window's default).}
486 @row3col{enabled, @ref overview_xrcformat_type_bool,
487 If set to 0, the control is disabled (default: 1).}
488 @row3col{hidden, @ref overview_xrcformat_type_bool,
489 If set to 1, the control is created hidden (default: 0).}
490 @row3col{tooltip, @ref overview_xrcformat_type_text,
491 Tooltip to use for the control (default: not set).}
492 @row3col{font, @ref overview_xrcformat_type_font,
493 Font to use for the control (default: window's default).}
494 @row3col{help, @ref overview_xrcformat_type_text,
495 Context-sensitive help for the control, used by wxHelpProvider
496 (default: not set).}
497 @endTable
498
499 All of these properties are optional.
500
501
502 @subsection overview_xrcformat_controls Supported controls
503
504 This section lists all controls supported by default. For each control, its
505 control-specific properties are listed. If the control can have child objects,
506 it is documented there too; unless said otherwise, XRC elements for these
507 controls cannot have children.
508
509 @subsubsection xrc_wxanimationctrl wxAnimationCtrl
510
511 @beginTable
512 @hdr3col{property, type, description}
513 @row3col{animation, @ref overview_xrcformat_type_url,
514 Animation file to load into the control (required).}
515 @endTable
516
517
518 @subsubsection xrc_wxbitmapbutton wxBitmapButton
519
520 @beginTable
521 @hdr3col{property, type, description}
522 @row3col{default, @ref overview_xrcformat_type_bool,
523 Should this button be the default button in dialog (default: 0)?}
524 @row3col{bitmap, @ref overview_xrcformat_type_bitmap,
525 Bitmap to show on the button (required).}
526 @row3col{selected, @ref overview_xrcformat_type_bitmap,
527 Bitmap to show when the button is selected (default: none, same as @c bitmap).}
528 @row3col{focus, @ref overview_xrcformat_type_bitmap,
529 Bitmap to show when the button has focus (default: none, same as @c bitmap).}
530 @row3col{disabled, @ref overview_xrcformat_type_bitmap,
531 Bitmap to show when the button is disabled (default: none, same as @c bitmap).}
532 @row3col{hover, @ref overview_xrcformat_type_bitmap,
533 Bitmap to show when mouse cursor hovers above the bitmap (default: none, same as @c bitmap).}
534 @endTable
535
536
537 @subsubsection xrc_wxbitmapcombobox wxBitmapComboBox
538
539 @beginTable
540 @hdr3col{property, type, description}
541 @row3col{selection, integer,
542 Index of the initially selected item or -1 for no selection (default: -1).}
543 @row3col{value, @ref overview_xrcformat_type_string,
544 Initial value in the control (doesn't have to be one of @ content values;
545 default: empty).}
546 @endTable
547
548 If both @c value and @c selection are specified and @c selection is not -1,
549 then @c selection takes precedence.
550
551 A wxBitmapComboBox can have one or more child objects of the @c ownerdrawnitem
552 pseudo-class. @c ownerdrawnitem objects have the following properties:
553
554 @beginTable
555 @hdr3col{property, type, description}
556 @row3col{text, @ref overview_xrcformat_type_text,
557 Item's label (required).}
558 @row3col{bitmap, @ref overview_xrcformat_type_bitmap,
559 Item's bitmap (default: no bitmap).}
560 @endTable
561
562 Example:
563 @code
564 <object class="wxBitmapComboBox">
565 <selection>1</selection>
566 <object class="ownerdrawnitem">
567 <text>Foo</text>
568 <bitmap>foo.png</bitmap>
569 </object>
570 <object class="ownerdrawnitem">
571 <text>Bar</text>
572 <bitmap>bar.png</bitmap>
573 </object>
574 </object>
575 @endcode
576
577
578 @subsubsection xrc_wxbutton wxButton
579
580 @beginTable
581 @hdr3col{property, type, description}
582 @row3col{label, @ref overview_xrcformat_type_text,
583 Label to display on the button (required).}
584 @row3col{default, @ref overview_xrcformat_type_bool,
585 Should this button be the default button in dialog (default: 0)?}
586 @endTable
587
588
589 @subsubsection xrc_wxcalendarctrl wxCalendarCtrl
590
591 No additional properties.
592
593
594 @subsubsection xrc_wxcheckbox wxCheckBox
595
596 @beginTable
597 @hdr3col{property, type, description}
598 @row3col{label, @ref overview_xrcformat_type_text,
599 Label to use for the checkbox (required).}
600 @row3col{checked, @ref overview_xrcformat_type_bool,
601 Should the checkbox be checked initially (default: 0)?}
602 @endTable
603
604
605 @subsubsection xrc_wxchecklistbox wxCheckListBox
606
607 @beginTable
608 @hdr3col{property, type, description}
609 @row3col{content, ,
610 Content of the control; this property has any number of @c \<item\> XML
611 elements as its children, with the items text as their text values
612 (default: empty).}
613 @endTable
614
615 The @c \<item\> elements have listbox items' labels as their text values. They
616 can also have optional @c checked XML attribute -- if set to "1", the value is
617 initially checked.
618
619 Example:
620 @code
621 <object class="wxCheckListBox">
622 <content>
623 <item checked="1">Download library</item>
624 <item checked="1">Compile samples</item>
625 <item checked="1">Skim docs</item>
626 <item checked="1">Finish project</item>
627 <item>Wash car</item>
628 </content>
629 </object>
630 @endcode
631
632
633 @subsubsection xrc_wxchoice wxChoice
634
635 @beginTable
636 @hdr3col{property, type, description}
637 @row3col{selection, integer,
638 Index of the initially selected item or -1 for no selection (default: -1).}
639 @row3col{content, ,
640 Content of the control; this property has any number of @c \<item\> XML
641 elements as its children, with the items text as their text values
642 (default: empty).}
643 @endTable
644
645 Example:
646 @code
647 <object class="wxChoice" name="controls_choice">
648 <content>
649 <item>See</item>
650 <item>Hear</item>
651 <item>Feel</item>
652 <item>Smell</item>
653 <item>Taste</item>
654 <item>The Sixth Sense!</item>
655 </content>
656 </object>
657 @endcode
658
659
660 @subsubsection xrc_wxchoicebook wxChoicebook
661
662 No additional properties.
663
664 A choicebook can have one or more child objects of the @c choicebookpage
665 pseudo-class (similarly to @ref xrc_wxnotebook "wxNotebook" and its
666 @c notebookpage). @c choicebookpage objects have the following properties:
667
668 @beginTable
669 @hdr3col{property, type, description}
670 @row3col{label, @ref overview_xrcformat_type_text,
671 Sheet page's title (required).}
672 @row3col{bitmap, @ref overview_xrcformat_type_bitmap,
673 Bitmap shown alongside the label (default: none).}
674 @row3col{selected, @ref overview_xrcformat_type_bool,
675 Is the page selected initially (only one page can be selected; default: 0)?}
676 @endTable
677
678 Each @c choicebookpage has exactly one non-toplevel window as its child.
679
680
681 @subsubsection xrc_wxcollapsiblepane wxCollapsiblePane
682
683 @beginTable
684 @hdr3col{property, type, description}
685 @row3col{label, @ref overview_xrcformat_type_text,
686 Label to use for the collapsible section (required).}
687 @row3col{collapsed, @ref overview_xrcformat_type_bool,
688 Should the pane be collapsed initially (default: 0)?}
689 @endTable
690
691 wxCollapsiblePane may contain single optional child object of the @c panewindow
692 pseudo-class type. @c panewindow itself must contain exactly one child that
693 is a @ref overview_xrcformat_sizers "sizer" or a non-toplevel window
694 object.
695
696
697 @subsubsection xrc_wxcolourpickerctrl wxColourPickerCtrl
698
699 @beginTable
700 @hdr3col{property, type, description}
701 @row3col{value, @ref overview_xrcformat_type_colour,
702 Initial value of the control (default: wxBLACK).}
703 @endTable
704
705
706 @subsubsection xrc_wxcombobox wxComboBox
707
708 @beginTable
709 @hdr3col{property, type, description}
710 @row3col{selection, integer,
711 Index of the initially selected item or -1 for no selection (default: not used).}
712 @row3col{content, ,
713 Content of the control; this property has any number of @c \<item\> XML
714 elements as its children, with the items text as their text values
715 (default: empty).}
716 @row3col{value, @ref overview_xrcformat_type_string,
717 Initial value in the control (doesn't have to be one of @ content values;
718 default: empty).}
719 @endTable
720
721 If both @c value and @c selection are specified and @c selection is not -1,
722 then @c selection takes precedence.
723
724 Example:
725 @code
726 <object class="wxComboBox" name="controls_combobox">
727 <style>wxCB_DROPDOWN</style>
728 <value>nedit</value>
729 <content>
730 <item>vim</item>
731 <item>emacs</item>
732 <item>notepad.exe</item>
733 <item>bbedit</item>
734 </content>
735 </object>
736 @endcode
737
738 @subsubsection xrc_wxdatepickerctrl wxDatePickerCtrl
739
740 No additional properties.
741
742
743 @subsubsection xrc_wxdialog wxDialog
744
745 @beginTable
746 @hdr3col{property, type, description}
747 @row3col{title, @ref overview_xrcformat_type_text,
748 Dialog's title (default: empty).}
749 @row3col{icon, @ref overview_xrcformat_type_bitmap,
750 Dialog's icon (default: not used).}
751 @row3col{centered, @ref overview_xrcformat_type_bool,
752 Whether the dialog should be centered on the screen (default: 0).}
753 @endTable
754
755 wxDialog may have optional children: either exactly one
756 @ref overview_xrcformat_sizers "sizer" child or any number of non-toplevel window
757 objects. If sizer child is used, it sets
758 @ref wxSizer::SetSizeHints() "size hints" too.
759
760 @subsubsection xrc_wxdirpickerctrl wxDirPickerCtrl
761
762 @beginTable
763 @hdr3col{property, type, description}
764 @row3col{value, @ref overview_xrcformat_type_string,
765 Initial value of the control (default: empty).}
766 @row3col{message, @ref overview_xrcformat_type_text,
767 Message shown to the user in wxDirDialog shown by the control (required).}
768 @endTable
769
770
771 @subsubsection xrc_wxfilepickerctrl wxFilePickerCtrl
772
773 @beginTable
774 @hdr3col{property, type, description}
775 @row3col{value, @ref overview_xrcformat_type_string,
776 Initial value of the control (default: empty).}
777 @row3col{message, @ref overview_xrcformat_type_text,
778 Message shown to the user in wxDirDialog shown by the control (required).}
779 @row3col{wildcard, @ref overview_xrcformat_type_string,
780 Message shown to the user in wxDirDialog shown by the control (required).}
781 @endTable
782
783
784 @subsubsection xrc_wxfontpickerctrl wxFontPickerCtrl
785
786 @beginTable
787 @hdr3col{property, type, description}
788 @row3col{value, @ref overview_xrcformat_type_font,
789 Initial value of the control (default: wxNORMAL_FONT).}
790 @endTable
791
792 @subsubsection xrc_wxfrane wxFrame
793
794 @beginTable
795 @hdr3col{property, type, description}
796 @row3col{title, @ref overview_xrcformat_type_text,
797 Frame's title (default: empty).}
798 @row3col{icon, @ref overview_xrcformat_type_bitmap,
799 Frame's icon (default: not used).}
800 @row3col{centered, @ref overview_xrcformat_type_bool,
801 Whether the frame should be centered on the screen (default: 0).}
802 @endTable
803
804 wxFrame may have optional children: either exactly one
805 @ref overview_xrcformat_sizers "sizer" child or any number of non-toplevel window
806 objects. If sizer child is used, it sets
807 @ref wxSizer::SetSizeHints() "size hints" too.
808
809
810 @subsubsection xrc_wxgauge wxGauge
811
812 @beginTable
813 @hdr3col{property, type, description}
814 @row3col{range, integer,
815 Maximum value of the gauge (default: 100).}
816 @row3col{value, integer,
817 Initial value of the control (default: 0).}
818 @row3col{shadow, @ref overview_xrcformat_type_dimension,
819 Rendered shadow size (default: none; ignored by most platforms).}
820 @row3col{bezel, @ref overview_xrcformat_type_dimension,
821 Rendered bezel size (default: none; ignored by most platforms).}
822 @endTable
823
824 @subsubsection xrc_wxgenericdirctrl wxGenericDirCtrl
825
826 @beginTable
827 @hdr3col{property, type, description}
828 @row3col{defaultfolder, @ref overview_xrcformat_type_text,
829 Initial folder (default: empty).}
830 @row3col{filter, @ref overview_xrcformat_type_text,
831 Filter string, using the same syntax as used by wxFileDialog, e.g.
832 "All files (*.*)|*.*|JPEG files (*.jpg)|*.jpg" (default: empty).}
833 @row3col{defaultfilter, integer,
834 Zero-based index of default filter (default: 0).}
835 @endTable
836
837 @subsubsection xrc_wxgrid wxGrid
838
839 No additional properties.
840
841
842 @subsubsection xrc_wxhtmlwindow wxHtmlWindow
843
844 @beginTable
845 @hdr3col{property, type, description}
846 @row3col{url, @ref overview_xrcformat_type_url,
847 Page to display in the window.}
848 @row3col{htmlcode, @ref overview_xrcformat_type_text,
849 HTML markup to display in the window.}
850 @row3col{borders, @ref overview_xrcformat_type_dimension,
851 Border around HTML content (default: 0).}
852 @endTable
853
854 At most one of @c url and @c htmlcode properties may be specified, they are
855 mutually exclusive. If neither is set, the window is initialized to show empty
856 page.
857
858
859 @subsubsection xrc_wxhyperlinkctrl wxHyperlinkCtrl
860
861 @beginTable
862 @hdr3col{property, type, description}
863 @row3col{label, @ref overview_xrcformat_type_text,
864 Label to display on the control (required).}
865 @row3col{url, @ref overview_xrcformat_type_url,
866 URL to open when the link is clicked (required).}
867 @endTable
868
869
870 @subsubsection xrc_wxlistbox wxListBox
871
872 @beginTable
873 @hdr3col{property, type, description}
874 @row3col{selection, integer,
875 Index of the initially selected item or -1 for no selection (default: -1).}
876 @row3col{content, ,
877 Content of the control; this property has any number of @c \<item\> XML
878 elements as its children, with the items text as their text values
879 (default: empty).}
880 @endTable
881
882 Example:
883 @code
884 <object class="wxListBox" name="controls_listbox">
885 <size>250,160</size>
886 <style>wxLB_SINGLE</style>
887 <content>
888 <item>Milk</item>
889 <item>Pizza</item>
890 <item>Bread</item>
891 <item>Orange juice</item>
892 <item>Paper towels</item>
893 </content>
894 </object>
895 @endcode
896
897
898 @subsubsection xrc_wxlistbook wxListbook
899
900 No additional properties.
901
902 A listbook can have one or more child objects of the @c listbookpage
903 pseudo-class (similarly to @ref xrc_wxnotebook "wxNotebook" and its
904 @c notebookpage). @c listbookpage objects have the following properties:
905
906 @beginTable
907 @hdr3col{property, type, description}
908 @row3col{label, @ref overview_xrcformat_type_text,
909 Sheet page's title (required).}
910 @row3col{bitmap, @ref overview_xrcformat_type_bitmap,
911 Bitmap shown alongside the label (default: none).}
912 @row3col{selected, @ref overview_xrcformat_type_bool,
913 Is the page selected initially (only one page can be selected; default: 0)?}
914 @endTable
915
916 Each @c listbookpage has exactly one non-toplevel window as its child.
917
918
919 @subsubsection xrc_wxlistctrl wxListCtrl
920
921 No additional properties.
922
923
924 @subsubsection xrc_wxmdiparentframe wxMDIParentFrame
925
926 wxMDIParentFrame supports the same properties that @ref xrc_wxfrane does.
927
928 wxMDIParentFrame may have optional children. When used, the child objects
929 must be of wxMDIChildFrame type.
930
931
932 @subsubsection xrc_wxmdichildframe wxMDIChildFrame
933
934 wxMDIChildFrame supports the same properties that @ref xrc_wxfrane and
935 @ref xrc_wxmdiparentframe do.
936
937 wxMDIChildFrame can only be used as as immediate child of @ref
938 xrc_wxmdiparentframe.
939
940 wxMDIChildFrame may have optional children: either exactly one
941 @ref overview_xrcformat_sizers "sizer" child or any number of non-toplevel window
942 objects. If sizer child is used, it sets
943 @ref wxSizer::SetSizeHints() "size hints" too.
944
945
946 @subsubsection xrc_wxmenu wxMenu
947
948 @beginTable
949 @hdr3col{property, type, description}
950 @row3col{label, @ref overview_xrcformat_type_text,
951 Menu's label (default: empty, but required for menus other
952 than popup menus).}
953 @row3col{help, @ref overview_xrcformat_type_text,
954 Help shown in statusbar when the menu is selected (only for submenus
955 of another wxMenu, default: none).}
956 @row3col{enabled, @ref overview_xrcformat_type_bool,
957 Is the submenu item enabled (only for submenus of another wxMenu,
958 default: 1)?}
959 @endTable
960
961 Note that unlike most controls, wxMenu does @em not have
962 @ref overview_xrcformat_std_props.
963
964 A menu object can have one or more child objects of the wxMenuItem or wxMenu
965 classes or @c break or @c separator pseudo-classes.
966
967 The @c separator pseudo-class is used to insert separators into the menu and
968 has neither properties nor children. Likewise, @c break inserts a break (see
969 wxMenu::Break()).
970
971 wxMenuItem objects support the following properties:
972
973 @beginTable
974 @hdr3col{property, type, description}
975 @row3col{label, @ref overview_xrcformat_type_text,
976 Item's label (required).}
977 @row3col{accel, @ref overview_xrcformat_type_text_notrans,
978 Item's accelerator (default: none).}
979 @row3col{radio, @ref overview_xrcformat_type_bool,
980 Item's kind is wxITEM_RADIO (default: 0)?}
981 @row3col{checkable, @ref overview_xrcformat_type_bool,
982 Item's kind is wxITEM_CHECK (default: 0)?}
983 @row3col{bitmap, @ref overview_xrcformat_type_bitmap,
984 Bitmap to show with the item (default: none).}
985 @row3col{bitmap2, @ref overview_xrcformat_type_bitmap,
986 Bitmap for the checked state (wxMSW, if checkable; default: none).}
987 @row3col{help, @ref overview_xrcformat_type_text,
988 Help shown in statusbar when the item is selected (default: none).}
989 @row3col{enabled, @ref overview_xrcformat_type_bool,
990 Is the item enabled (default: 1)?}
991 @row3col{checked, @ref overview_xrcformat_type_bool,
992 Is the item checked initially (default: 0)?}
993 @endTable
994
995 Example:
996 @code
997 <object class="wxMenu" name="menu_edit">
998 <style>wxMENU_TEAROFF</style>
999 <label>_Edit</label>
1000 <object class="wxMenuItem" name="wxID_FIND">
1001 <label>_Find...</label>
1002 <accel>Ctrl-F</accel>
1003 </object>
1004 <object class="separator"/>
1005 <object class="wxMenuItem" name="menu_fuzzy">
1006 <label>Translation is _fuzzy</label>
1007 <checkable>1</checkable>
1008 </object>
1009 <object class="wxMenu" name="submenu">
1010 <label>A submenu</label>
1011 <object class="wxMenuItem" name="foo">...</object>
1012 ...
1013 </object>
1014 <object class="separator" platform="unix"/>
1015 <object class="wxMenuItem" name="wxID_PREFERENCES" platform="unix">
1016 <label>_Preferences</label>
1017 </object>
1018 </object>
1019 @endcode
1020
1021 @subsubsection xrc_wxmenubar wxMenuBar
1022
1023 No properties. Note that unlike most controls, wxMenuBar does @em not have
1024 @ref overview_xrcformat_std_props.
1025
1026 A menubar can have one or more child objects of the @ref xrc_wxmenu "wxMenu"
1027 class.
1028
1029
1030 @subsubsection xrc_wxnotebook wxNotebook
1031
1032 No additional properties.
1033
1034 A notebook can have one or more child objects of the @c notebookpage
1035 pseudo-class. @c notebookpage objects have the following properties:
1036
1037 @beginTable
1038 @hdr3col{property, type, description}
1039 @row3col{label, @ref overview_xrcformat_type_text,
1040 Page's title (required).}
1041 @row3col{bitmap, @ref overview_xrcformat_type_bitmap,
1042 Bitmap shown alongside the label (default: none).}
1043 @row3col{selected, @ref overview_xrcformat_type_bool,
1044 Is the page selected initially (only one page can be selected; default: 0)?}
1045 @endTable
1046
1047 Each @c notebookpage has exactly one non-toplevel window as its child.
1048
1049 Example:
1050 @code
1051 <object class="wxNotebook">
1052 <style>wxBK_BOTTOM</style>
1053 <object class="notebookpage">
1054 <label>Page 1</label>
1055 <object class="wxPanel" name="page_1">
1056 ...
1057 </object>
1058 </object>
1059 <object class="notebookpage">
1060 <label>Page 2</label>
1061 <object class="wxPanel" name="page_2">
1062 ...
1063 </object>
1064 </object>
1065 </object>
1066 @endcode
1067
1068
1069 @subsubsection xrc_wxownerdrawncombobox wxOwnerDrawnComboBox
1070
1071 wxOwnerDrawnComboBox has the same properties as
1072 @ref xrc_wxcombobox "wxComboBox", plus the following additional properties:
1073
1074 @beginTable
1075 @hdr3col{property, type, description}
1076 @row3col{buttonsize, @ref overview_xrcformat_type_size,
1077 Size of the dropdown button (default: default).}
1078 @endTable
1079
1080
1081 @subsubsection xrc_wxpanel wxPanel
1082
1083 No additional properties.
1084
1085 wxPanel may have optional children: either exactly one
1086 @ref overview_xrcformat_sizers "sizer" child or any number of non-toplevel window
1087 objects.
1088
1089
1090 @subsubsection xrc_wxpropertysheetdialog wxPropertySheetDialog
1091
1092 @beginTable
1093 @hdr3col{property, type, description}
1094 @row3col{title, @ref overview_xrcformat_type_text,
1095 Dialog's title (default: empty).}
1096 @row3col{icon, @ref overview_xrcformat_type_bitmap,
1097 Dialog's icon (default: not used).}
1098 @row3col{centered, @ref overview_xrcformat_type_bool,
1099 Whether the dialog should be centered on the screen (default: 0).}
1100 @row3col{buttons, @ref overview_xrcformat_type_style,
1101 Buttons to show, combination of flags accepted by
1102 wxPropertySheetDialog::CreateButtons() (default: 0).}
1103 @endTable
1104
1105 A sheet dialog can have one or more child objects of the @c propertysheetpage
1106 pseudo-class (similarly to @ref xrc_wxnotebook "wxNotebook" and its
1107 @c notebookpage). @c propertysheetpage objects have the following properties:
1108
1109 @beginTable
1110 @hdr3col{property, type, description}
1111 @row3col{label, @ref overview_xrcformat_type_text,
1112 Sheet page's title (required).}
1113 @row3col{bitmap, @ref overview_xrcformat_type_bitmap,
1114 Bitmap shown alongside the label (default: none).}
1115 @row3col{selected, @ref overview_xrcformat_type_bool,
1116 Is the page selected initially (only one page can be selected; default: 0)?}
1117 @endTable
1118
1119 Each @c propertysheetpage has exactly one non-toplevel window as its child.
1120
1121
1122 @subsubsection xrc_wxradiobutton wxRadioButton
1123
1124 @beginTable
1125 @hdr3col{property, type, description}
1126 @row3col{label, @ref overview_xrcformat_type_text,
1127 Label shown on the radio button (required).}
1128 @row3col{value, @ref overview_xrcformat_type_bool,
1129 Initial value of the control (default: 0).}
1130 @endTable
1131
1132
1133 @subsubsection xrc_wxradiobox wxRadioBox
1134
1135 @beginTable
1136 @hdr3col{property, type, description}
1137 @row3col{label, @ref overview_xrcformat_type_text,
1138 Label for the whole box (required).}
1139 @row3col{dimension, integer,
1140 Specifies the maximum number of rows (if style contains
1141 @c wxRA_SPECIFY_ROWS) or columns (if style contains @c wxRA_SPECIFY_COLS)
1142 for a two-dimensional radiobox (default: 1).}
1143 @row3col{selection, integer,
1144 Index of the initially selected item or -1 for no selection (default: -1).}
1145 @row3col{content, ,
1146 Content of the control; this property has any number of @c \<item\> XML
1147 elements as its children, with the items text as their text values
1148 (see below; default: empty).}
1149 @endTable
1150
1151 The @c \<item\> elements have radio buttons' labels as their text values. They
1152 can also have some optional XML @em attributes (not properties!):
1153
1154 @beginTable
1155 @hdr3col{attribute, type, description}
1156 @row3col{tooltip, @ref overview_xrcformat_type_string,
1157 Tooltip to show over this ratio button (default: none).}
1158 @row3col{helptext, @ref overview_xrcformat_type_string,
1159 Contextual help for this radio button (default: none).}
1160 @row3col{enabled, @ref overview_xrcformat_type_bool,
1161 Is the button enabled (default: 1)?}
1162 @row3col{hidden, @ref overview_xrcformat_type_bool,
1163 Is the button hidden initially (default: 0)?}
1164 @endTable
1165
1166 Example:
1167 @code
1168 <object class="wxRadioBox" name="controls_radiobox">
1169 <style>wxRA_SPECIFY_COLS</style>
1170 <label>Radio stations</label>
1171 <dimension>1</dimension>
1172 <selection>0</selection>
1173 <content>
1174 <item tooltip="Powerful radio station" helptext="This station is for amateurs of hard rock and heavy metal">Power 108</item>
1175 <item tooltip="Disabled radio station" enabled="0">Power 0</item>
1176 <item tooltip="">WMMS 100.7</item>
1177 <item tooltip="E=mc^2">Energy 98.3</item>
1178 <item helptext="Favourite chukcha's radio">CHUM FM</item>
1179 <item>92FM</item>
1180 <item hidden="1">Very quit station</item>
1181 </content>
1182 </object>
1183 @endcode
1184
1185
1186 @subsubsection xrc_wxrichtextctrl wxRichTextCtrl
1187
1188 @beginTable
1189 @hdr3col{property, type, description}
1190 @row3col{value, @ref overview_xrcformat_type_text,
1191 Initial value of the control (default: empty).}
1192 @row3col{maxlength, integer,
1193 Maximum length of the text entered (default: unlimited).}
1194 @endTable
1195
1196
1197 @subsubsection xrc_wxscrollbar wxScrollBar
1198
1199 @beginTable
1200 @hdr3col{property, type, description}
1201 @row3col{value, integer,
1202 Initial position of the scrollbar (default: 0).}
1203 @row3col{range, integer,
1204 Maximum value of the gauge (default: 10).}
1205 @row3col{thumbsize, integer,
1206 Size of the thumb (default: 1).}
1207 @row3col{pagesize, integer,
1208 Page size (default: 1).}
1209 @endTable
1210
1211 @subsubsection xrc_wxscrolledwindow wxScrolledWindow
1212
1213 @beginTable
1214 @hdr3col{property, type, description}
1215 @row3col{scrollrate, @ref overview_xrcformat_type_size,
1216 Scroll rate in @em x and @em y directions (default: not set;
1217 required if the window has a sizer child).}
1218 @endTable
1219
1220 wxScrolledWindow may have optional children: either exactly one
1221 @ref overview_xrcformat_sizers "sizer" child or any number of non-toplevel window
1222 objects. If sizer child is used, wxSizer::FitInside() is used (instead of
1223 wxSizer::Fit() as usual) and so the children don't determine scrolled window's
1224 minimal size, they only affect @em virtual size. Usually, both @c scrollrate
1225 and either @c size or @c minsize on containing sizer item should be used
1226 in this case.
1227
1228
1229 @subsubsection xrc_wxsimplehtmllistbox wxSimpleHtmlListBox
1230
1231 wxSimpleHtmlListBox has same properties as @ref xrc_wxlistbox "wxListBox".
1232 The only difference is that the text contained in @c \<item\> elements is
1233 HTML markup. Note that the markup has to be escaped:
1234
1235 @code
1236 <object class="wxSimpleHtmlListBox">
1237 <content>
1238 <item>&lt;b&gt;Bold&lt;/b&gt; Milk</item>
1239 </content>
1240 </object>
1241 @endcode
1242
1243 (X)HTML markup elements cannot be included directly:
1244
1245 @code
1246 <object class="wxSimpleHtmlListBox">
1247 <content>
1248 <!-- This is incorrect, doesn't work! -->
1249 <item><b>Bold</b> Milk</item>
1250 </content>
1251 </object>
1252 @endcode
1253
1254
1255 @subsubsection xrc_wxslider wxSlider
1256
1257 @beginTable
1258 @hdr3col{property, type, description}
1259 @row3col{value, integer,
1260 Initial value of the control (default: 0).}
1261 @row3col{min, integer,
1262 Minimum allowed value (default: 0).}
1263 @row3col{max, integer,
1264 Maximum allowed value (default: 100).}
1265 @row3col{pagesize, integer,
1266 Line size; number of steps the slider moves when the user moves
1267 pages up or down (default: unset).}
1268 @row3col{linesize, integer,
1269 Line size; number of steps the slider moves when the user moves it
1270 up or down a line (default: unset).}
1271 @row3col{tickfreq, integer,
1272 Tick marks frequency (Windows only; default: unset).}
1273 @row3col{tick, integer,
1274 Tick position (Windows only; default: unset).}
1275 @row3col{thumb, integer,
1276 Thumb length (Windows only; default: unset).}
1277 @row3col{selmin, integer,
1278 Selection start position (Windows only; default: unset).}
1279 @row3col{selmax, integer,
1280 Selection end position (Windows only; default: unset).}
1281 @endTable
1282
1283
1284 @subsubsection xrc_wxspinbutton wxSpinButton
1285
1286 @beginTable
1287 @hdr3col{property, type, description}
1288 @row3col{value, integer,
1289 Initial value of the control (default: 0).}
1290 @row3col{min, integer,
1291 Minimum allowed value (default: 0).}
1292 @row3col{max, integer,
1293 Maximum allowed value (default: 100).}
1294 @endTable
1295
1296
1297 @subsubsection xrc_wxspinctrl wxSpinCtrl
1298
1299 wxSpinCtrl supports the properties as @ref xrc_wxspinbutton.
1300
1301
1302 @subsubsection xrc_wxsplitterwindow wxSplitterWindow
1303
1304 @beginTable
1305 @hdr3col{property, type, description}
1306 @row3col{orientation, @ref overview_xrcformat_type_string,
1307 Orientation of the splitter, either "vertical" or "horizontal" (default: horizontal).}
1308 @row3col{sashpos, integer,
1309 Initial position of the sash (default: 0).}
1310 @row3col{minsize, integer,
1311 Minimum child size (default: not set).}
1312 @row3col{minsize, @ref overview_xrcformat_type_float,
1313 Sash gravity, see wxSplitterWindow::SetSashGravity() (default: not set).}
1314 @endTable
1315
1316 wxSplitterWindow must have one or two children that are non-toplevel window
1317 objects. If there's only one child, it is used as wxSplitterWindow's only
1318 visible child. If there are two children, the first one is used for left/top
1319 child and the second one for right/bottom child window.
1320
1321
1322 @subsubsection xrc_wxsearchctrl wxSearchCtrl
1323
1324 @beginTable
1325 @hdr3col{property, type, description}
1326 @row3col{value, @ref overview_xrcformat_type_text,
1327 Initial value of the control (default: empty).}
1328 @endTable
1329
1330
1331 @subsubsection xrc_wxstatusbar wxStatusBar
1332
1333 @beginTable
1334 @hdr3col{property, type, description}
1335 @row3col{fields, integer,
1336 Number of status bar fields (default: 1).}
1337 @row3col{widths, @ref overview_xrcformat_type_string,
1338 Comma-separated list of @em fields integers. Each value specifies width
1339 of one field; the values are interpreted using the same convention used
1340 by wxStatusBar::SetStatusWidths().}
1341 @row3col{styles, @ref overview_xrcformat_type_string,
1342 Comma-separated list of @em fields flags. Each value specifies status bar
1343 fieldd style and can be one of @c wxSB_NORMAL, @c wxSB_FLAT or
1344 @c wxSB_RAISED. See wxStatusBar::SetStatusStyles() for their description.}
1345 @endTable
1346
1347
1348
1349 @subsubsection xrc_wxstaticbitmap wxStaticBitmap
1350
1351 @beginTable
1352 @hdr3col{property, type, description}
1353 @row3col{bitmap, @ref overview_xrcformat_type_bitmap,
1354 Bitmap to display (required).}
1355 @endTable
1356
1357 @subsubsection xrc_wxstaticbox wxStaticBox
1358
1359 @beginTable
1360 @hdr3col{property, type, description}
1361 @row3col{label, @ref overview_xrcformat_type_text,
1362 Static box's label (required).}
1363 @endTable
1364
1365
1366 @subsubsection xrc_wxstaticline wxStaticLine
1367
1368 No additional properties.
1369
1370
1371 @subsubsection xrc_wxstatictext wxStaticText
1372
1373 @beginTable
1374 @hdr3col{property, type, description}
1375 @row3col{label, @ref overview_xrcformat_type_text,
1376 Label to display (required).}
1377 @row3col{wrap, integer,
1378 Number of characters per line to wrap the text for, see
1379 wxStaticText::Wrap() (default: no wrap).}
1380 @endTable
1381
1382 @subsubsection xrc_wxtextctrl wxTextCtrl
1383
1384 @beginTable
1385 @hdr3col{property, type, description}
1386 @row3col{value, @ref overview_xrcformat_type_text,
1387 Initial value of the control (default: empty).}
1388 @row3col{maxlength, integer,
1389 Maximum length of the text which can be entered by user (default: unlimited).}
1390 @endTable
1391
1392
1393 @subsubsection xrc_wxtogglebuttton wxToggleButton
1394
1395 @beginTable
1396 @hdr3col{property, type, description}
1397 @row3col{label, @ref overview_xrcformat_type_text,
1398 Label to display on the button (required).}
1399 @row3col{checked, @ref overview_xrcformat_type_bool,
1400 Should the button be checked/pressed initially (default: 0)?}
1401 @endTable
1402
1403 @subsubsection xrc_wxtoolbar wxToolBar
1404
1405 @beginTable
1406 @hdr3col{property, type, description}
1407 @row3col{bitmapsize, @ref overview_xrcformat_type_size,
1408 Size of toolbar bitmaps (default: not set).}
1409 @row3col{margins, @ref overview_xrcformat_type_size,
1410 Margins (default: platform default).}
1411 @row3col{packing, integer,
1412 Packing, see wxToolBar::SetToolPacking() (default: not set).}
1413 @row3col{separation, integer,
1414 Default separator size, see wxToolBar::SetToolSeparation() (default: not set).}
1415 @row3col{dontattachtoframe, @ref overview_xrcformat_type_bool,
1416 If set to 0 and the toolbar object is child of a wxFrame,
1417 wxFrame::SetToolBar() is called; otherwise, you have to add it to a frame
1418 manually. The toolbar is attached by default, you have to set this property
1419 to 1 to disable this behaviour (default: 0).}
1420 @endTable
1421
1422 A toolbar can have one or more child objects of any wxControl-derived class or
1423 one of two pseudo-classes: @c separator or @c tool.
1424
1425 The @c separator pseudo-class is used to insert separators into the toolbar and
1426 has neither properties nor children.
1427
1428 The @c tool pseudo-class objects specify toolbar buttons and have the following
1429 properties:
1430
1431 @beginTable
1432 @hdr3col{property, type, description}
1433 @row3col{bitmap, @ref overview_xrcformat_type_bitmap,
1434 Tool's bitmap (required).}
1435 @row3col{bitmap2, @ref overview_xrcformat_type_bitmap,
1436 Bitmap for disabled tool (default: derived from @c bitmap).}
1437 @row3col{label, @ref overview_xrcformat_type_text,
1438 Label to display on the tool (default: no label).}
1439 @row3col{radio, @ref overview_xrcformat_type_bool,
1440 Item's kind is wxITEM_RADIO (default: 0)?}
1441 @row3col{toggle, @ref overview_xrcformat_type_bool,
1442 Item's kind is wxITEM_CHECK (default: 0)?}
1443 @row3col{tooltip, @ref overview_xrcformat_type_text,
1444 Tooltip to use for the tool (default: none).}
1445 @row3col{longhelp, @ref overview_xrcformat_type_text,
1446 Help text shown in statusbar when the mouse is on the tool (default: none).}
1447 @row3col{disabled, @ref overview_xrcformat_type_bool,
1448 Is the tool initially disabled (default: 0)?}
1449 @endTable
1450
1451 @c radio and @c toggle are mutually exclusive.
1452
1453 Children that are neither @c tool nor @c separator must be instances of classes
1454 derived from wxControl and are added to the toolbar using
1455 wxToolBar::AddControl().
1456
1457 Example:
1458 @code
1459 <object class="wxToolBar">
1460 <style>wxTB_FLAT|wxTB_NODIVIDER</style>
1461 <object class="tool" name="foo">
1462 <bitmap>foo.png</bitmap>
1463 <label>Foo</label>
1464 </object>
1465 <object class="tool" name="bar">
1466 <bitmap>bar.png</bitmap>
1467 <label>Bar</label>
1468 </object>
1469 <object class="separator"/>
1470 <object class="wxComboBox">
1471 <content>
1472 <item>Just</item>
1473 <item>a combobox</item>
1474 <item>in the toolbar</item>
1475 </content>
1476 </object>
1477 </object>
1478
1479 @endcode
1480
1481
1482 @subsubsection xrc_wxtreectrl wxTreeCtrl
1483
1484 No additional properties.
1485
1486
1487 @subsubsection xrc_wxtreebook wxTreebook
1488
1489 No additional properties.
1490
1491 A treebook can have one or more child objects of the @c treebookpage
1492 pseudo-class (similarly to @ref xrc_wxnotebook "wxNotebook" and its
1493 @c notebookpage). @c treebookpage objects have the following properties:
1494
1495 @beginTable
1496 @hdr3col{property, type, description}
1497 @row3col{depth, integer,
1498 Page's depth in the labels tree (required; see below).}
1499 @row3col{label, @ref overview_xrcformat_type_text,
1500 Sheet page's title (required).}
1501 @row3col{bitmap, @ref overview_xrcformat_type_bitmap,
1502 Bitmap shown alongside the label (default: none).}
1503 @row3col{selected, @ref overview_xrcformat_type_bool,
1504 Is the page selected initially (only one page can be selected; default: 0)?}
1505 @endTable
1506
1507 Each @c treebookpage has exactly one non-toplevel window as its child.
1508
1509 The tree of labels is not described using nested @c treebookpage objects, but
1510 using the @em depth property. Toplevel pages have depth 0, their child pages
1511 have depth 1 and so on. A @c treebookpage's label is inserted as child of
1512 the latest preceding page with depth equal to @em depth-1. For example, this
1513 XRC markup:
1514
1515 @code
1516 <object class="wxTreebook">
1517 ...
1518 <object class="treebookpage">
1519 <depth>0</depth>
1520 <label>Page 1</label>
1521 <object class="wxPanel">...</object>
1522 </object>
1523 <object class="treebookpage">
1524 <depth>1</depth>
1525 <label>Subpage 1A</label>
1526 <object class="wxPanel">...</object>
1527 </object>
1528 <object class="treebookpage">
1529 <depth>2</depth>
1530 <label>Subsubpage 1</label>
1531 <object class="wxPanel">...</object>
1532 </object>
1533 <object class="treebookpage">
1534 <depth>1</depth>
1535 <label>Subpage 1B</label>
1536 <object class="wxPanel">...</object>
1537 </object>
1538 <object class="treebookpage">
1539 <depth>2</depth>
1540 <label>Subsubpage 2</label>
1541 <object class="wxPanel">...</object>
1542 </object>
1543 <object class="treebookpage">
1544 <depth>0</depth>
1545 <label>Page 2</label>
1546 <object class="wxPanel">...</object>
1547 </object>
1548 </object>
1549 @endcode
1550
1551 corresponds to the following tree of labels:
1552
1553 - Page 1
1554 - Subpage 1A
1555 - Subsubpage 1
1556 - Subpage 1B
1557 - Subsubpage 2
1558 - Page 2
1559
1560
1561 @subsubsection xrc_wxwizard wxWizard
1562
1563 @beginTable
1564 @hdr3col{property, type, description}
1565 @row3col{bitmap, @ref overview_xrcformat_type_bitmap,
1566 Bitmap to display on the left side of the wizard (default: none).}
1567 @endTable
1568
1569 A wizard object can have one or more child objects of the wxWizardPage or
1570 wxWizardPageSimple classes. They both support the following properties
1571 (in addition to @ref overview_xrcformat_std_props):
1572
1573 @beginTable
1574 @hdr3col{property, type, description}
1575 @row3col{bitmap, @ref overview_xrcformat_type_bitmap,
1576 Page-specific bitmap (default: none).}
1577 @endTable
1578
1579 wxWizardPageSimple pages are automatically chained together; wxWizardPage pages
1580 transitions must be handled programatically.
1581
1582
1583 @section overview_xrcformat_sizers Sizers
1584
1585 Sizers are handled slightly differently in XRC resources than they are in
1586 wxWindow hierarchy. wxWindow's sizers hierarchy is parallel to the wxWindow
1587 children hieararchy: child windows are children of their parent window and
1588 the sizer (or sizers) form separate hierarchy attached to the window with
1589 wxWindow::SetSizer().
1590
1591 In XRC, the two hierarchies are merged together: sizers are children of other
1592 sizers or windows and they can contain child window objects.
1593
1594 If a sizer is child of a window object in the resource, it must be the only
1595 child and it will be attached to the parent with wxWindow::SetSizer().
1596 Additionally, if the window doesn't have its size explicitly set,
1597 wxSizer::Fit() is used to resize the window. If the parent window is
1598 toplevel window, wxSizer::SetSizeHints() is called to set its hints.
1599
1600 A sizer object can have one or more child objects of one of two pseudo-classes:
1601 @c sizeritem or @c spacer (see @ref overview_xrcformat_wxstddialogbuttonsizer for
1602 an exception). The former specifies an element (another sizer or a window)
1603 to include in the sizer, the latter adds empty space to the sizer.
1604
1605 @c sizeritem objects have exactly one child object: either another sizer
1606 object, or a window object. @c spacer objects don't have any children, but
1607 they have one property:
1608
1609 @beginTable
1610 @hdr3col{property, type, description}
1611 @row3col{size, @ref overview_xrcformat_type_size, Size of the empty space (required).}
1612 @endTable
1613
1614 Both @c sizeritem and @c spacer objects can have any of the following
1615 properties:
1616
1617 @beginTable
1618 @hdr3col{property, type, description}
1619 @row3col{option, integer,
1620 The "option" value for sizers. Used by wxBoxSizer to set proportion of
1621 the item in the growable direction (default: 0).}
1622 @row3col{flag, @ref overview_xrcformat_type_style,
1623 wxSizerItem flags (default: 0).}
1624 @row3col{border, @ref overview_xrcformat_type_dimension,
1625 Size of the border around the item (directions are specified in flags)
1626 (default: 0).}
1627 @row3col{minsize, @ref overview_xrcformat_type_size,
1628 Minimal size of this item (default: no min size).}
1629 @row3col{ratio, @ref overview_xrcformat_type_size,
1630 Item ratio, see wxSizer::SetRatio() (default: no ratio).}
1631 @row3col{cellpos, @ref overview_xrcformat_type_pos,
1632 (wxGridBagSizer only) Position, see wxGBSizerItem::SetPos() (required). }
1633 @row3col{cellspan, @ref overview_xrcformat_type_size,
1634 (wxGridBagSizer only) Span, see wxGBSizerItem::SetSpan() (required). }
1635 @endTable
1636
1637 Example of sizers XRC code:
1638 @code
1639 <object class="wxDialog" name="derived_dialog">
1640 <title>Derived Dialog Example</title>
1641 <centered>1</centered>
1642 <!-- this sizer is set to be this dialog's sizer: -->
1643 <object class="wxFlexGridSizer">
1644 <cols>1</cols>
1645 <rows>0</rows>
1646 <vgap>0</vgap>
1647 <hgap>0</hgap>
1648 <growablecols>0</growablecols>
1649 <growablerows>0</growablerows>
1650 <object class="sizeritem">
1651 <flag>wxALIGN_CENTRE|wxALL</flag>
1652 <border>5</border>
1653 <object class="wxButton" name="my_button">
1654 <label>My Button</label>
1655 </object>
1656 </object>
1657 <object class="sizeritem">
1658 <flag>wxALIGN_CENTRE|wxALL</flag>
1659 <border>5</border>
1660 <object class="wxBoxSizer">
1661 <orient>wxHORIZONTAL</orient>
1662 <object class="sizeritem">
1663 <flag>wxALIGN_CENTRE|wxALL</flag>
1664 <border>5</border>
1665 <object class="wxCheckBox" name="my_checkbox">
1666 <label>Enable this text control:</label>
1667 </object>
1668 </object>
1669 <object class="sizeritem">
1670 <flag>wxALIGN_CENTRE|wxALL</flag>
1671 <border>5</border>
1672 <object class="wxTextCtrl" name="my_textctrl">
1673 <size>80,-1</size>
1674 <value></value>
1675 </object>
1676 </object>
1677 </object>
1678 </object>
1679 ...
1680 </object>
1681 </object>
1682 @endcode
1683
1684 The sizer classes that can be used are listed below, together with their
1685 class-specific properties. All classes support the following properties:
1686
1687 @beginTable
1688 @hdr3col{property, type, description}
1689 @row3col{minsize, @ref overview_xrcformat_type_size,
1690 Minimal size that this sizer will have, see wxSizer::SetMinSize()
1691 (default: no min size).}
1692 @endTable
1693
1694 @subsection overview_xrcformat_wxboxsizer wxBoxSizer
1695
1696 @beginTable
1697 @hdr3col{property, type, description}
1698 @row3col{orient, @ref overview_xrcformat_type_style,
1699 Sizer orientation, "wxHORIZONTAL" or "wxVERTICAL" (default: wxHORIZONTAL).}
1700 @endTable
1701
1702 @subsection overview_xrcformat_wxstaticsboxizer wxStaticBoxSizer
1703
1704 @beginTable
1705 @hdr3col{property, type, description}
1706 @row3col{orient, @ref overview_xrcformat_type_style,
1707 Sizer orientation, "wxHORIZONTAL" or "wxVERTICAL" (default: wxHORIZONTAL).}
1708 @row3col{label, @ref overview_xrcformat_type_text,
1709 Label to be used for the static box around the sizer (required).}
1710 @endTable
1711
1712 @subsection overview_xrcformat_wxgridsizer wxGridSizer
1713
1714 @beginTable
1715 @hdr3col{property, type, description}
1716 @row3col{rows, integer, Number of rows in the grid (required).}
1717 @row3col{cols, integer, Number of columns in the grid (required).}
1718 @row3col{vgap, integer, Vertical gap between children (default: 0).}
1719 @row3col{hgap, integer, Horizontal gap between children (default: 0).}
1720 @endTable
1721
1722 @subsection overview_xrcformat_wxflexgridsizer wxFlexGridSizer
1723
1724 @beginTable
1725 @hdr3col{property, type, description}
1726 @row3col{rows, integer, Number of rows in the grid (required).}
1727 @row3col{cols, integer, Number of columns in the grid (required).}
1728 @row3col{vgap, integer, Vertical gap between children (default: 0).}
1729 @row3col{hgap, integer, Horizontal gap between children (default: 0).}
1730 @row3col{growablerows, comma-separated integers list,
1731 Comma-separated list of indexes of rows that are growable
1732 (default: none).}
1733 @row3col{growablecols, comma-separated integers list,
1734 Comma-separated list of indexes of columns that are growable
1735 (default: none).}
1736 @endTable
1737
1738 @subsection overview_xrcformat_wxgridbagsizer wxGridBagSizer
1739
1740 @beginTable
1741 @hdr3col{property, type, description}
1742 @row3col{vgap, integer, Vertical gap between children (default: 0).}
1743 @row3col{hgap, integer, Horizontal gap between children (default: 0).}
1744 @row3col{growablerows, comma-separated integers list,
1745 Comma-separated list of indexes of rows that are growable
1746 (default: none).}
1747 @row3col{growablecols, comma-separated integers list,
1748 Comma-separated list of indexes of columns that are growable
1749 (default: none).}
1750 @endTable
1751
1752 @subsection overview_xrcformat_wxwrapsizer wxWrapSizer
1753
1754 @beginTable
1755 @hdr3col{property, type, description}
1756 @row3col{orient, @ref overview_xrcformat_type_style,
1757 Sizer orientation, "wxHORIZONTAL" or "wxVERTICAL" (required).}
1758 @row3col{flag, @ref overview_xrcformat_type_style, wxWrapSizer flags (default: 0).}
1759 @endTable
1760
1761 @subsection overview_xrcformat_wxstddialogbuttonsizer wxStdDialogButtonSizer
1762
1763 Unlike other sizers, wxStdDialogButtonSizer doesn't have neither @c sizeritem
1764 nor @c spacer children. Instead, it has one or more children of the
1765 @c button pseudo-class. @c button objects have no properties and they must
1766 always have exactly one child of the @c wxButton class or a class derived from
1767 wxButton.
1768
1769 Example:
1770 @code
1771 <object class="wxStdDialogButtonSizer">
1772 <object class="button">
1773 <object class="wxButton" name="wxID_OK">
1774 <label>OK</label>
1775 </object>
1776 </object>
1777 <object class="button">
1778 <object class="wxButton" name="wxID_CANCEL">
1779 <label>Cancel</label>
1780 </object>
1781 </object>
1782 </object>
1783 @endcode
1784
1785
1786
1787 @section overview_xrcformat_other_objects Other objects
1788
1789 In addition to describing UI elements, XRC files can contain non-windows
1790 objects such as bitmaps or icons. This is a concession to Windows developers
1791 used to storing them in Win32 resources.
1792
1793 Note that unlike Win32 resources, bitmaps included in XRC files are @em not
1794 embedded in the XRC file itself. XRC file only contains a reference to another
1795 file with bitmap data.
1796
1797 @subsection overview_xrcformat_bitmap wxBitmap
1798
1799 Bitmaps are stored in @c \<object\> element with class set to @c wxBitmap. Such
1800 bitmaps can then be loaded using wxXmlResource::LoadBitmap(). The content of
1801 the element is exactly same as in the case of
1802 @ref overview_xrcformat_type_bitmap "bitmap properties", except that toplevel
1803 @c \<object\> is used.
1804
1805 For example, instead of:
1806 @code
1807 <bitmap>mybmp.png</bitmap>
1808 <bitmap stock_id="wxART_NEW"/>
1809 @endcode
1810 toplevel wxBitmap resources would look like:
1811 @code
1812 <object class="wxBitmap" name="my_bitmap">mybmp.png</object>
1813 <object class="wxBitmap" name="my_new_bitmap" stock_id="wxART_NEW"/>
1814 @endcode
1815
1816
1817 @subsection overview_xrcformat_icon wxIcon
1818
1819 wxIcon resources are identical to @ref overview_xrcformat_bitmap "wxBitmap ones",
1820 except that the class is @c wxIcon.
1821
1822
1823 @section overview_xrcformat_platform Platform specific content
1824
1825 It is possible to conditionally process parts of XRC files on some platforms
1826 only and ignore them on other platforms. @em Any element in XRC file, be it
1827 toplevel or arbitrarily nested one, can have the @c platform attribute. When
1828 used, @c platform contains |-separated list of platforms that this element
1829 should be processed on. It is filtered out and ignored on any other platforms.
1830
1831 Possible elemental values are:
1832 @beginDefList
1833 @itemdef{ @c win, Windows }
1834 @itemdef{ @c mac, Mac OS X (or Mac Classic in wxWidgets version supporting it }
1835 @itemdef{ @c unix, Any Unix platform @em except OS X }
1836 @itemdef{ @c os2, OS/2 }
1837 @endDefList
1838
1839 Examples:
1840 @code
1841 <label platform="win">Windows</label>
1842 <label platform="unix">Unix</label>
1843 <label platform="mac">Mac OS X</label>
1844 <help platform="mac|unix">Not a Windows machine</help>
1845 @endcode
1846
1847
1848
1849 @section overview_xrcformat_extending Extending XRC format
1850
1851 The XRC format is designed to be extensible and allows specifying and loading
1852 custom controls. The three available mechanisms are described in the rest of
1853 this section in the order of increasing complexity.
1854
1855 @subsection overview_xrcformat_extending_subclass Subclassing
1856
1857 The simplest way to add custom controls is to set the @c subclass attribute
1858 of @c \<object\> element:
1859
1860 @code
1861 <object name="my_value" class="wxTextCtrl" subclass="MyTextCtrl">
1862 <style>wxTE_MULTILINE</style>
1863 ...etc., setup wxTextCtrl as usual...
1864 </object>
1865 @endcode
1866
1867 In that case, wxXmlResource will create an instance of the specified subclass
1868 (@c MyTextCtrl in the example above) instead of the class (@c wxTextCtrl above)
1869 when loading the resource. However, the rest of the object's loading (calling
1870 its Create() method, setting its properties, loading any children etc.)
1871 will proceed in @em exactly the same way as it would without @c subclass
1872 attribute. In other words, this approach is only sufficient when the custom
1873 class is just a small modification (e.g. overridden methods or customized
1874 events handling) of an already supported classes.
1875
1876 The subclass must satisfy a number of requirements:
1877
1878 -# It must be derived from the class specified in @c class attribute.
1879 -# It must be visible in wxWidget's pseudo-RTTI mechanism, i.e. there must be
1880 a DECLARE_DYNAMIC_CLASS() entry for it.
1881 -# It must support two-phase creation. In particular, this means that it has
1882 to have default constructor.
1883 -# It cannot provide custom Create() method and must be constructible using
1884 base @c class' Create() method (this is because XRC will call Create() of
1885 @c class, not @c subclass). In other words, @em creation of the control
1886 must not be customized.
1887
1888
1889 @subsection overview_xrcformat_extending_unknown \<object class="unknown"\>
1890
1891 A more flexible solution is to put a @em placeholder in the XRC file and
1892 replace it with custom control after the resource is loaded. This is done by
1893 using the @c unknown pseudo-class:
1894
1895 @code
1896 <object class="unknown" name="my_placeholder"/>
1897 @endcode
1898
1899 The placeholder is inserted as dummy wxPanel that will hold custom control in
1900 it. At runtime, after the resource is loaded and a window created from it
1901 (using e.g. wxXmlResource::LoadDialog()), use code must call
1902 wxXmlResource::AttachUnknownControl() to insert the desired control into
1903 placeholder container.
1904
1905 This method makes it possible to insert controls that are not known to XRC at
1906 all, but it's also impossible to configure the control in XRC description in
1907 any way. The only properties that can be specified are
1908 the @ref overview_xrcformat_std_props "standard window properties".
1909
1910 @note @c unknown class cannot be combined with @c subclass attribute,
1911 they are mutually exclusive.
1912
1913
1914 @subsection overview_xrcformat_extending_custom Adding custom classes
1915
1916 Finally, XRC allows adding completely new classes in addition to the ones
1917 listed in this document. A class for which wxXmlResourceHandler is implemented
1918 can be used as first-class object in XRC simply by passing class name as the
1919 value of @c class attribute:
1920
1921 @code
1922 <object name="my_ctrl" class="MyWidget">
1923 <my_prop>foo</my_prop>
1924 ...etc., whatever MyWidget handler accepts...
1925 </object>
1926 @endcode
1927
1928 The only requirements on the class are that
1929 -# the class must derive from wxObject
1930 -# it must support wxWidget's pseudo-RTTI mechanism
1931
1932 Child elements of @c \<object\> are handled by the custom handler and there are
1933 no limitations on them imposed by XRC format.
1934
1935 This is the only mechanism that works for toplevel objects -- custom controls
1936 are accessible using type-unsafe wxXmlResource::LoadObject() method.
1937
1938
1939
1940 @section overview_xrcformat_packed Packed XRC files
1941
1942 In addition to plain XRC files, wxXmlResource supports (if wxFileSystem support
1943 is compiled in) compressed XRC resources. Compressed resources have either
1944 .zip or .xrs extension and are simply ZIP files that contain arbitrary
1945 number of XRC files and their dependencies (bitmaps, icons etc.).
1946
1947
1948
1949 @section overview_xrcformat_oldversions Older format versions
1950
1951 This section describes differences in older revisions of XRC format (i.e.
1952 files with older values of @c version attribute of @c \<resource\>).
1953
1954
1955 @subsection overview_xrcformat_pre_v2530 Versions before 2.5.3.0
1956
1957 Version 2.5.3.0 introduced C-like handling of "\\" in text. In older versions,
1958 "\n", "\t" and "\r" escape sequences were replaced with respective characters
1959 in the same matter it's done in C, but "\\" was left intact instead of being
1960 replaced with single "\", as one would expect. Starting with 2.5.3.0, all of
1961 them are handled in C-like manner.
1962
1963
1964 @subsection overview_xrcformat_pre_v2301 Versions before 2.3.0.1
1965
1966 Prior to version 2.3.0.1, "$" was used for accelerators instead of "_"
1967 or "&amp;". For example,
1968 @code
1969 <label>$File</label>
1970 @endcode
1971 was used in place of current version's
1972 @code
1973 <label>_File</label>
1974 @endcode
1975 (or "&amp;File").
1976
1977 */