]> git.saurik.com Git - wxWidgets.git/blame - docs/doxygen/overviews/xrc_format.h
Fix problem with COMDLG_FILTERSPEC declaration with MinGW-w64 4.8.
[wxWidgets.git] / docs / doxygen / overviews / xrc_format.h
CommitLineData
a302d595
VS
1/////////////////////////////////////////////////////////////////////////////
2// Name: xrc_format.h
3// Purpose: XRC format specification
4// Author: Vaclav Slavik
526954c5 5// Licence: wxWindows licence
a302d595
VS
6/////////////////////////////////////////////////////////////////////////////
7
1dfb6ff0
FM
8
9/*
9d9abdbf
BP
10 NOTE: To make doxygen happy about <custom-tags> we're forced to
11 escape all < and > symbols which appear inside a doxygen comment.
12 Also, don't use < and > symbols in section titles.
1dfb6ff0
FM
13*/
14
15
a302d595
VS
16/**
17
9d9abdbf 18@page overview_xrcformat XRC File Format
a302d595 19
831e1028
BP
20@tableofcontents
21
22This document describes the format of XRC resource files, as used by
23wxXmlResource.
a302d595
VS
24
25XRC file is a XML file with all of its elements in the
26@c http://www.wxwidgets.org/wxxrc namespace. For backward compatibility,
27@c http://www.wxwindows.org/wxxrc namespace is accepted as well (and treated
28as identical to @c http://www.wxwidgets.org/wxxrc), but it shouldn't be used
29in new XRC files.
30
31XRC file contains definitions for one or more @em objects -- typically
32windows. The objects may themselves contain child objects.
33
34Objects defined at the top level, under the
41e69d79 35@ref overview_xrcformat_root "root element", can be accessed using
a302d595
VS
36wxXmlResource::LoadDialog() and other LoadXXX methods. They must have
37@c name attribute that is used as LoadXXX's argument (see
41e69d79 38@ref overview_xrcformat_object for details).
a302d595
VS
39
40Child objects are not directly accessible via wxXmlResource, they can only
41be accessed using XRCCTRL().
42
43
831e1028 44
9d9abdbf 45@section overview_xrcformat_root Resource Root Element
a302d595 46
1dfb6ff0 47The root element is always @c \<resource\>. It has one optional attribute, @c
a302d595
VS
48version. If set, it specifies version of the file. In absence of @c version
49attribute, the default is @c "0.0.0.0".
50
51The version consists of four integers separated by periods. The first three
52components are major, minor and release number of the wxWidgets release when
53the change was introduced, the last one is revision number and is 0 for the
54first incompatible change in given wxWidgets release, 1 for the second and so
55on. The version changes only if there was an incompatible change introduced;
56merely adding new kind of objects does not constitute incompatible change.
57
58At the time of writing, the latest version is @c "2.5.3.0".
59
60Note that even though @c version attribute is optional, it should always be
61specified to take advantage of the latest capabilities:
62
63@code
64<?xml version="1.0"?>
65<resource xmlns="http://www.wxwidgets.org/wxxrc" version="2.5.3.0">
66 ...
67</resource>
68@endcode
69
1dfb6ff0 70@c \<resource\> may have arbitrary number of
41e69d79 71@ref overview_xrcformat_objects "object elements" as its children; they are referred
a302d595
VS
72to as @em toplevel objects in the rest of this document. Unlike objects defined
73deeper in the hierarchy, toplevel objects @em must have their @c name attribute
74set and it must be set to a value unique among root's children.
75
76
77
9d9abdbf 78@section overview_xrcformat_objects Defining Objects
a302d595 79
9d9abdbf 80@subsection overview_xrcformat_object Object Element
a302d595 81
1dfb6ff0 82The @c \<object\> element represents a single object (typically a GUI element)
a302d595
VS
83and it usually maps directly to a wxWidgets class instance. It has one
84mandatory attribute, @c class, and optional @c name and @c subclass attributes.
85
86The @c class attribute must always be present, it tells XRC what wxWidgets
87object should be created and by which wxXmlResourceHandler.
88
89@c name is the identifier used to identify the object. This name serves three
90purposes:
91
92 -# It is used by wxXmlResource's various LoadXXX() methods to find the
93 resource by name passed as argument.
94 -# wxWindow's name (see wxWindow::GetName()) is set to it.
95 -# Numeric ID of a window or menu item is derived from the name.
96 If the value represents an integer (in decimal notation), it is used for
97 the numeric ID unmodified. If it is one of the wxID_XXX literals defined
98 by wxWidgets (see @ref page_stockitems), its respective value is used.
99 Otherwise, the name is transformed into dynamically generated ID. See
100 wxXmlResource::GetXRCID() for more information.
101
102Name attributes must be unique at the top level (where the name is used to
103load resources) and should be unique among all controls within the same
104toplevel window (wxDialog, wxFrame).
105
106The @c subclass attribute optional name of class whose constructor will be
107called instead of the constructor for "class".
41e69d79 108See @ref overview_xrcformat_extending_subclass for more details.
a302d595 109
1dfb6ff0 110@c \<object\> element may -- and almost always do -- have children elements.
a302d595
VS
111These come in two varieties:
112
113 -# Object's properties. A @em property is a value describing part of object's
114 behaviour, for example the "label" property on wxButton defines its label.
115 In the most common form, property is a single element with text content
0654158b 116 ("\<label\>Cancel\</label\>"), but they may use nested subelements too (e.g.
41e69d79 117 @ref overview_xrcformat_type_font "font property"). A property can only be
a302d595
VS
118 listed once in an object's definition.
119 -# Child objects. Window childs, sizers, sizer items or notebook pages
120 are all examples of child objects. They are represented using nested
1dfb6ff0 121 @c \<object\> elements and are can be repeated more than once. The specifics
a302d595 122 of which object classes are allowed as children are class-specific and
41e69d79 123 are documented below in @ref overview_xrcformat_controls.
a302d595
VS
124
125Example:
126@code
127<object class="wxDialog" name="example_dialog">
128 <!-- properties: -->
129 <title>Non-Derived Dialog Example</title>
130 <centered>1</centered>
131 <!-- child objects: -->
132 <object class="wxBoxSizer">
133 <orient>wxVERTICAL</orient>
134 <cols>1</cols>
135 <rows>0</rows>
136 ...
137 </object>
138</object>
139@endcode
140
141
9d9abdbf 142@subsection overview_xrcformat_object_ref Object References
a302d595 143
1dfb6ff0
FM
144Anywhere an @c \<object\> element can be used, @c \<object_ref\> may be used
145instead. @c \<object_ref\> is a @em reference to another named (i.e. with the
146@c name attribute) @c \<object\> element. It has one mandatory attribute,
147@c ref, with value containing the name of a named @c \<object\> element. When an
148@c \<object_ref\> is encountered, a copy of the referenced @c \<object\> element
149is made in place of @c \<object_ref\> occurrence and processed as usual.
a302d595
VS
150
151For example, the following code:
152@code
153<object class="wxDialog" name="my_dlg">
154 ...
155</object>
156<object_ref name="my_dlg_alias" ref="my_dlg"/>
157@endcode
158is equivalent to
159@code
160<object class="wxDialog" name="my_dlg">
161 ...
162</object>
163<object class="wxDialog" name="my_dlg_alias">
164 ... <!-- same as in my_dlg -->
165</object>
166@endcode
167
168Additionally, it is possible to override some parts of the referenced object
1dfb6ff0 169in the @c \<object_ref\> pointing to it. This is useful for putting repetitive
a302d595
VS
170parts of XRC definitions into a template that can be reused and customized in
171several places. The two parts are merged as follows:
172
173 -# The referred object is used as the initial content.
1dfb6ff0
FM
174 -# All attributes set on @c \<object_ref\> are added to it.
175 -# All child elements of @c \<object_ref\> are scanned. If an element with
a302d595
VS
176 the same name (and, if specified, the @c name attribute too) is found
177 in the referred object, they are recursively merged.
1dfb6ff0 178 -# Child elements in @c \<object_ref\> that do not have a match in the referred
a302d595
VS
179 object are appended to the list of children of the resulting element by
180 default. Optionally, they may have @c insert_at attribute with two possible
181 values, "begin" or "end". When set to "begin", the element is prepended to
182 the list of children instead of appended.
183
184For example, "my_dlg" in this snippet:
185@code
186<object class="wxDialog" name="template">
187 <title>Dummy dialog</title>
188 <size>400,400</size>
189</object>
190<object_ref ref="template" name="my_dlg">
191 <title>My dialog</title>
192 <centered>1</centered>
8ae52ef8 193</object_ref>
a302d595
VS
194@endcode
195is identical to:
196@code
5fcef184 197<object class="wxDialog" name="my_dlg">
a302d595
VS
198 <title>My dialog</title>
199 <size>400,400</size>
200 <centered>1</centered>
201</object>
202@endcode
203
204
9d9abdbf 205@section overview_xrcformat_datatypes Data Types
a302d595
VS
206
207There are several property data types that are frequently reused by different
208properties. Rather than describing their format in the documentation of
209every property, we list commonly used types in this section and document
210their format.
211
212
41e69d79 213@subsection overview_xrcformat_type_bool Boolean
a302d595
VS
214
215Boolean values are expressed using either "1" literal (true) or "0" (false).
216
217
41e69d79 218@subsection overview_xrcformat_type_float Floating-point value
a302d595
VS
219
220Floating point values use POSIX (C locale) formatting -- decimal separator
221is "." regardless of the locale.
222
223
41e69d79 224@subsection overview_xrcformat_type_colour Colour
a302d595
VS
225
226Colour specification can be either any string colour representation accepted
227by wxColour::Set() or any wxSYS_COLOUR_XXX symbolic name accepted by
228wxSystemSettings::GetColour(). In particular, the following forms are supported:
229
230@li named colours from wxColourDatabase
231@li HTML-like "#rrggbb" syntax (but not "#rgb")
232@li CSS-style "rgb(r,g,b)" and "rgba(r,g,b,a)"
233@li wxSYS_COLOUR_XXX symbolic names
234
235Some examples:
236@code
237<fg>red</fg>
238<fg>#ff0000</fg>
239<fg>rgb(255,0,0)</fg>
240<fg>wxSYS_COLOUR_HIGHLIGHT</fg>
241@endcode
242
243
41e69d79 244@subsection overview_xrcformat_type_size Size
a302d595
VS
245
246Sizes and positions have the form of string with two comma-separated integer
247components, with optional "d" suffix. Semi-formally:
248
249 size := x "," y ["d"]
250
251where x and y are integers. Either of the components (or both) may be "-1" to
252signify default value. As a shortcut, empty string is equivalent to "-1,-1"
253(= wxDefaultSize or wxDefaultPosition).
254
255When the "d" suffix is used, integer values are interpreted as
256@ref wxWindow::ConvertDialogToPixels() "dialog units" in the parent window.
257
258Examples:
259@code
26042,-1
261100,100
262100,50d
263@endcode
264
41e69d79 265@subsection overview_xrcformat_type_pos Position
a302d595 266
41e69d79 267Same as @ref overview_xrcformat_type_size.
a302d595
VS
268
269
41e69d79 270@subsection overview_xrcformat_type_dimension Dimension
a302d595 271
41e69d79 272Similarly to @ref overview_xrcformat_type_size "sizes", dimensions are expressed
a302d595
VS
273as integers with optional "d" suffix. When "d" suffix is used, the integer
274preceding it is interpreted as dialog units in the parent window.
275
276
41e69d79 277@subsection overview_xrcformat_type_text Text
a302d595
VS
278
279String properties use several escape sequences that are translated according to
280the following table:
281@beginDefList
282@itemdef{ "_", "&" (used for accelerators in wxWidgets) }
283@itemdef{ "__", "_" }
284@itemdef{ "\n", line break }
285@itemdef{ "\r", carriage return }
286@itemdef{ "\t", tab }
287@itemdef{ "\\", "\" }
288@endDefList
289
290By default, the text is translated using wxLocale::GetTranslation() before
291it is used. This can be disabled either globally by not passing
292wxXRC_USE_LOCALE to wxXmlResource constructor, or by setting the @c translate
293attribute on the property node to "0":
294@code
295<!-- this is not translated: -->
296<label translate="0">_Unix</label>
297<!-- but this is: -->
298<help>Use Unix-style newlines</help>
299@endcode
300
301@note Even though the "_" character is used instead of "&" for accelerators,
302 it is still possible to use "&". The latter has to be encoded as "&amp;",
303 though, so using "_" is more convenient.
304
41e69d79 305@see @ref overview_xrcformat_pre_v2530, @ref overview_xrcformat_pre_v2301
a302d595
VS
306
307
9d9abdbf 308@subsection overview_xrcformat_type_text_notrans Non-Translatable Text
a302d595 309
41e69d79 310Like @ref overview_xrcformat_type_text, but the text is never translated and
a302d595
VS
311@c translate attribute cannot be used.
312
313
9d9abdbf 314@subsection overview_xrcformat_type_string String
be42eeb0 315
41e69d79 316An unformatted string. Unlike with @ref overview_xrcformat_type_text, no escaping
be42eeb0
VS
317or translations are done.
318
319
41e69d79 320@subsection overview_xrcformat_type_url URL
be42eeb0
VS
321
322Any URL accepted by wxFileSystem (typically relative to XRC file's location,
41e69d79 323but can be absolute too). Unlike with @ref overview_xrcformat_type_text, no escaping
be42eeb0
VS
324or translations are done.
325
326
41e69d79 327@subsection overview_xrcformat_type_bitmap Bitmap
a302d595
VS
328
329Bitmap properties contain specification of a single bitmap or icon. In the most
330basic form, their text value is simply a relative filename (or another
331wxFileSystem URL) of the bitmap to use. For example:
332@code
333<object class="tool" name="wxID_NEW">
334 <tooltip>New</tooltip>
335 <bitmap>new.png</bitmap>
336</object>
337@endcode
338The value is interpreted as path relative to the location of XRC file where the
339reference occurs.
340
341Alternatively, it is possible to specify the bitmap using wxArtProvider IDs.
342In this case, the property element has no textual value (filename) and instead
343has the @c stock_id XML attribute that contains stock art ID as accepted by
344wxArtProvider::GetBitmap(). This can be either custom value (if the app uses
345app-specific art provider) or one of the predefined wxART_XXX constants.
346
347Optionally, @c stock_client attribute may be specified too and contain one of
348the predefined wxArtClient values. If it is not specified, the default client
349ID most appropriate in the context where the bitmap is referenced will be used.
350In most cases, specifying @c stock_client is not needed.
351
352Examples of stock bitmaps usage:
353@code
354<bitmap stock_id="fixed-width"/> <!-- custom app-specific art -->
674d80a7 355<bitmap stock_id="wxART_FILE_OPEN"/> <!-- standard art -->
a302d595
VS
356@endcode
357
07aec89f
VS
358If both specifications are provided, then @c stock_id is used if it is
359recognized by wxArtProvider and the provided bitmap file is used as a fallback.
a302d595
VS
360
361
41e69d79 362@subsection overview_xrcformat_type_style Style
a302d595
VS
363
364Style properties (such as window's style or sizer flags) use syntax similar to
365C++: the style value is OR-combination of individual flags. Symbolic names
366identical to those used in C++ code are used for the flags. Flags are separated
367with "|" (whitespace is allowed but not required around it).
368
369The flags that are allowed for a given property are context-dependent.
370
371Examples:
372@code
373<style>wxCAPTION|wxSYSTEM_MENU | wxRESIZE_BORDER</style>
374<exstyle>wxDIALOG_EX_CONTEXTHELP</exstyle>
375@endcode
376
377
41e69d79 378@subsection overview_xrcformat_type_font Font
a302d595
VS
379
380XRC uses similar, but more flexible, abstract description of fonts to that
381used by wxFont class. A font can be described either in terms of its elementary
45df4bb6
VZ
382properties, or it can be derived from one of system fonts or the parent window
383font.
a302d595 384
a03cf28b 385The font property element is a "composite" element: unlike majority of
a302d595
VS
386properties, it doesn't have text value but contains several child elements
387instead. These children are handled in the same way as object properties
388and can be one of the following "sub-properties":
389
390@beginTable
391@hdr3col{property, type, description}
392@row3col{size, unsigned integer,
393 Pixel size of the font (default: wxNORMAL_FONT's size or @c sysfont's
45df4bb6
VZ
394 size if the @c sysfont property is used or the current size of the font
395 of the enclosing control if the @c inherit property is used.}
a302d595
VS
396@row3col{style, enum,
397 One of "normal", "italic" or "slant" (default: normal).}
398@row3col{weight, enum,
399 One of "normal", "bold" or "light" (default: normal).}
400@row3col{family, enum,
401 One of "roman", "script", "decorative", "swiss", "modern" or "teletype"
402 (default: roman).}
41e69d79 403@row3col{underlined, @ref overview_xrcformat_type_bool,
a302d595
VS
404 Whether the font should be underlined (default: 0).}
405@row3col{face, ,
406 Comma-separated list of face names; the first one available is used
407 (default: unspecified).}
408@row3col{encoding, ,
409 Charset of the font, unused in Unicode build), as string
410 (default: unspecified).}
411@row3col{sysfont, ,
412 Symbolic name of system standard font(one of wxSYS_*_FONT constants).}
45df4bb6
VZ
413@row3col{inherit, @ref overview_xrcformat_type_bool,
414 If true, the font of the enclosing control is used. If this property and the
415 @c sysfont property are specified the @c sysfont property takes precedence.}
a302d595 416@row3col{relativesize, float,
45df4bb6
VZ
417 Float, font size relative to chosen system font's or inherited font's size;
418 can only be used when 'sysfont' or 'inherit' is used and when 'size' is not
419 used.}
a302d595
VS
420@endTable
421
422All of them are optional, if they are missing, appropriate wxFont default is
45df4bb6
VZ
423used. If the @c sysfont or @c inherit property is used, then the defaults are
424taken from it instead.
a302d595
VS
425
426Examples:
427@code
428<font>
429 <!-- fixed font: Arial if available, fall back to Helvetica -->
430 <face>arial,helvetica</face>
431 <size>12</size>
432</font>
433
434<font>
435 <!-- enlarged, enboldened standard font: -->
436 <sysfont>wxSYS_DEFAULT_GUI_FONT</sysfont>
437 <weight>bold</weight>
438 <relativesize>1.5</relativesize>
439</font>
440@endcode
441
45df4bb6
VZ
442@note You cannot use @c inherit for a font that gets used before the enclosing
443 control is created, e.g. if the control gets the font passed as parameter
444 for its constructor, or if the control is not derived from wxWindow.
445
a302d595 446
a03cf28b
VS
447@subsection overview_xrcformat_type_imagelist Image List
448
449Defines a wxImageList.
450
451The imagelist property element is a "composite" element: unlike majority of
452properties, it doesn't have text value but contains several child elements
453instead. These children are handled similarly to object properties
454and can be one of the following "sub-properties":
455
456@beginTable
457@hdr3col{property, type, description}
458@row3col{mask, @ref overview_xrcformat_type_bool,
459 If masks should be created for all images (default: 1).}
460@row3col{size, @ref overview_xrcformat_type_size,
461 The size of the images in the list (default: the size of the first bitmap).}
462@row3col{bitmap, @ref overview_xrcformat_type_bitmap,
463 Adds a new image. Unlike normal object properties, @c bitmap may be used more than once
464 to add multiple images to the list. At least one @c bitmap value is required.}
465@endTable
466
467Example:
468@code
469<imagelist>
470 <size>32,32</size>
471 <bitmap stock_id="wxART_QUESTION"/>
472 <bitmap stock_id="wxART_INFORMATION"/>
473</imagelist>
474@endcode
475
476
9d9abdbf 477@section overview_xrcformat_windows Controls and Windows
a302d595
VS
478
479This section describes support wxWindow-derived classes in XRC format.
480
9d9abdbf 481@subsection overview_xrcformat_std_props Standard Properties
a302d595
VS
482
483The following properties are always (unless stated otherwise in
484control-specific docs) available for @em windows objects. They are omitted
485from properties lists below.
486
487@beginTable
488@hdr3col{property, type, description}
41e69d79 489@row3col{pos, @ref overview_xrcformat_type_pos,
a302d595 490 Initial position of the window (default: wxDefaultPosition).}
41e69d79 491@row3col{size, @ref overview_xrcformat_type_size,
a302d595 492 Initial size of the window (default: wxDefaultSize).}
41e69d79 493@row3col{style, @ref overview_xrcformat_type_style,
a302d595
VS
494 Window style for this control. The allowed values depend on what
495 window is being created, consult respective class' constructor
496 documentation for details (default: window-dependent default, usually
497 wxFOO_DEFAULT_STYLE if defined for class wxFoo, 0 if not).}
41e69d79 498@row3col{exstyle, @ref overview_xrcformat_type_style,
a302d595
VS
499 Extra style for the window, if any. See wxWindow::SetExtraStyle()
500 (default: not set).}
41e69d79 501@row3col{fg, @ref overview_xrcformat_type_colour,
a302d595 502 Foreground colour of the window (default: window's default).}
a7435c3e
VZ
503@row3col{ownfg, @ref overview_xrcformat_type_colour,
504 Non-inheritable foreground colour of the window, see
505 wxWindow::SetOwnForegroundColour() (default: none).}
41e69d79 506@row3col{bg, @ref overview_xrcformat_type_colour,
a302d595 507 Background colour of the window (default: window's default).}
a7435c3e
VZ
508@row3col{ownbg, @ref overview_xrcformat_type_colour,
509 Non-inheritable background colour of the window, see
510 wxWindow::SetOwnBackgroundColour() (default: none).}
41e69d79 511@row3col{enabled, @ref overview_xrcformat_type_bool,
a302d595 512 If set to 0, the control is disabled (default: 1).}
41e69d79 513@row3col{hidden, @ref overview_xrcformat_type_bool,
a302d595 514 If set to 1, the control is created hidden (default: 0).}
41e69d79 515@row3col{tooltip, @ref overview_xrcformat_type_text,
a302d595 516 Tooltip to use for the control (default: not set).}
41e69d79 517@row3col{font, @ref overview_xrcformat_type_font,
a302d595 518 Font to use for the control (default: window's default).}
a7435c3e
VZ
519@row3col{ownfont, @ref overview_xrcformat_type_font,
520 Non-inheritable font to use for the control, see
521 wxWindow::SetOwnFont() (default: none).}
41e69d79 522@row3col{help, @ref overview_xrcformat_type_text,
a302d595
VS
523 Context-sensitive help for the control, used by wxHelpProvider
524 (default: not set).}
525@endTable
526
527All of these properties are optional.
528
529
9d9abdbf 530@subsection overview_xrcformat_controls Supported Controls
a302d595 531
be42eeb0
VS
532This section lists all controls supported by default. For each control, its
533control-specific properties are listed. If the control can have child objects,
534it is documented there too; unless said otherwise, XRC elements for these
535controls cannot have children.
536
a302d595 537@subsubsection xrc_wxanimationctrl wxAnimationCtrl
be42eeb0
VS
538
539@beginTable
540@hdr3col{property, type, description}
41e69d79 541@row3col{animation, @ref overview_xrcformat_type_url,
07aec89f
VS
542 Animation file to load into the control (default: none).}
543@row3col{inactive-bitmap, @ref overview_xrcformat_type_bitmap,
544 Bitmap to use when not playing the animation (default: the default).}
be42eeb0
VS
545@endTable
546
a302d595 547
00b4e7c9
VZ
548@subsubsection xrc_wxauinotebook wxAuiNotebook
549
550A wxAuiNotebook can have one or more child objects of the @c notebookpage
551pseudo-class.
552@c notebookpage objects have the following properties:
553
554@beginTable
555@hdr3col{property, type, description}
556@row3col{label, @ref overview_xrcformat_type_text,
557 Page label (required).}
558@row3col{bitmap, @ref overview_xrcformat_type_bitmap,
559 Bitmap shown alongside the label (default: none).}
560@row3col{selected, @ref overview_xrcformat_type_bool,
561 Is the page selected initially (only one page can be selected; default: 0)?}
562@endTable
563
564Each @c notebookpage must have exactly one non-toplevel window as its child.
565
566Example:
567@code
568<object class="wxAuiNotebook">
569 <style>wxBK_BOTTOM</style>
570 <object class="notebookpage">
571 <label>Page 1</label>
572 <bitmap>bitmap.png</bitmap>
573 <object class="wxPanel" name="page_1">
574 ...
575 </object>
576 </object>
577</object>
578@endcode
579
580Notice that wxAuiNotebook support in XRC is available in wxWidgets 2.9.5 and
581later only and you need to explicitly register its handler using
582@code
583 #include <wx/xrc/xh_auinotbk.h>
584
585 AddHandler(new wxAuiNotebookXmlHandler);
586@endcode
587to use it.
588
589
8ae52ef8 590@subsubsection xrc_wxbannerwindow wxBannerWindow
ae2047c3
VZ
591
592@beginTable
593@hdr3col{property, type, description}
594@row3col{direction, @c wxLEFT|wxRIGHT|wxTOP|wxBOTTOM,
e07cbe6f 595 The side along which the banner will be positioned (default: wxLEFT).}
ae2047c3 596@row3col{bitmap, @ref overview_xrcformat_type_bitmap,
e07cbe6f 597 Bitmap to use as the banner background (default: none).}
ae2047c3 598@row3col{title, @ref overview_xrcformat_type_text,
e07cbe6f 599 Banner title, should be single line (default: none).}
ae2047c3 600@row3col{message, @ref overview_xrcformat_type_text,
e07cbe6f 601 Possibly multi-line banner message (default: none).}
ae2047c3 602@row3col{gradient-start, @ref overview_xrcformat_type_colour,
e07cbe6f
VS
603 Starting colour of the gradient used as banner background.
604 (Optional. Can't be used if a valid bitmap is specified. If used, both gradient values must be set.)}
ae2047c3 605@row3col{gradient-end, @ref overview_xrcformat_type_colour,
e07cbe6f
VS
606 End colour of the gradient used as banner background.
607 (Optional. Can't be used if a valid bitmap is specified. If used, both gradient values must be set.)}
ae2047c3
VZ
608@endTable
609
610
a302d595 611@subsubsection xrc_wxbitmapbutton wxBitmapButton
be42eeb0
VS
612
613@beginTable
614@hdr3col{property, type, description}
41e69d79 615@row3col{default, @ref overview_xrcformat_type_bool,
be42eeb0 616 Should this button be the default button in dialog (default: 0)?}
41e69d79 617@row3col{bitmap, @ref overview_xrcformat_type_bitmap,
be42eeb0 618 Bitmap to show on the button (required).}
41e69d79 619@row3col{selected, @ref overview_xrcformat_type_bitmap,
be42eeb0 620 Bitmap to show when the button is selected (default: none, same as @c bitmap).}
41e69d79 621@row3col{focus, @ref overview_xrcformat_type_bitmap,
be42eeb0 622 Bitmap to show when the button has focus (default: none, same as @c bitmap).}
41e69d79 623@row3col{disabled, @ref overview_xrcformat_type_bitmap,
be42eeb0 624 Bitmap to show when the button is disabled (default: none, same as @c bitmap).}
41e69d79 625@row3col{hover, @ref overview_xrcformat_type_bitmap,
be42eeb0
VS
626 Bitmap to show when mouse cursor hovers above the bitmap (default: none, same as @c bitmap).}
627@endTable
628
a302d595
VS
629
630@subsubsection xrc_wxbitmapcombobox wxBitmapComboBox
be42eeb0
VS
631
632@beginTable
633@hdr3col{property, type, description}
634@row3col{selection, integer,
635 Index of the initially selected item or -1 for no selection (default: -1).}
41e69d79 636@row3col{value, @ref overview_xrcformat_type_string,
be42eeb0
VS
637 Initial value in the control (doesn't have to be one of @ content values;
638 default: empty).}
639@endTable
640
641If both @c value and @c selection are specified and @c selection is not -1,
642then @c selection takes precedence.
643
644A wxBitmapComboBox can have one or more child objects of the @c ownerdrawnitem
645pseudo-class. @c ownerdrawnitem objects have the following properties:
646
647@beginTable
648@hdr3col{property, type, description}
41e69d79 649@row3col{text, @ref overview_xrcformat_type_text,
be42eeb0 650 Item's label (required).}
41e69d79 651@row3col{bitmap, @ref overview_xrcformat_type_bitmap,
be42eeb0
VS
652 Item's bitmap (default: no bitmap).}
653@endTable
654
655Example:
656@code
657<object class="wxBitmapComboBox">
658 <selection>1</selection>
659 <object class="ownerdrawnitem">
660 <text>Foo</text>
661 <bitmap>foo.png</bitmap>
662 </object>
663 <object class="ownerdrawnitem">
664 <text>Bar</text>
665 <bitmap>bar.png</bitmap>
666 </object>
667</object>
668@endcode
669
a302d595 670
8def3e6e 671@subsubsection xrc_wxbitmaptogglebutton wxBitmapToggleButton
1bdeb24e
VZ
672
673@beginTable
674@hdr3col{property, type, description}
675@row3col{bitmap, @ref overview_xrcformat_type_bitmap,
676 Label to display on the button (required).}
677@row3col{checked, @ref overview_xrcformat_type_bool,
678 Should the button be checked/pressed initially (default: 0)?}
679@endTable
680
681
a302d595 682@subsubsection xrc_wxbutton wxButton
be42eeb0
VS
683
684@beginTable
685@hdr3col{property, type, description}
41e69d79 686@row3col{label, @ref overview_xrcformat_type_text,
18b9d1a1
VZ
687 Label to display on the button (may be empty if only bitmap is used).}
688@row3col{bitmap, @ref overview_xrcformat_type_bitmap,
689 Bitmap to display in the button (optional).}
690@row3col{bitmapposition, @c wxLEFT|wxRIGHT|wxTOP|wxBOTTOM,
e07cbe6f 691 Position of the bitmap in the button, see wxButton::SetBitmapPosition() (default: wxLEFT).}
41e69d79 692@row3col{default, @ref overview_xrcformat_type_bool,
18b9d1a1 693 Should this button be the default button in dialog (default: 0)?}
be42eeb0
VS
694@endTable
695
a302d595
VS
696
697@subsubsection xrc_wxcalendarctrl wxCalendarCtrl
be42eeb0
VS
698
699No additional properties.
700
a302d595
VS
701
702@subsubsection xrc_wxcheckbox wxCheckBox
be42eeb0
VS
703
704@beginTable
705@hdr3col{property, type, description}
41e69d79 706@row3col{label, @ref overview_xrcformat_type_text,
be42eeb0 707 Label to use for the checkbox (required).}
41e69d79 708@row3col{checked, @ref overview_xrcformat_type_bool,
be42eeb0
VS
709 Should the checkbox be checked initially (default: 0)?}
710@endTable
711
a302d595
VS
712
713@subsubsection xrc_wxchecklistbox wxCheckListBox
be42eeb0
VS
714
715@beginTable
716@hdr3col{property, type, description}
518fafd5 717@row3col{content, items,
be42eeb0
VS
718 Content of the control; this property has any number of @c \<item\> XML
719 elements as its children, with the items text as their text values
720 (default: empty).}
721@endTable
722
723The @c \<item\> elements have listbox items' labels as their text values. They
724can also have optional @c checked XML attribute -- if set to "1", the value is
725initially checked.
726
727Example:
728@code
729<object class="wxCheckListBox">
730 <content>
731 <item checked="1">Download library</item>
732 <item checked="1">Compile samples</item>
733 <item checked="1">Skim docs</item>
734 <item checked="1">Finish project</item>
735 <item>Wash car</item>
736 </content>
737</object>
738@endcode
739
a302d595
VS
740
741@subsubsection xrc_wxchoice wxChoice
be42eeb0
VS
742
743@beginTable
744@hdr3col{property, type, description}
745@row3col{selection, integer,
746 Index of the initially selected item or -1 for no selection (default: -1).}
518fafd5 747@row3col{content, items,
be42eeb0
VS
748 Content of the control; this property has any number of @c \<item\> XML
749 elements as its children, with the items text as their text values
750 (default: empty).}
751@endTable
752
753Example:
754@code
755<object class="wxChoice" name="controls_choice">
756 <content>
757 <item>See</item>
758 <item>Hear</item>
759 <item>Feel</item>
760 <item>Smell</item>
761 <item>Taste</item>
762 <item>The Sixth Sense!</item>
763 </content>
764</object>
765@endcode
766
a302d595
VS
767
768@subsubsection xrc_wxchoicebook wxChoicebook
be42eeb0 769
a03cf28b
VS
770@beginTable
771@hdr3col{property, type, description}
772@row3col{imagelist, @ref overview_xrcformat_type_imagelist,
773 Image list to use for the images (default: none, built implicitly).}
774@endTable
775
776Additionally, a choicebook can have one or more child objects of the @c
777choicebookpage pseudo-class (similarly to @ref xrc_wxnotebook "wxNotebook" and
778its @c notebookpage).
e07cbe6f 779
326462ae 780@c choicebookpage objects have the following properties:
be42eeb0
VS
781
782@beginTable
783@hdr3col{property, type, description}
41e69d79 784@row3col{label, @ref overview_xrcformat_type_text,
be42eeb0 785 Sheet page's title (required).}
41e69d79 786@row3col{bitmap, @ref overview_xrcformat_type_bitmap,
e07cbe6f 787 Bitmap shown alongside the label (default: none, mutually exclusive with @c image).}
326462ae
VZ
788@row3col{image, integer,
789 The zero-based index of the image associated with the item
a03cf28b 790 into the image list (default: none, mutually exclusive with @c bitmap, only if imagelist was set).}
41e69d79 791@row3col{selected, @ref overview_xrcformat_type_bool,
be42eeb0
VS
792 Is the page selected initially (only one page can be selected; default: 0)?}
793@endTable
794
795Each @c choicebookpage has exactly one non-toplevel window as its child.
796
a302d595 797
53cdd2c1
VZ
798@subsubsection xrc_wxcommandlinkbutton wxCommandLinkButton
799
800The wxCommandLinkButton contains a main title-like @c label and an optional
801@c note for longer description. The main @c label and the @c note can be
802concatenated into a single string using a new line character between them
803(notice that the @c note part can have more new lines in it).
804
805@beginTable
806@hdr3col{property, type, description}
807@row3col{label, @ref overview_xrcformat_type_text,
808 First line of text on the button, typically the label of an action that
e07cbe6f 809 will be made when the button is pressed (required). }
53cdd2c1 810@row3col{note, @ref overview_xrcformat_type_text,
e07cbe6f 811 Second line of text describing the action performed when the button is pressed (default: none). }
53cdd2c1
VZ
812@endTable
813
814
a302d595 815@subsubsection xrc_wxcollapsiblepane wxCollapsiblePane
be42eeb0
VS
816
817@beginTable
818@hdr3col{property, type, description}
41e69d79 819@row3col{label, @ref overview_xrcformat_type_text,
be42eeb0 820 Label to use for the collapsible section (required).}
41e69d79 821@row3col{collapsed, @ref overview_xrcformat_type_bool,
be42eeb0
VS
822 Should the pane be collapsed initially (default: 0)?}
823@endTable
824
825wxCollapsiblePane may contain single optional child object of the @c panewindow
826pseudo-class type. @c panewindow itself must contain exactly one child that
41e69d79 827is a @ref overview_xrcformat_sizers "sizer" or a non-toplevel window
be42eeb0
VS
828object.
829
a302d595
VS
830
831@subsubsection xrc_wxcolourpickerctrl wxColourPickerCtrl
be42eeb0
VS
832
833@beginTable
834@hdr3col{property, type, description}
41e69d79 835@row3col{value, @ref overview_xrcformat_type_colour,
be42eeb0
VS
836 Initial value of the control (default: wxBLACK).}
837@endTable
838
a302d595
VS
839
840@subsubsection xrc_wxcombobox wxComboBox
be42eeb0
VS
841
842@beginTable
843@hdr3col{property, type, description}
844@row3col{selection, integer,
845 Index of the initially selected item or -1 for no selection (default: not used).}
518fafd5 846@row3col{content, items,
be42eeb0
VS
847 Content of the control; this property has any number of @c \<item\> XML
848 elements as its children, with the items text as their text values
849 (default: empty).}
41e69d79 850@row3col{value, @ref overview_xrcformat_type_string,
be42eeb0
VS
851 Initial value in the control (doesn't have to be one of @ content values;
852 default: empty).}
853@endTable
854
855If both @c value and @c selection are specified and @c selection is not -1,
856then @c selection takes precedence.
857
858Example:
859@code
860<object class="wxComboBox" name="controls_combobox">
861 <style>wxCB_DROPDOWN</style>
862 <value>nedit</value>
863 <content>
864 <item>vim</item>
865 <item>emacs</item>
866 <item>notepad.exe</item>
867 <item>bbedit</item>
868 </content>
869</object>
870@endcode
a302d595 871
71a25c10
VS
872
873@subsubsection xrc_wxcomboctrl wxComboCtrl
874
875@beginTable
876@hdr3col{property, type, description}
877@row3col{value, @ref overview_xrcformat_type_string,
878 Initial value in the control (default: empty).}
879@endTable
880
881
a302d595 882@subsubsection xrc_wxdatepickerctrl wxDatePickerCtrl
be42eeb0
VS
883
884No additional properties.
885
a302d595
VS
886
887@subsubsection xrc_wxdialog wxDialog
be42eeb0
VS
888
889@beginTable
890@hdr3col{property, type, description}
41e69d79 891@row3col{title, @ref overview_xrcformat_type_text,
be42eeb0 892 Dialog's title (default: empty).}
41e69d79 893@row3col{icon, @ref overview_xrcformat_type_bitmap,
be42eeb0 894 Dialog's icon (default: not used).}
41e69d79 895@row3col{centered, @ref overview_xrcformat_type_bool,
be42eeb0
VS
896 Whether the dialog should be centered on the screen (default: 0).}
897@endTable
898
899wxDialog may have optional children: either exactly one
41e69d79 900@ref overview_xrcformat_sizers "sizer" child or any number of non-toplevel window
be42eeb0
VS
901objects. If sizer child is used, it sets
902@ref wxSizer::SetSizeHints() "size hints" too.
a302d595 903
71a25c10 904
a302d595 905@subsubsection xrc_wxdirpickerctrl wxDirPickerCtrl
be42eeb0
VS
906
907@beginTable
908@hdr3col{property, type, description}
41e69d79 909@row3col{value, @ref overview_xrcformat_type_string,
be42eeb0 910 Initial value of the control (default: empty).}
41e69d79 911@row3col{message, @ref overview_xrcformat_type_text,
be42eeb0
VS
912 Message shown to the user in wxDirDialog shown by the control (required).}
913@endTable
914
a302d595 915
71a25c10
VS
916@subsubsection xrc_wxeditablelistbox wxEditableListBox
917
918@beginTable
919@hdr3col{property, type, description}
920@row3col{label, @ref overview_xrcformat_type_text,
921 Label shown above the list (default: empty).}
922@row3col{content, items,
923 Content of the control; this property has any number of @c \<item\> XML
924 elements as its children, with the items text as their text values
925 (default: empty).}
926@endTable
927
928Example:
929@code
930<object class="wxEditableListBox" name="controls_listbox">
931 <size>250,160</size>
932 <label>List of things</label>
933 <content>
934 <item>Milk</item>
935 <item>Pizza</item>
936 <item>Bread</item>
937 <item>Orange juice</item>
938 <item>Paper towels</item>
939 </content>
940</object>
941@endcode
942
943
0d14e4f2
VZ
944@subsubsection xrc_wxfilectrl wxFileCtrl
945
946@beginTable
947@hdr3col{property, type, description}
948@row3col{defaultdirectory, @ref overview_xrcformat_type_string,
949 Sets the current directory displayed in the control. }
950@row3col{defaultfilename, @ref overview_xrcformat_type_string,
951 Selects a certain file.}
952@row3col{wildcard, @ref overview_xrcformat_type_string,
953 Sets the wildcard, which can contain multiple file types, for example:
e07cbe6f
VS
954 "BMP files (*.bmp)|*.bmp|GIF files (*.gif)|*.gif"
955 (default: all files).}
0d14e4f2
VZ
956@endTable
957
958
a302d595 959@subsubsection xrc_wxfilepickerctrl wxFilePickerCtrl
be42eeb0
VS
960
961@beginTable
962@hdr3col{property, type, description}
41e69d79 963@row3col{value, @ref overview_xrcformat_type_string,
be42eeb0 964 Initial value of the control (default: empty).}
41e69d79 965@row3col{message, @ref overview_xrcformat_type_text,
be42eeb0 966 Message shown to the user in wxDirDialog shown by the control (required).}
41e69d79 967@row3col{wildcard, @ref overview_xrcformat_type_string,
0d14e4f2 968 Sets the wildcard, which can contain multiple file types, for example:
e07cbe6f
VS
969 "BMP files (*.bmp)|*.bmp|GIF files (*.gif)|*.gif"
970 (default: all files).}
be42eeb0
VS
971@endTable
972
a302d595
VS
973
974@subsubsection xrc_wxfontpickerctrl wxFontPickerCtrl
be42eeb0
VS
975
976@beginTable
977@hdr3col{property, type, description}
41e69d79 978@row3col{value, @ref overview_xrcformat_type_font,
be42eeb0
VS
979 Initial value of the control (default: wxNORMAL_FONT).}
980@endTable
a302d595
VS
981
982@subsubsection xrc_wxfrane wxFrame
be42eeb0
VS
983
984@beginTable
985@hdr3col{property, type, description}
41e69d79 986@row3col{title, @ref overview_xrcformat_type_text,
be42eeb0 987 Frame's title (default: empty).}
41e69d79 988@row3col{icon, @ref overview_xrcformat_type_bitmap,
be42eeb0 989 Frame's icon (default: not used).}
41e69d79 990@row3col{centered, @ref overview_xrcformat_type_bool,
be42eeb0
VS
991 Whether the frame should be centered on the screen (default: 0).}
992@endTable
993
994wxFrame may have optional children: either exactly one
41e69d79 995@ref overview_xrcformat_sizers "sizer" child or any number of non-toplevel window
be42eeb0
VS
996objects. If sizer child is used, it sets
997@ref wxSizer::SetSizeHints() "size hints" too.
998
a302d595
VS
999
1000@subsubsection xrc_wxgauge wxGauge
be42eeb0
VS
1001
1002@beginTable
1003@hdr3col{property, type, description}
1004@row3col{range, integer,
033508e1 1005 Maximum value of the gauge (default: 100).}
be42eeb0
VS
1006@row3col{value, integer,
1007 Initial value of the control (default: 0).}
41e69d79 1008@row3col{shadow, @ref overview_xrcformat_type_dimension,
be42eeb0 1009 Rendered shadow size (default: none; ignored by most platforms).}
41e69d79 1010@row3col{bezel, @ref overview_xrcformat_type_dimension,
be42eeb0
VS
1011 Rendered bezel size (default: none; ignored by most platforms).}
1012@endTable
a302d595
VS
1013
1014@subsubsection xrc_wxgenericdirctrl wxGenericDirCtrl
be42eeb0
VS
1015
1016@beginTable
1017@hdr3col{property, type, description}
07aec89f 1018@row3col{defaultfolder, @ref overview_xrcformat_type_string,
be42eeb0 1019 Initial folder (default: empty).}
41e69d79 1020@row3col{filter, @ref overview_xrcformat_type_text,
be42eeb0
VS
1021 Filter string, using the same syntax as used by wxFileDialog, e.g.
1022 "All files (*.*)|*.*|JPEG files (*.jpg)|*.jpg" (default: empty).}
1023@row3col{defaultfilter, integer,
1024 Zero-based index of default filter (default: 0).}
1025@endTable
a302d595
VS
1026
1027@subsubsection xrc_wxgrid wxGrid
be42eeb0
VS
1028
1029No additional properties.
1030
a302d595
VS
1031
1032@subsubsection xrc_wxhtmlwindow wxHtmlWindow
be42eeb0
VS
1033
1034@beginTable
1035@hdr3col{property, type, description}
41e69d79 1036@row3col{url, @ref overview_xrcformat_type_url,
07aec89f 1037 Page to display in the window (default: none).}
41e69d79 1038@row3col{htmlcode, @ref overview_xrcformat_type_text,
07aec89f 1039 HTML markup to display in the window (default: none).}
41e69d79 1040@row3col{borders, @ref overview_xrcformat_type_dimension,
be42eeb0
VS
1041 Border around HTML content (default: 0).}
1042@endTable
1043
1044At most one of @c url and @c htmlcode properties may be specified, they are
1045mutually exclusive. If neither is set, the window is initialized to show empty
1046page.
1047
a302d595
VS
1048
1049@subsubsection xrc_wxhyperlinkctrl wxHyperlinkCtrl
be42eeb0
VS
1050
1051@beginTable
1052@hdr3col{property, type, description}
41e69d79 1053@row3col{label, @ref overview_xrcformat_type_text,
be42eeb0 1054 Label to display on the control (required).}
41e69d79 1055@row3col{url, @ref overview_xrcformat_type_url,
be42eeb0
VS
1056 URL to open when the link is clicked (required).}
1057@endTable
1058
a302d595
VS
1059
1060@subsubsection xrc_wxlistbox wxListBox
be42eeb0
VS
1061
1062@beginTable
1063@hdr3col{property, type, description}
1064@row3col{selection, integer,
1065 Index of the initially selected item or -1 for no selection (default: -1).}
518fafd5 1066@row3col{content, items,
be42eeb0
VS
1067 Content of the control; this property has any number of @c \<item\> XML
1068 elements as its children, with the items text as their text values
1069 (default: empty).}
1070@endTable
1071
1072Example:
1073@code
1074<object class="wxListBox" name="controls_listbox">
1075 <size>250,160</size>
1076 <style>wxLB_SINGLE</style>
1077 <content>
1078 <item>Milk</item>
1079 <item>Pizza</item>
1080 <item>Bread</item>
1081 <item>Orange juice</item>
1082 <item>Paper towels</item>
1083 </content>
1084</object>
1085@endcode
1086
a302d595
VS
1087
1088@subsubsection xrc_wxlistbook wxListbook
be42eeb0 1089
a03cf28b
VS
1090@beginTable
1091@hdr3col{property, type, description}
1092@row3col{imagelist, @ref overview_xrcformat_type_imagelist,
1093 Image list to use for the images (default: none, built implicitly).}
1094@endTable
1095
1096Additionally, a listbook can have one or more child objects of the @c
1097listbookpage pseudo-class (similarly to @ref xrc_wxnotebook "wxNotebook" and
1098its @c notebookpage).
1099
326462ae 1100@c listbookpage objects have the following properties:
be42eeb0
VS
1101
1102@beginTable
1103@hdr3col{property, type, description}
41e69d79 1104@row3col{label, @ref overview_xrcformat_type_text,
be42eeb0 1105 Sheet page's title (required).}
41e69d79 1106@row3col{bitmap, @ref overview_xrcformat_type_bitmap,
a03cf28b 1107 Bitmap shown alongside the label (default: none, mutually exclusive with @c image).}
326462ae
VZ
1108@row3col{image, integer,
1109 The zero-based index of the image associated with the item
a03cf28b 1110 into the image list (default: none, mutually exclusive with @c bitmap, only if imagelist was set).}
41e69d79 1111@row3col{selected, @ref overview_xrcformat_type_bool,
be42eeb0
VS
1112 Is the page selected initially (only one page can be selected; default: 0)?}
1113@endTable
1114
1115Each @c listbookpage has exactly one non-toplevel window as its child.
1116
a302d595
VS
1117
1118@subsubsection xrc_wxlistctrl wxListCtrl
be42eeb0 1119
a03cf28b
VS
1120@beginTable
1121@hdr3col{property, type, description}
1122@row3col{imagelist, @ref overview_xrcformat_type_imagelist,
1123 The normal (wxIMAGE_LIST_NORMAL) image list (default: none, built implicitly).}
1124@row3col{imagelist-small, @ref overview_xrcformat_type_imagelist,
1125 The small (wxIMAGE_LIST_SMALL) image list (default: none, built implicitly).}
1126@endTable
326462ae 1127
07aec89f 1128A list control can have optional child objects of the @ref xrc_wxlistitem
a03cf28b 1129class. Report mode list controls (i.e. created with @c wxLC_REPORT style) can
07aec89f 1130in addition have optional @ref xrc_wxlistcol child objects.
ef18e792 1131
0654158b 1132@paragraph xrc_wxlistcol listcol
ef18e792
VZ
1133
1134The @c listcol class can only be used for wxListCtrl children. It can have the
07aec89f
VS
1135following properties (all of them optional):
1136
ef18e792
VZ
1137@beginTable
1138@hdr3col{property, type, description}
1139@row3col{align, wxListColumnFormat,
1140 The alignment for the item.
1141 Can be one of @c wxLIST_FORMAT_LEFT, @c wxLIST_FORMAT_RIGHT or
1142 @c wxLIST_FORMAT_CENTRE.}
07aec89f 1143@row3col{text, @ref overview_xrcformat_type_text,
ef18e792
VZ
1144 The title of the column. }
1145@row3col{width, integer,
1146 The column width. }
7243eb6d
VS
1147@row3col{image, integer,
1148 The zero-based index of the image associated with the item in the 'small' image list. }
ef18e792
VZ
1149@endTable
1150
1151The columns are appended to the control in order of their appearance and may be
1152referenced by 0-based index in the @c col attributes of subsequent @c listitem
1153objects.
1154
0654158b 1155@paragraph xrc_wxlistitem listitem
326462ae
VZ
1156
1157The @c listitem is a child object for the class @ref xrc_wxlistctrl.
07aec89f 1158It can have the following properties (all of them optional):
326462ae
VZ
1159
1160@beginTable
1161@hdr3col{property, type, description}
1162@row3col{align, wxListColumnFormat,
1163 The alignment for the item.
1164 Can be one of @c wxLIST_FORMAT_LEFT, @c wxLIST_FORMAT_RIGHT or
1165 @c wxLIST_FORMAT_CENTRE.}
1166@row3col{bg, @ref overview_xrcformat_type_colour,
1167 The background color for the item.}
1168@row3col{bitmap, @ref overview_xrcformat_type_bitmap,
1169 Add a bitmap to the (normal) @ref xrc_wximagelist associated with the
1170 @ref xrc_wxlistctrl parent and associate it with this item.
a03cf28b
VS
1171 If the imagelist is not defined it will be created implicitly
1172 (default: none, mutually exclusive with @c image).}
326462ae
VZ
1173@row3col{bitmap-small, @ref overview_xrcformat_type_bitmap,
1174 Add a bitmap in the 'small' @ref xrc_wximagelist associated with the
1175 @ref xrc_wxlistctrl parent and associate it with this item.
a03cf28b
VS
1176 If the 'small' imagelist is not defined it will be created implicitly
1177 (default: none, mutually exclusive with @c image-small).}
ef18e792
VZ
1178@row3col{col, integer,
1179 The zero-based column index.}
326462ae
VZ
1180@row3col{image, integer,
1181 The zero-based index of the image associated with the item
a03cf28b
VS
1182 in the (normal) image list
1183 (default: none, mutually exclusive with @c bitmap, only if imagelist was set).}
326462ae
VZ
1184@row3col{image-small, integer,
1185 The zero-based index of the image associated with the item
a03cf28b
VS
1186 in the 'small' image list
1187 (default: none, mutually exclusive with @c bitmap-small, only if imagelist-small was set).}
326462ae
VZ
1188@row3col{data, integer,
1189 The client data for the item.}
1190@row3col{font, @ref overview_xrcformat_type_font,
1191 The font for the item.}
326462ae 1192@row3col{state, @ref overview_xrcformat_type_style,
ef18e792 1193 The item state. Can be any combination of the following values:
326462ae 1194 - @c wxLIST_STATE_FOCUSED: The item has the focus.
0654158b 1195 - @c wxLIST_STATE_SELECTED: The item is selected.}
07aec89f 1196@row3col{text, @ref overview_xrcformat_type_text,
ef18e792 1197 The text label for the item. }
326462ae
VZ
1198@row3col{textcolour, @ref overview_xrcformat_type_colour,
1199 The text colour for the item. }
326462ae
VZ
1200@endTable
1201
1202Notice that the item position can't be specified here, the items are appended
1203to the list control in order of their appearance.
be42eeb0 1204
a302d595
VS
1205
1206@subsubsection xrc_wxmdiparentframe wxMDIParentFrame
be42eeb0
VS
1207
1208wxMDIParentFrame supports the same properties that @ref xrc_wxfrane does.
1209
1210wxMDIParentFrame may have optional children. When used, the child objects
1211must be of wxMDIChildFrame type.
1212
a302d595
VS
1213
1214@subsubsection xrc_wxmdichildframe wxMDIChildFrame
be42eeb0
VS
1215
1216wxMDIChildFrame supports the same properties that @ref xrc_wxfrane and
1217@ref xrc_wxmdiparentframe do.
1218
1219wxMDIChildFrame can only be used as as immediate child of @ref
1220xrc_wxmdiparentframe.
1221
1222wxMDIChildFrame may have optional children: either exactly one
41e69d79 1223@ref overview_xrcformat_sizers "sizer" child or any number of non-toplevel window
be42eeb0
VS
1224objects. If sizer child is used, it sets
1225@ref wxSizer::SetSizeHints() "size hints" too.
1226
a302d595
VS
1227
1228@subsubsection xrc_wxmenu wxMenu
be42eeb0
VS
1229
1230@beginTable
1231@hdr3col{property, type, description}
41e69d79 1232@row3col{label, @ref overview_xrcformat_type_text,
be42eeb0
VS
1233 Menu's label (default: empty, but required for menus other
1234 than popup menus).}
697c1d39
VS
1235@row3col{style, @ref overview_xrcformat_type_style,
1236 Window style for the menu.}
41e69d79 1237@row3col{help, @ref overview_xrcformat_type_text,
be42eeb0
VS
1238 Help shown in statusbar when the menu is selected (only for submenus
1239 of another wxMenu, default: none).}
41e69d79 1240@row3col{enabled, @ref overview_xrcformat_type_bool,
be42eeb0
VS
1241 Is the submenu item enabled (only for submenus of another wxMenu,
1242 default: 1)?}
1243@endTable
1244
1245Note that unlike most controls, wxMenu does @em not have
697c1d39 1246@ref overview_xrcformat_std_props, with the exception of @c style.
be42eeb0
VS
1247
1248A menu object can have one or more child objects of the wxMenuItem or wxMenu
1249classes or @c break or @c separator pseudo-classes.
1250
1251The @c separator pseudo-class is used to insert separators into the menu and
1252has neither properties nor children. Likewise, @c break inserts a break (see
1253wxMenu::Break()).
1254
1255wxMenuItem objects support the following properties:
1256
1257@beginTable
1258@hdr3col{property, type, description}
41e69d79 1259@row3col{label, @ref overview_xrcformat_type_text,
be42eeb0 1260 Item's label (required).}
41e69d79 1261@row3col{accel, @ref overview_xrcformat_type_text_notrans,
be42eeb0 1262 Item's accelerator (default: none).}
41e69d79 1263@row3col{radio, @ref overview_xrcformat_type_bool,
be42eeb0 1264 Item's kind is wxITEM_RADIO (default: 0)?}
41e69d79 1265@row3col{checkable, @ref overview_xrcformat_type_bool,
be42eeb0 1266 Item's kind is wxITEM_CHECK (default: 0)?}
41e69d79 1267@row3col{bitmap, @ref overview_xrcformat_type_bitmap,
be42eeb0 1268 Bitmap to show with the item (default: none).}
41e69d79 1269@row3col{bitmap2, @ref overview_xrcformat_type_bitmap,
be42eeb0 1270 Bitmap for the checked state (wxMSW, if checkable; default: none).}
41e69d79 1271@row3col{help, @ref overview_xrcformat_type_text,
be42eeb0 1272 Help shown in statusbar when the item is selected (default: none).}
41e69d79 1273@row3col{enabled, @ref overview_xrcformat_type_bool,
be42eeb0 1274 Is the item enabled (default: 1)?}
41e69d79 1275@row3col{checked, @ref overview_xrcformat_type_bool,
be42eeb0
VS
1276 Is the item checked initially (default: 0)?}
1277@endTable
1278
1279Example:
1280@code
1281<object class="wxMenu" name="menu_edit">
1282 <style>wxMENU_TEAROFF</style>
1283 <label>_Edit</label>
1284 <object class="wxMenuItem" name="wxID_FIND">
1285 <label>_Find...</label>
1286 <accel>Ctrl-F</accel>
1287 </object>
1288 <object class="separator"/>
1289 <object class="wxMenuItem" name="menu_fuzzy">
1290 <label>Translation is _fuzzy</label>
1291 <checkable>1</checkable>
1292 </object>
1293 <object class="wxMenu" name="submenu">
1294 <label>A submenu</label>
1295 <object class="wxMenuItem" name="foo">...</object>
1296 ...
1297 </object>
1298 <object class="separator" platform="unix"/>
1299 <object class="wxMenuItem" name="wxID_PREFERENCES" platform="unix">
1300 <label>_Preferences</label>
1301 </object>
1302</object>
1303@endcode
a302d595
VS
1304
1305@subsubsection xrc_wxmenubar wxMenuBar
be42eeb0 1306
697c1d39
VS
1307@beginTable
1308@hdr3col{property, type, description}
1309@row3col{style, @ref overview_xrcformat_type_style,
1310 Window style for the menu bar.}
1311@endTable
1312
1313Note that unlike most controls, wxMenuBar does @em not have
1314@ref overview_xrcformat_std_props, with the exception of @c style.
be42eeb0
VS
1315
1316A menubar can have one or more child objects of the @ref xrc_wxmenu "wxMenu"
1317class.
1318
a302d595
VS
1319
1320@subsubsection xrc_wxnotebook wxNotebook
be42eeb0 1321
a03cf28b
VS
1322@beginTable
1323@hdr3col{property, type, description}
1324@row3col{imagelist, @ref overview_xrcformat_type_imagelist,
1325 Image list to use for the images (default: none, built implicitly).}
1326@endTable
1327
be42eeb0 1328A notebook can have one or more child objects of the @c notebookpage
a03cf28b
VS
1329pseudo-class.
1330
326462ae 1331@c notebookpage objects have the following properties:
be42eeb0
VS
1332
1333@beginTable
1334@hdr3col{property, type, description}
41e69d79 1335@row3col{label, @ref overview_xrcformat_type_text,
be42eeb0 1336 Page's title (required).}
41e69d79 1337@row3col{bitmap, @ref overview_xrcformat_type_bitmap,
a03cf28b
VS
1338 Bitmap shown alongside the label
1339 (default: none, mutually exclusive with @c image).}
326462ae
VZ
1340@row3col{image, integer,
1341 The zero-based index of the image associated with the item
a03cf28b
VS
1342 into the image list
1343 (default: none, mutually exclusive with @c bitmap, only if imagelist was set).}
41e69d79 1344@row3col{selected, @ref overview_xrcformat_type_bool,
be42eeb0
VS
1345 Is the page selected initially (only one page can be selected; default: 0)?}
1346@endTable
1347
1348Each @c notebookpage has exactly one non-toplevel window as its child.
1349
1350Example:
1351@code
1352<object class="wxNotebook">
1353 <style>wxBK_BOTTOM</style>
1354 <object class="notebookpage">
1355 <label>Page 1</label>
1356 <object class="wxPanel" name="page_1">
1357 ...
1358 </object>
1359 </object>
1360 <object class="notebookpage">
1361 <label>Page 2</label>
1362 <object class="wxPanel" name="page_2">
1363 ...
1364 </object>
1365 </object>
1366</object>
1367@endcode
1368
a302d595
VS
1369
1370@subsubsection xrc_wxownerdrawncombobox wxOwnerDrawnComboBox
be42eeb0
VS
1371
1372wxOwnerDrawnComboBox has the same properties as
1373@ref xrc_wxcombobox "wxComboBox", plus the following additional properties:
1374
1375@beginTable
1376@hdr3col{property, type, description}
41e69d79 1377@row3col{buttonsize, @ref overview_xrcformat_type_size,
be42eeb0
VS
1378 Size of the dropdown button (default: default).}
1379@endTable
1380
a302d595
VS
1381
1382@subsubsection xrc_wxpanel wxPanel
be42eeb0
VS
1383
1384No additional properties.
1385
1386wxPanel may have optional children: either exactly one
41e69d79 1387@ref overview_xrcformat_sizers "sizer" child or any number of non-toplevel window
be42eeb0
VS
1388objects.
1389
a302d595
VS
1390
1391@subsubsection xrc_wxpropertysheetdialog wxPropertySheetDialog
be42eeb0
VS
1392
1393@beginTable
1394@hdr3col{property, type, description}
41e69d79 1395@row3col{title, @ref overview_xrcformat_type_text,
be42eeb0 1396 Dialog's title (default: empty).}
41e69d79 1397@row3col{icon, @ref overview_xrcformat_type_bitmap,
be42eeb0 1398 Dialog's icon (default: not used).}
41e69d79 1399@row3col{centered, @ref overview_xrcformat_type_bool,
be42eeb0 1400 Whether the dialog should be centered on the screen (default: 0).}
41e69d79 1401@row3col{buttons, @ref overview_xrcformat_type_style,
be42eeb0
VS
1402 Buttons to show, combination of flags accepted by
1403 wxPropertySheetDialog::CreateButtons() (default: 0).}
1404@endTable
1405
1406A sheet dialog can have one or more child objects of the @c propertysheetpage
1407pseudo-class (similarly to @ref xrc_wxnotebook "wxNotebook" and its
1408@c notebookpage). @c propertysheetpage objects have the following properties:
1409
1410@beginTable
1411@hdr3col{property, type, description}
41e69d79 1412@row3col{label, @ref overview_xrcformat_type_text,
be42eeb0 1413 Sheet page's title (required).}
41e69d79 1414@row3col{bitmap, @ref overview_xrcformat_type_bitmap,
be42eeb0 1415 Bitmap shown alongside the label (default: none).}
41e69d79 1416@row3col{selected, @ref overview_xrcformat_type_bool,
be42eeb0
VS
1417 Is the page selected initially (only one page can be selected; default: 0)?}
1418@endTable
1419
1420Each @c propertysheetpage has exactly one non-toplevel window as its child.
1421
a302d595
VS
1422
1423@subsubsection xrc_wxradiobutton wxRadioButton
be42eeb0
VS
1424
1425@beginTable
1426@hdr3col{property, type, description}
41e69d79 1427@row3col{label, @ref overview_xrcformat_type_text,
be42eeb0 1428 Label shown on the radio button (required).}
41e69d79 1429@row3col{value, @ref overview_xrcformat_type_bool,
be42eeb0
VS
1430 Initial value of the control (default: 0).}
1431@endTable
1432
a302d595
VS
1433
1434@subsubsection xrc_wxradiobox wxRadioBox
be42eeb0
VS
1435
1436@beginTable
1437@hdr3col{property, type, description}
41e69d79 1438@row3col{label, @ref overview_xrcformat_type_text,
be42eeb0
VS
1439 Label for the whole box (required).}
1440@row3col{dimension, integer,
1441 Specifies the maximum number of rows (if style contains
1442 @c wxRA_SPECIFY_ROWS) or columns (if style contains @c wxRA_SPECIFY_COLS)
1443 for a two-dimensional radiobox (default: 1).}
1444@row3col{selection, integer,
1445 Index of the initially selected item or -1 for no selection (default: -1).}
518fafd5 1446@row3col{content, items,
be42eeb0
VS
1447 Content of the control; this property has any number of @c \<item\> XML
1448 elements as its children, with the items text as their text values
1449 (see below; default: empty).}
1450@endTable
1451
1452The @c \<item\> elements have radio buttons' labels as their text values. They
1453can also have some optional XML @em attributes (not properties!):
1454
1455@beginTable
1456@hdr3col{attribute, type, description}
41e69d79 1457@row3col{tooltip, @ref overview_xrcformat_type_string,
be42eeb0 1458 Tooltip to show over this ratio button (default: none).}
41e69d79 1459@row3col{helptext, @ref overview_xrcformat_type_string,
be42eeb0 1460 Contextual help for this radio button (default: none).}
41e69d79 1461@row3col{enabled, @ref overview_xrcformat_type_bool,
be42eeb0 1462 Is the button enabled (default: 1)?}
41e69d79 1463@row3col{hidden, @ref overview_xrcformat_type_bool,
be42eeb0
VS
1464 Is the button hidden initially (default: 0)?}
1465@endTable
1466
1467Example:
1468@code
1469<object class="wxRadioBox" name="controls_radiobox">
1470 <style>wxRA_SPECIFY_COLS</style>
1471 <label>Radio stations</label>
1472 <dimension>1</dimension>
1473 <selection>0</selection>
1474 <content>
1475 <item tooltip="Powerful radio station" helptext="This station is for amateurs of hard rock and heavy metal">Power 108</item>
1476 <item tooltip="Disabled radio station" enabled="0">Power 0</item>
1477 <item tooltip="">WMMS 100.7</item>
1478 <item tooltip="E=mc^2">Energy 98.3</item>
1479 <item helptext="Favourite chukcha's radio">CHUM FM</item>
1480 <item>92FM</item>
1481 <item hidden="1">Very quit station</item>
1482 </content>
1483</object>
1484@endcode
1485
a302d595 1486
07aec89f 1487@subsubsection xrc_wxribbon wxRibbonBar
74a59798
VZ
1488
1489A wxRibbonBar is a container of ribbon pages which, in turn, contain elements
1490that can be wxRibbonControl or wxRibbonGallery.
1491
1492Example:
1493@code
1494<object class="wxRibbonBar" name="ribbonbar">
1495 <object class="page" name="FilePage">
1496 <label>First</label>
1497 <object class="panel">
1498 <label>File</label>
1499 <object class="wxRibbonButtonBar">
1500 <object class="button" name="Open">
1501 <bitmap>open.xpm</bitmap>
1502 <label>Open</label>
1503 </object>
1504 </object>
1505 </object>
1506 </object>
1507 <object class="page" name="ViewPage">
1508 <label>View</label>
1509 <object class="panel">
1510 <label>Zoom</label>
1511 <object class="wxRibbonGallery">
1512 <object class="item">
1513 <bitmap>zoomin.xpm</bitmap>
1514 </object>
1515 <object class="item">
1516 <bitmap>zoomout.xpm</bitmap>
1517 </object>
1518 </object>
1519 </object>
1520 </object>
1521</object>
1522@endcode
1523
07aec89f 1524Notice that wxRibbonBar support in XRC is available in wxWidgets 2.9.5 and
74a59798
VZ
1525later only and you need to explicitly register its handler using
1526@code
1527 #include <wx/xrc/xh_ribbon.h>
1528
1529 AddHandler(new wxRibbonXmlHandler);
1530@endcode
1531to use it.
1532
1533
a302d595 1534@subsubsection xrc_wxrichtextctrl wxRichTextCtrl
be42eeb0
VS
1535
1536@beginTable
1537@hdr3col{property, type, description}
41e69d79 1538@row3col{value, @ref overview_xrcformat_type_text,
be42eeb0
VS
1539 Initial value of the control (default: empty).}
1540@row3col{maxlength, integer,
1541 Maximum length of the text entered (default: unlimited).}
1542@endTable
1543
a3b9c43b
VZ
1544Notice that wxRichTextCtrl support in XRC is available in wxWidgets 2.9.5 and
1545later only and you need to explicitly register its handler using
1546@code
1547 #include <wx/xrc/xh_richtext.h>
1548
1549 AddHandler(new wxRichTextCtrl);
1550@endcode
1551to use it.
1552
a302d595
VS
1553
1554@subsubsection xrc_wxscrollbar wxScrollBar
be42eeb0
VS
1555
1556@beginTable
1557@hdr3col{property, type, description}
1558@row3col{value, integer,
1559 Initial position of the scrollbar (default: 0).}
1560@row3col{range, integer,
1561 Maximum value of the gauge (default: 10).}
1562@row3col{thumbsize, integer,
1563 Size of the thumb (default: 1).}
1564@row3col{pagesize, integer,
1565 Page size (default: 1).}
1566@endTable
a302d595
VS
1567
1568@subsubsection xrc_wxscrolledwindow wxScrolledWindow
be42eeb0
VS
1569
1570@beginTable
1571@hdr3col{property, type, description}
41e69d79 1572@row3col{scrollrate, @ref overview_xrcformat_type_size,
be42eeb0
VS
1573 Scroll rate in @em x and @em y directions (default: not set;
1574 required if the window has a sizer child).}
1575@endTable
1576
1577wxScrolledWindow may have optional children: either exactly one
41e69d79 1578@ref overview_xrcformat_sizers "sizer" child or any number of non-toplevel window
be42eeb0
VS
1579objects. If sizer child is used, wxSizer::FitInside() is used (instead of
1580wxSizer::Fit() as usual) and so the children don't determine scrolled window's
1581minimal size, they only affect @em virtual size. Usually, both @c scrollrate
1582and either @c size or @c minsize on containing sizer item should be used
1583in this case.
1584
a302d595
VS
1585
1586@subsubsection xrc_wxsimplehtmllistbox wxSimpleHtmlListBox
a302d595 1587
be42eeb0
VS
1588wxSimpleHtmlListBox has same properties as @ref xrc_wxlistbox "wxListBox".
1589The only difference is that the text contained in @c \<item\> elements is
1590HTML markup. Note that the markup has to be escaped:
1591
1592@code
1593<object class="wxSimpleHtmlListBox">
1594 <content>
1595 <item>&lt;b&gt;Bold&lt;/b&gt; Milk</item>
1596 </content>
1597</object>
1598@endcode
1599
1600(X)HTML markup elements cannot be included directly:
1601
1602@code
1603<object class="wxSimpleHtmlListBox">
1604 <content>
1605 <!-- This is incorrect, doesn't work! -->
1606 <item><b>Bold</b> Milk</item>
1607 </content>
1608</object>
1609@endcode
1610
1611
1612@subsubsection xrc_wxslider wxSlider
1613
1614@beginTable
1615@hdr3col{property, type, description}
1616@row3col{value, integer,
033508e1 1617 Initial value of the control (default: 0).}
be42eeb0 1618@row3col{min, integer,
033508e1 1619 Minimum allowed value (default: 0).}
be42eeb0 1620@row3col{max, integer,
033508e1 1621 Maximum allowed value (default: 100).}
be42eeb0 1622@row3col{pagesize, integer,
7d001b19 1623 Page size; number of steps the slider moves when the user moves
be42eeb0
VS
1624 pages up or down (default: unset).}
1625@row3col{linesize, integer,
1626 Line size; number of steps the slider moves when the user moves it
1627 up or down a line (default: unset).}
1628@row3col{tickfreq, integer,
1629 Tick marks frequency (Windows only; default: unset).}
1630@row3col{tick, integer,
1631 Tick position (Windows only; default: unset).}
1632@row3col{thumb, integer,
1633 Thumb length (Windows only; default: unset).}
1634@row3col{selmin, integer,
1635 Selection start position (Windows only; default: unset).}
1636@row3col{selmax, integer,
1637 Selection end position (Windows only; default: unset).}
1638@endTable
1639
a302d595 1640
07c22580 1641@subsubsection xrc_wxspinbutton wxSpinButton
be42eeb0
VS
1642
1643@beginTable
1644@hdr3col{property, type, description}
1645@row3col{value, integer,
033508e1 1646 Initial value of the control (default: 0).}
be42eeb0 1647@row3col{min, integer,
033508e1 1648 Minimum allowed value (default: 0).}
be42eeb0 1649@row3col{max, integer,
033508e1 1650 Maximum allowed value (default: 100).}
be42eeb0
VS
1651@endTable
1652
a302d595 1653
07c22580
VS
1654@subsubsection xrc_wxspinctrl wxSpinCtrl
1655
9e565667
VZ
1656wxSpinCtrl supports the same properties as @ref xrc_wxspinbutton and, since
1657wxWidgets 2.9.5, another one:
1658@beginTable
1659@row3col{base, integer,
1660 Numeric base, currently can be only 10 or 16 (default: 10).}
1661@endTable
07c22580
VS
1662
1663
a302d595 1664@subsubsection xrc_wxsplitterwindow wxSplitterWindow
be42eeb0
VS
1665
1666@beginTable
1667@hdr3col{property, type, description}
41e69d79 1668@row3col{orientation, @ref overview_xrcformat_type_string,
be42eeb0 1669 Orientation of the splitter, either "vertical" or "horizontal" (default: horizontal).}
85d64f6a 1670@row3col{sashpos, @ref overview_xrcformat_type_dimension,
be42eeb0 1671 Initial position of the sash (default: 0).}
85d64f6a 1672@row3col{minsize, @ref overview_xrcformat_type_dimension,
be42eeb0 1673 Minimum child size (default: not set).}
881f5a1c 1674@row3col{gravity, @ref overview_xrcformat_type_float,
be42eeb0
VS
1675 Sash gravity, see wxSplitterWindow::SetSashGravity() (default: not set).}
1676@endTable
1677
1678wxSplitterWindow must have one or two children that are non-toplevel window
1679objects. If there's only one child, it is used as wxSplitterWindow's only
1680visible child. If there are two children, the first one is used for left/top
1681child and the second one for right/bottom child window.
1682
a302d595
VS
1683
1684@subsubsection xrc_wxsearchctrl wxSearchCtrl
be42eeb0
VS
1685
1686@beginTable
1687@hdr3col{property, type, description}
41e69d79 1688@row3col{value, @ref overview_xrcformat_type_text,
be42eeb0
VS
1689 Initial value of the control (default: empty).}
1690@endTable
1691
a302d595
VS
1692
1693@subsubsection xrc_wxstatusbar wxStatusBar
be42eeb0
VS
1694
1695@beginTable
1696@hdr3col{property, type, description}
1697@row3col{fields, integer,
1698 Number of status bar fields (default: 1).}
41e69d79 1699@row3col{widths, @ref overview_xrcformat_type_string,
be42eeb0
VS
1700 Comma-separated list of @em fields integers. Each value specifies width
1701 of one field; the values are interpreted using the same convention used
07aec89f
VS
1702 by wxStatusBar::SetStatusWidths() (default: not set).}
1703@row3col{styles, @ref overview_xrcformat_type_string,
1704 Comma-separated list of @em fields style values. Each value specifies style
1705 of one field and can be one of @c wxSB_NORMAL, @c wxSB_FLAT, @c wxSB_RAISED or
1706 @c wxSB_SUNKEN (default: not set).}
be42eeb0
VS
1707@endTable
1708
1709
a302d595
VS
1710
1711@subsubsection xrc_wxstaticbitmap wxStaticBitmap
be42eeb0
VS
1712
1713@beginTable
1714@hdr3col{property, type, description}
41e69d79 1715@row3col{bitmap, @ref overview_xrcformat_type_bitmap,
be42eeb0
VS
1716 Bitmap to display (required).}
1717@endTable
a302d595
VS
1718
1719@subsubsection xrc_wxstaticbox wxStaticBox
be42eeb0
VS
1720
1721@beginTable
1722@hdr3col{property, type, description}
41e69d79 1723@row3col{label, @ref overview_xrcformat_type_text,
be42eeb0
VS
1724 Static box's label (required).}
1725@endTable
1726
a302d595
VS
1727
1728@subsubsection xrc_wxstaticline wxStaticLine
be42eeb0
VS
1729
1730No additional properties.
1731
a302d595
VS
1732
1733@subsubsection xrc_wxstatictext wxStaticText
be42eeb0
VS
1734
1735@beginTable
1736@hdr3col{property, type, description}
41e69d79 1737@row3col{label, @ref overview_xrcformat_type_text,
be42eeb0 1738 Label to display (required).}
c4c885f0 1739@row3col{wrap, @ref overview_xrcformat_type_dimension,
d5877228 1740 Wrap the text so that each line is at most the given number of pixels, see
be42eeb0
VS
1741 wxStaticText::Wrap() (default: no wrap).}
1742@endTable
a302d595
VS
1743
1744@subsubsection xrc_wxtextctrl wxTextCtrl
be42eeb0
VS
1745
1746@beginTable
1747@hdr3col{property, type, description}
41e69d79 1748@row3col{value, @ref overview_xrcformat_type_text,
be42eeb0
VS
1749 Initial value of the control (default: empty).}
1750@row3col{maxlength, integer,
1751 Maximum length of the text which can be entered by user (default: unlimited).}
1752@endTable
1753
a302d595 1754
6b9103c6
VZ
1755@subsubsection xrc_wxtimepickerctrl wxTimePickerCtrl
1756
1757No additional properties.
1758
1759
8def3e6e 1760@subsubsection xrc_wxtogglebutton wxToggleButton
be42eeb0
VS
1761
1762@beginTable
1763@hdr3col{property, type, description}
41e69d79 1764@row3col{label, @ref overview_xrcformat_type_text,
be42eeb0 1765 Label to display on the button (required).}
41e69d79 1766@row3col{checked, @ref overview_xrcformat_type_bool,
be42eeb0
VS
1767 Should the button be checked/pressed initially (default: 0)?}
1768@endTable
a302d595
VS
1769
1770@subsubsection xrc_wxtoolbar wxToolBar
be42eeb0
VS
1771
1772@beginTable
1773@hdr3col{property, type, description}
41e69d79 1774@row3col{bitmapsize, @ref overview_xrcformat_type_size,
be42eeb0 1775 Size of toolbar bitmaps (default: not set).}
41e69d79 1776@row3col{margins, @ref overview_xrcformat_type_size,
be42eeb0
VS
1777 Margins (default: platform default).}
1778@row3col{packing, integer,
1779 Packing, see wxToolBar::SetToolPacking() (default: not set).}
1780@row3col{separation, integer,
1781 Default separator size, see wxToolBar::SetToolSeparation() (default: not set).}
41e69d79 1782@row3col{dontattachtoframe, @ref overview_xrcformat_type_bool,
be42eeb0
VS
1783 If set to 0 and the toolbar object is child of a wxFrame,
1784 wxFrame::SetToolBar() is called; otherwise, you have to add it to a frame
1785 manually. The toolbar is attached by default, you have to set this property
1786 to 1 to disable this behaviour (default: 0).}
1787@endTable
1788
1789A toolbar can have one or more child objects of any wxControl-derived class or
07aec89f 1790one of three pseudo-classes: @c separator, @c space or @c tool.
be42eeb0
VS
1791
1792The @c separator pseudo-class is used to insert separators into the toolbar and
5852e62f
VZ
1793has neither properties nor children. Similarly, the @c space pseudo-class is
1794used for stretchable spaces (see wxToolBar::AddStretchableSpace(), new since
1795wxWidgets 2.9.1).
be42eeb0
VS
1796
1797The @c tool pseudo-class objects specify toolbar buttons and have the following
1798properties:
1799
1800@beginTable
1801@hdr3col{property, type, description}
41e69d79 1802@row3col{bitmap, @ref overview_xrcformat_type_bitmap,
be42eeb0 1803 Tool's bitmap (required).}
41e69d79 1804@row3col{bitmap2, @ref overview_xrcformat_type_bitmap,
be42eeb0 1805 Bitmap for disabled tool (default: derived from @c bitmap).}
41e69d79 1806@row3col{label, @ref overview_xrcformat_type_text,
be42eeb0 1807 Label to display on the tool (default: no label).}
41e69d79 1808@row3col{radio, @ref overview_xrcformat_type_bool,
be42eeb0 1809 Item's kind is wxITEM_RADIO (default: 0)?}
41e69d79 1810@row3col{toggle, @ref overview_xrcformat_type_bool,
be42eeb0 1811 Item's kind is wxITEM_CHECK (default: 0)?}
e2517f17 1812@row3col{dropdown, see below,
fbf23d57 1813 Item's kind is wxITEM_DROPDOWN (default: 0)? (only available since wxWidgets 2.9.0)}
41e69d79 1814@row3col{tooltip, @ref overview_xrcformat_type_text,
be42eeb0 1815 Tooltip to use for the tool (default: none).}
41e69d79 1816@row3col{longhelp, @ref overview_xrcformat_type_text,
be42eeb0 1817 Help text shown in statusbar when the mouse is on the tool (default: none).}
41e69d79 1818@row3col{disabled, @ref overview_xrcformat_type_bool,
be42eeb0 1819 Is the tool initially disabled (default: 0)?}
f72ed385
VZ
1820@row3col{checked, @ref overview_xrcformat_type_bool,
1821 Is the tool initially checked (default: 0)? (only available since wxWidgets 2.9.3)}
be42eeb0
VS
1822@endTable
1823
e2517f17 1824The presence of a @c dropdown property indicates that the tool is of type
fbf23d57 1825wxITEM_DROPDOWN. It must be either empty or contain exactly one @ref
e2517f17
VZ
1826xrc_wxmenu child object defining the drop-down button associated menu.
1827
1828Notice that @c radio, @c toggle and @c dropdown are mutually exclusive.
be42eeb0 1829
07aec89f 1830Children that are not @c tool, @c space or @c separator must be instances of classes
be42eeb0
VS
1831derived from wxControl and are added to the toolbar using
1832wxToolBar::AddControl().
1833
1834Example:
1835@code
1836<object class="wxToolBar">
1837 <style>wxTB_FLAT|wxTB_NODIVIDER</style>
1838 <object class="tool" name="foo">
1839 <bitmap>foo.png</bitmap>
1840 <label>Foo</label>
1841 </object>
1842 <object class="tool" name="bar">
1843 <bitmap>bar.png</bitmap>
1844 <label>Bar</label>
1845 </object>
5852e62f 1846 <object class="separator"/>
e2517f17
VZ
1847 <object class="tool" name="view_auto">
1848 <bitmap>view.png</bitmap>
1849 <label>View</label>
1850 <dropdown>
1851 <object class="wxMenu">
1852 <object class="wxMenuItem" name="view_as_text">
1853 <label>View as text</label>
1854 </object>
1855 <object class="wxMenuItem" name="view_as_hex">
1856 <label>View as binary</label>
1857 </object>
1858 </object>
1859 </dropdown>
1860 </object>
5852e62f 1861 <object class="space"/>
be42eeb0
VS
1862 <object class="wxComboBox">
1863 <content>
1864 <item>Just</item>
1865 <item>a combobox</item>
1866 <item>in the toolbar</item>
1867 </content>
1868 </object>
1869</object>
1870
1871@endcode
1872
a302d595 1873
4689441b
VZ
1874@subsubsection xrc_wxtoolbook wxToolbook
1875
a03cf28b
VS
1876@beginTable
1877@hdr3col{property, type, description}
1878@row3col{imagelist, @ref overview_xrcformat_type_imagelist,
1879 Image list to use for the images (default: none, built implicitly).}
1880@endTable
1881
4689441b
VZ
1882A toolbook can have one or more child objects of the @c toolbookpage
1883pseudo-class (similarly to @ref xrc_wxnotebook "wxNotebook" and its
a03cf28b
VS
1884@c notebookpage).
1885
4689441b
VZ
1886@c toolbookpage objects have the following properties:
1887
1888@beginTable
1889@hdr3col{property, type, description}
1890@row3col{label, @ref overview_xrcformat_type_text,
1891 Sheet page's title (required).}
1892@row3col{bitmap, @ref overview_xrcformat_type_bitmap,
a03cf28b
VS
1893 Bitmap shown alongside the label
1894 (default: none, mutually exclusive with @c image).}
4689441b
VZ
1895@row3col{image, integer,
1896 The zero-based index of the image associated with the item
a03cf28b
VS
1897 into the image list
1898 (default: none, mutually exclusive with @c bitmap, only if imagelist was set).}
4689441b
VZ
1899@row3col{selected, @ref overview_xrcformat_type_bool,
1900 Is the page selected initially (only one page can be selected; default: 0)?}
1901@endTable
1902
1903Each @c toolbookpage has exactly one non-toplevel window as its child.
1904
1905
a302d595 1906@subsubsection xrc_wxtreectrl wxTreeCtrl
be42eeb0 1907
a03cf28b
VS
1908@beginTable
1909@hdr3col{property, type, description}
1910@row3col{imagelist, @ref overview_xrcformat_type_imagelist,
1911 Image list to use for the images (default: none).}
1912@endTable
be42eeb0 1913
a302d595
VS
1914
1915@subsubsection xrc_wxtreebook wxTreebook
be42eeb0 1916
a03cf28b
VS
1917@beginTable
1918@hdr3col{property, type, description}
1919@row3col{imagelist, @ref overview_xrcformat_type_imagelist,
1920 Image list to use for the images (default: none, built implicitly).}
1921@endTable
1922
be42eeb0
VS
1923A treebook can have one or more child objects of the @c treebookpage
1924pseudo-class (similarly to @ref xrc_wxnotebook "wxNotebook" and its
a03cf28b
VS
1925@c notebookpage).
1926
326462ae 1927@c treebookpage objects have the following properties:
be42eeb0
VS
1928
1929@beginTable
1930@hdr3col{property, type, description}
1931@row3col{depth, integer,
1932 Page's depth in the labels tree (required; see below).}
41e69d79 1933@row3col{label, @ref overview_xrcformat_type_text,
be42eeb0 1934 Sheet page's title (required).}
41e69d79 1935@row3col{bitmap, @ref overview_xrcformat_type_bitmap,
a03cf28b 1936 Bitmap shown alongside the label (default: none, mutually exclusive with @c image).}
326462ae
VZ
1937@row3col{image, integer,
1938 The zero-based index of the image associated with the item
a03cf28b
VS
1939 into the image list
1940 (default: none, mutually exclusive with @c bitmap, only if imagelist was set).}
41e69d79 1941@row3col{selected, @ref overview_xrcformat_type_bool,
be42eeb0 1942 Is the page selected initially (only one page can be selected; default: 0)?}
2b232dec
VZ
1943@row3col{expanded, @ref overview_xrcformat_type_bool,
1944 If set to 1, the page is initially expanded. By default all pages are
1945 initially collapsed.}
be42eeb0
VS
1946@endTable
1947
1948Each @c treebookpage has exactly one non-toplevel window as its child.
1949
1950The tree of labels is not described using nested @c treebookpage objects, but
1951using the @em depth property. Toplevel pages have depth 0, their child pages
1952have depth 1 and so on. A @c treebookpage's label is inserted as child of
1953the latest preceding page with depth equal to @em depth-1. For example, this
1954XRC markup:
1955
1956@code
1957<object class="wxTreebook">
1958 ...
1959 <object class="treebookpage">
1960 <depth>0</depth>
1961 <label>Page 1</label>
1962 <object class="wxPanel">...</object>
1963 </object>
1964 <object class="treebookpage">
1965 <depth>1</depth>
1966 <label>Subpage 1A</label>
1967 <object class="wxPanel">...</object>
1968 </object>
1969 <object class="treebookpage">
1970 <depth>2</depth>
1971 <label>Subsubpage 1</label>
1972 <object class="wxPanel">...</object>
1973 </object>
1974 <object class="treebookpage">
1975 <depth>1</depth>
1976 <label>Subpage 1B</label>
1977 <object class="wxPanel">...</object>
1978 </object>
1979 <object class="treebookpage">
1980 <depth>2</depth>
1981 <label>Subsubpage 2</label>
1982 <object class="wxPanel">...</object>
1983 </object>
1984 <object class="treebookpage">
1985 <depth>0</depth>
1986 <label>Page 2</label>
1987 <object class="wxPanel">...</object>
1988 </object>
1989</object>
1990@endcode
1991
1992corresponds to the following tree of labels:
1993
1994 - Page 1
1995 - Subpage 1A
1996 - Subsubpage 1
1997 - Subpage 1B
1998 - Subsubpage 2
1999 - Page 2
2000
a302d595
VS
2001
2002@subsubsection xrc_wxwizard wxWizard
be42eeb0
VS
2003
2004@beginTable
2005@hdr3col{property, type, description}
41e69d79 2006@row3col{bitmap, @ref overview_xrcformat_type_bitmap,
be42eeb0
VS
2007 Bitmap to display on the left side of the wizard (default: none).}
2008@endTable
2009
2010A wizard object can have one or more child objects of the wxWizardPage or
2011wxWizardPageSimple classes. They both support the following properties
41e69d79 2012(in addition to @ref overview_xrcformat_std_props):
be42eeb0
VS
2013
2014@beginTable
2015@hdr3col{property, type, description}
41e69d79 2016@row3col{bitmap, @ref overview_xrcformat_type_bitmap,
be42eeb0
VS
2017 Page-specific bitmap (default: none).}
2018@endTable
2019
07aec89f
VS
2020wxWizardPage and wxWizardPageSimple nodes may have optional children: either
2021exactly one @ref overview_xrcformat_sizers "sizer" child or any number of
2022non-toplevel window objects.
2023
be42eeb0 2024wxWizardPageSimple pages are automatically chained together; wxWizardPage pages
4c51a665 2025transitions must be handled programmatically.
a302d595
VS
2026
2027
41e69d79 2028@section overview_xrcformat_sizers Sizers
a302d595
VS
2029
2030Sizers are handled slightly differently in XRC resources than they are in
2031wxWindow hierarchy. wxWindow's sizers hierarchy is parallel to the wxWindow
5fcef184 2032children hierarchy: child windows are children of their parent window and
a302d595
VS
2033the sizer (or sizers) form separate hierarchy attached to the window with
2034wxWindow::SetSizer().
2035
2036In XRC, the two hierarchies are merged together: sizers are children of other
2037sizers or windows and they can contain child window objects.
2038
2039If a sizer is child of a window object in the resource, it must be the only
2040child and it will be attached to the parent with wxWindow::SetSizer().
2041Additionally, if the window doesn't have its size explicitly set,
2042wxSizer::Fit() is used to resize the window. If the parent window is
2043toplevel window, wxSizer::SetSizeHints() is called to set its hints.
2044
2045A sizer object can have one or more child objects of one of two pseudo-classes:
41e69d79 2046@c sizeritem or @c spacer (see @ref overview_xrcformat_wxstddialogbuttonsizer for
a302d595
VS
2047an exception). The former specifies an element (another sizer or a window)
2048to include in the sizer, the latter adds empty space to the sizer.
2049
2050@c sizeritem objects have exactly one child object: either another sizer
2051object, or a window object. @c spacer objects don't have any children, but
2052they have one property:
2053
2054@beginTable
2055@hdr3col{property, type, description}
41e69d79 2056@row3col{size, @ref overview_xrcformat_type_size, Size of the empty space (required).}
a302d595
VS
2057@endTable
2058
2059Both @c sizeritem and @c spacer objects can have any of the following
2060properties:
2061
2062@beginTable
2063@hdr3col{property, type, description}
2064@row3col{option, integer,
2065 The "option" value for sizers. Used by wxBoxSizer to set proportion of
2066 the item in the growable direction (default: 0).}
41e69d79 2067@row3col{flag, @ref overview_xrcformat_type_style,
a302d595 2068 wxSizerItem flags (default: 0).}
41e69d79 2069@row3col{border, @ref overview_xrcformat_type_dimension,
a302d595
VS
2070 Size of the border around the item (directions are specified in flags)
2071 (default: 0).}
41e69d79 2072@row3col{minsize, @ref overview_xrcformat_type_size,
a302d595 2073 Minimal size of this item (default: no min size).}
41e69d79 2074@row3col{ratio, @ref overview_xrcformat_type_size,
a302d595 2075 Item ratio, see wxSizer::SetRatio() (default: no ratio).}
41e69d79 2076@row3col{cellpos, @ref overview_xrcformat_type_pos,
a302d595 2077 (wxGridBagSizer only) Position, see wxGBSizerItem::SetPos() (required). }
41e69d79 2078@row3col{cellspan, @ref overview_xrcformat_type_size,
a302d595
VS
2079 (wxGridBagSizer only) Span, see wxGBSizerItem::SetSpan() (required). }
2080@endTable
2081
2082Example of sizers XRC code:
2083@code
2084<object class="wxDialog" name="derived_dialog">
2085 <title>Derived Dialog Example</title>
2086 <centered>1</centered>
2087 <!-- this sizer is set to be this dialog's sizer: -->
2088 <object class="wxFlexGridSizer">
2089 <cols>1</cols>
2090 <rows>0</rows>
2091 <vgap>0</vgap>
2092 <hgap>0</hgap>
5a3eee0d
VZ
2093 <growablecols>0:1</growablecols>
2094 <growablerows>0:1</growablerows>
a302d595
VS
2095 <object class="sizeritem">
2096 <flag>wxALIGN_CENTRE|wxALL</flag>
2097 <border>5</border>
2098 <object class="wxButton" name="my_button">
2099 <label>My Button</label>
2100 </object>
2101 </object>
2102 <object class="sizeritem">
2103 <flag>wxALIGN_CENTRE|wxALL</flag>
2104 <border>5</border>
2105 <object class="wxBoxSizer">
2106 <orient>wxHORIZONTAL</orient>
2107 <object class="sizeritem">
2108 <flag>wxALIGN_CENTRE|wxALL</flag>
2109 <border>5</border>
2110 <object class="wxCheckBox" name="my_checkbox">
2111 <label>Enable this text control:</label>
2112 </object>
2113 </object>
2114 <object class="sizeritem">
2115 <flag>wxALIGN_CENTRE|wxALL</flag>
2116 <border>5</border>
2117 <object class="wxTextCtrl" name="my_textctrl">
2118 <size>80,-1</size>
2119 <value></value>
2120 </object>
2121 </object>
2122 </object>
2123 </object>
2124 ...
2125 </object>
2126</object>
2127@endcode
2128
2129The sizer classes that can be used are listed below, together with their
2130class-specific properties. All classes support the following properties:
2131
2132@beginTable
2133@hdr3col{property, type, description}
41e69d79 2134@row3col{minsize, @ref overview_xrcformat_type_size,
a302d595
VS
2135 Minimal size that this sizer will have, see wxSizer::SetMinSize()
2136 (default: no min size).}
2137@endTable
2138
41e69d79 2139@subsection overview_xrcformat_wxboxsizer wxBoxSizer
a302d595
VS
2140
2141@beginTable
2142@hdr3col{property, type, description}
41e69d79 2143@row3col{orient, @ref overview_xrcformat_type_style,
a302d595
VS
2144 Sizer orientation, "wxHORIZONTAL" or "wxVERTICAL" (default: wxHORIZONTAL).}
2145@endTable
2146
41e69d79 2147@subsection overview_xrcformat_wxstaticsboxizer wxStaticBoxSizer
a302d595
VS
2148
2149@beginTable
2150@hdr3col{property, type, description}
41e69d79 2151@row3col{orient, @ref overview_xrcformat_type_style,
a302d595 2152 Sizer orientation, "wxHORIZONTAL" or "wxVERTICAL" (default: wxHORIZONTAL).}
41e69d79 2153@row3col{label, @ref overview_xrcformat_type_text,
a302d595
VS
2154 Label to be used for the static box around the sizer (required).}
2155@endTable
2156
41e69d79 2157@subsection overview_xrcformat_wxgridsizer wxGridSizer
a302d595
VS
2158
2159@beginTable
2160@hdr3col{property, type, description}
0e32e86a
VS
2161@row3col{rows, integer, Number of rows in the grid (default: 0 - determine automatically).}
2162@row3col{cols, integer, Number of columns in the grid (default: 0 - determine automatically).}
83e18117
VS
2163@row3col{vgap, @ref overview_xrcformat_type_dimension, Vertical gap between children (default: 0).}
2164@row3col{hgap, @ref overview_xrcformat_type_dimension, Horizontal gap between children (default: 0).}
a302d595
VS
2165@endTable
2166
41e69d79 2167@subsection overview_xrcformat_wxflexgridsizer wxFlexGridSizer
a302d595
VS
2168
2169@beginTable
2170@hdr3col{property, type, description}
0e32e86a
VS
2171@row3col{rows, integer, Number of rows in the grid (default: 0 - determine automatically).}
2172@row3col{cols, integer, Number of columns in the grid (default: 0 - determine automatically).}
83e18117
VS
2173@row3col{vgap, @ref overview_xrcformat_type_dimension, Vertical gap between children (default: 0).}
2174@row3col{hgap, @ref overview_xrcformat_type_dimension, Horizontal gap between children (default: 0).}
5a3eee0d
VZ
2175@row3col{flexibledirection, @ref overview_xrcformat_type_style,
2176 Flexible direction, @c wxVERTICAL, @c wxHORIZONTAL or @c wxBOTH (default).
2177 This property is only available since wxWidgets 2.9.5.}
2178@row3col{nonflexiblegrowmode, @ref overview_xrcformat_type_style,
2179 Grow mode in the non-flexible direction,
2180 @c wxFLEX_GROWMODE_NONE, @c wxFLEX_GROWMODE_SPECIFIED (default) or
2181 @c wxFLEX_GROWMODE_ALL.
2182 This property is only available since wxWidgets 2.9.5.}
a302d595 2183@row3col{growablerows, comma-separated integers list,
5a3eee0d
VZ
2184 Comma-separated list of indexes of rows that are growable (none by default).
2185 Since wxWidgets 2.9.5 optional proportion can be appended to each number
2186 after a colon (@c :).}
a302d595 2187@row3col{growablecols, comma-separated integers list,
5a3eee0d
VZ
2188 Comma-separated list of indexes of columns that are growable (none by default).
2189 Since wxWidgets 2.9.5 optional proportion can be appended to each number
2190 after a colon (@c :).}
a302d595
VS
2191@endTable
2192
41e69d79 2193@subsection overview_xrcformat_wxgridbagsizer wxGridBagSizer
a302d595
VS
2194
2195@beginTable
2196@hdr3col{property, type, description}
83e18117
VS
2197@row3col{vgap, @ref overview_xrcformat_type_dimension, Vertical gap between children (default: 0).}
2198@row3col{hgap, @ref overview_xrcformat_type_dimension, Horizontal gap between children (default: 0).}
5a3eee0d
VZ
2199@row3col{flexibledirection, @ref overview_xrcformat_type_style,
2200 Flexible direction, @c wxVERTICAL, @c wxHORIZONTAL, @c wxBOTH (default: @c wxBOTH).}
2201@row3col{nonflexiblegrowmode, @ref overview_xrcformat_type_style,
2202 Grow mode in the non-flexible direction,
2203 @c wxFLEX_GROWMODE_NONE, @c wxFLEX_GROWMODE_SPECIFIED, @c wxFLEX_GROWMODE_ALL
2204 (default: @c wxFLEX_GROWMODE_SPECIFIED).}
a302d595 2205@row3col{growablerows, comma-separated integers list,
5a3eee0d
VZ
2206 Comma-separated list of indexes of rows that are growable,
2207 optionally the proportion can be appended after each number
2208 separated by a @c :
a302d595
VS
2209 (default: none).}
2210@row3col{growablecols, comma-separated integers list,
5a3eee0d
VZ
2211 Comma-separated list of indexes of columns that are growable,
2212 optionally the proportion can be appended after each number
2213 separated by a @c :
a302d595
VS
2214 (default: none).}
2215@endTable
2216
41e69d79 2217@subsection overview_xrcformat_wxwrapsizer wxWrapSizer
a302d595
VS
2218
2219@beginTable
2220@hdr3col{property, type, description}
41e69d79 2221@row3col{orient, @ref overview_xrcformat_type_style,
a302d595 2222 Sizer orientation, "wxHORIZONTAL" or "wxVERTICAL" (required).}
41e69d79 2223@row3col{flag, @ref overview_xrcformat_type_style, wxWrapSizer flags (default: 0).}
a302d595
VS
2224@endTable
2225
41e69d79 2226@subsection overview_xrcformat_wxstddialogbuttonsizer wxStdDialogButtonSizer
a302d595 2227
5fcef184 2228Unlike other sizers, wxStdDialogButtonSizer has neither @c sizeritem
a302d595
VS
2229nor @c spacer children. Instead, it has one or more children of the
2230@c button pseudo-class. @c button objects have no properties and they must
2231always have exactly one child of the @c wxButton class or a class derived from
2232wxButton.
2233
2234Example:
2235@code
2236<object class="wxStdDialogButtonSizer">
2237 <object class="button">
2238 <object class="wxButton" name="wxID_OK">
2239 <label>OK</label>
2240 </object>
2241 </object>
2242 <object class="button">
2243 <object class="wxButton" name="wxID_CANCEL">
2244 <label>Cancel</label>
2245 </object>
2246 </object>
2247</object>
2248@endcode
2249
2250
2251
9d9abdbf 2252@section overview_xrcformat_other_objects Other Objects
a302d595
VS
2253
2254In addition to describing UI elements, XRC files can contain non-windows
2255objects such as bitmaps or icons. This is a concession to Windows developers
2256used to storing them in Win32 resources.
2257
2258Note that unlike Win32 resources, bitmaps included in XRC files are @em not
2259embedded in the XRC file itself. XRC file only contains a reference to another
2260file with bitmap data.
2261
41e69d79 2262@subsection overview_xrcformat_bitmap wxBitmap
a302d595 2263
1dfb6ff0 2264Bitmaps are stored in @c \<object\> element with class set to @c wxBitmap. Such
a302d595
VS
2265bitmaps can then be loaded using wxXmlResource::LoadBitmap(). The content of
2266the element is exactly same as in the case of
41e69d79 2267@ref overview_xrcformat_type_bitmap "bitmap properties", except that toplevel
1dfb6ff0 2268@c \<object\> is used.
a302d595
VS
2269
2270For example, instead of:
2271@code
2272<bitmap>mybmp.png</bitmap>
2273<bitmap stock_id="wxART_NEW"/>
2274@endcode
2275toplevel wxBitmap resources would look like:
2276@code
2277<object class="wxBitmap" name="my_bitmap">mybmp.png</object>
2278<object class="wxBitmap" name="my_new_bitmap" stock_id="wxART_NEW"/>
2279@endcode
2280
2281
41e69d79 2282@subsection overview_xrcformat_icon wxIcon
a302d595 2283
41e69d79 2284wxIcon resources are identical to @ref overview_xrcformat_bitmap "wxBitmap ones",
a302d595
VS
2285except that the class is @c wxIcon.
2286
2287
9d9abdbf 2288@section overview_xrcformat_platform Platform Specific Content
a302d595
VS
2289
2290It is possible to conditionally process parts of XRC files on some platforms
2291only and ignore them on other platforms. @em Any element in XRC file, be it
2292toplevel or arbitrarily nested one, can have the @c platform attribute. When
2293used, @c platform contains |-separated list of platforms that this element
2294should be processed on. It is filtered out and ignored on any other platforms.
2295
2296Possible elemental values are:
2297@beginDefList
2298@itemdef{ @c win, Windows }
5fcef184 2299@itemdef{ @c mac, Mac OS X (or Mac Classic in wxWidgets version supporting it) }
a302d595
VS
2300@itemdef{ @c unix, Any Unix platform @em except OS X }
2301@itemdef{ @c os2, OS/2 }
2302@endDefList
2303
2304Examples:
2305@code
2306<label platform="win">Windows</label>
2307<label platform="unix">Unix</label>
2308<label platform="mac">Mac OS X</label>
2309<help platform="mac|unix">Not a Windows machine</help>
2310@endcode
2311
2312
2313
0526c8cc
VZ
2314@section overview_xrcformat_idranges ID Ranges
2315
2316Usually you won't care what value the XRCID macro returns for the ID of an
2317object. Sometimes though it is convenient to have a range of IDs that are
2318guaranteed to be consecutive. An example of this would be connecting a group of
2319similar controls to the same event handler.
2320
2321The following XRC fragment 'declares' an ID range called @em foo and another
2322called @em bar; each with some items.
2323
2324@code
2325 <object class="wxButton" name="foo[start]">
2326 <object class="wxButton" name="foo[end]">
2327 <object class="wxButton" name="foo[2]">
2328 ...
2329 <object class="wxButton" name="bar[0]">
2330 <object class="wxButton" name="bar[2]">
2331 <object class="wxButton" name="bar[1]">
2332 ...
2333<ids-range name="foo" />
2334<ids-range name="bar" size="30" start="10000" />
2335@endcode
2336
2337For the range foo, no @em size or @em start parameters were given, so the size
2338will be calculated from the number of range items, and IDs allocated by
2339wxWindow::NewControlId (so they'll be negative). Range bar asked for a size of
234030, so this will be its minimum size: should it have more items, the range will
2341automatically expand to fit them. It specified a start ID of 10000, so
2342XRCID("bar[0]") will be 10000, XRCID("bar[1]") 10001 etc. Note that if you
2343choose to supply a start value it must be positive, and it's your
2344responsibility to avoid clashes.
2345
2346For every ID range, the first item can be referenced either as
2347<em>rangename</em>[0] or <em>rangename</em>[start]. Similarly
2348<em>rangename</em>[end] is the last item. Using [start] and [end] is more
2349descriptive in e.g. a Bind() event range or a @em for loop, and they don't have
2350to be altered whenever the number of items changes.
2351
2352Whether a range has positive or negative IDs, [start] is always a smaller
2353number than [end]; so code like this works as expected:
2354
2355@code
e2623304 2356for (int n=XRCID("foo[start]"); n <= XRCID("foo[end]"); ++n)
0526c8cc
VZ
2357 ...
2358@endcode
2359
2360ID ranges can be seen in action in the <em>objref</em> dialog section of the
2361@sample{xrc}.
2362
2363@note
2364@li All the items in an ID range must be contained in the same XRC file.
2365@li You can't use an ID range in a situation where static initialisation
2366occurs; in particular, they won't work as expected in an event table. This is
2367because the event table's IDs are set to their integer values before the XRC
2368file is loaded, and aren't subsequently altered when the XRCID value changes.
2369
2370@since 2.9.2
2371
9d9abdbf 2372@section overview_xrcformat_extending Extending the XRC Format
a302d595
VS
2373
2374The XRC format is designed to be extensible and allows specifying and loading
2375custom controls. The three available mechanisms are described in the rest of
2376this section in the order of increasing complexity.
2377
41e69d79 2378@subsection overview_xrcformat_extending_subclass Subclassing
a302d595
VS
2379
2380The simplest way to add custom controls is to set the @c subclass attribute
1dfb6ff0 2381of @c \<object\> element:
a302d595
VS
2382
2383@code
2384<object name="my_value" class="wxTextCtrl" subclass="MyTextCtrl">
2385 <style>wxTE_MULTILINE</style>
2386 ...etc., setup wxTextCtrl as usual...
2387</object>
2388@endcode
2389
2390In that case, wxXmlResource will create an instance of the specified subclass
2391(@c MyTextCtrl in the example above) instead of the class (@c wxTextCtrl above)
2392when loading the resource. However, the rest of the object's loading (calling
2393its Create() method, setting its properties, loading any children etc.)
2394will proceed in @em exactly the same way as it would without @c subclass
2395attribute. In other words, this approach is only sufficient when the custom
2396class is just a small modification (e.g. overridden methods or customized
2397events handling) of an already supported classes.
2398
2399The subclass must satisfy a number of requirements:
2400
2401 -# It must be derived from the class specified in @c class attribute.
2402 -# It must be visible in wxWidget's pseudo-RTTI mechanism, i.e. there must be
2403 a DECLARE_DYNAMIC_CLASS() entry for it.
2404 -# It must support two-phase creation. In particular, this means that it has
2405 to have default constructor.
2406 -# It cannot provide custom Create() method and must be constructible using
2407 base @c class' Create() method (this is because XRC will call Create() of
2408 @c class, not @c subclass). In other words, @em creation of the control
2409 must not be customized.
2410
2411
9d9abdbf 2412@subsection overview_xrcformat_extending_unknown Unknown Objects
a302d595
VS
2413
2414A more flexible solution is to put a @em placeholder in the XRC file and
2415replace it with custom control after the resource is loaded. This is done by
2416using the @c unknown pseudo-class:
2417
2418@code
2419<object class="unknown" name="my_placeholder"/>
2420@endcode
2421
2422The placeholder is inserted as dummy wxPanel that will hold custom control in
2423it. At runtime, after the resource is loaded and a window created from it
2424(using e.g. wxXmlResource::LoadDialog()), use code must call
2425wxXmlResource::AttachUnknownControl() to insert the desired control into
2426placeholder container.
2427
2428This method makes it possible to insert controls that are not known to XRC at
2429all, but it's also impossible to configure the control in XRC description in
2430any way. The only properties that can be specified are
41e69d79 2431the @ref overview_xrcformat_std_props "standard window properties".
a302d595
VS
2432
2433@note @c unknown class cannot be combined with @c subclass attribute,
2434 they are mutually exclusive.
2435
2436
9d9abdbf 2437@subsection overview_xrcformat_extending_custom Adding Custom Classes
a302d595
VS
2438
2439Finally, XRC allows adding completely new classes in addition to the ones
2440listed in this document. A class for which wxXmlResourceHandler is implemented
2441can be used as first-class object in XRC simply by passing class name as the
2442value of @c class attribute:
2443
2444@code
2445<object name="my_ctrl" class="MyWidget">
2446 <my_prop>foo</my_prop>
2447 ...etc., whatever MyWidget handler accepts...
2448</object>
2449@endcode
2450
2451The only requirements on the class are that
2452 -# the class must derive from wxObject
2453 -# it must support wxWidget's pseudo-RTTI mechanism
2454
1dfb6ff0 2455Child elements of @c \<object\> are handled by the custom handler and there are
a302d595
VS
2456no limitations on them imposed by XRC format.
2457
2458This is the only mechanism that works for toplevel objects -- custom controls
5fcef184 2459are accessible using the type-unsafe wxXmlResource::LoadObject() method.
a302d595
VS
2460
2461
2462
9d9abdbf 2463@section overview_xrcformat_packed Packed XRC Files
a302d595
VS
2464
2465In addition to plain XRC files, wxXmlResource supports (if wxFileSystem support
2466is compiled in) compressed XRC resources. Compressed resources have either
2467.zip or .xrs extension and are simply ZIP files that contain arbitrary
2468number of XRC files and their dependencies (bitmaps, icons etc.).
2469
2470
2471
9d9abdbf 2472@section overview_xrcformat_oldversions Older Format Versions
a302d595
VS
2473
2474This section describes differences in older revisions of XRC format (i.e.
1dfb6ff0 2475files with older values of @c version attribute of @c \<resource\>).
a302d595
VS
2476
2477
9d9abdbf 2478@subsection overview_xrcformat_pre_v2530 Versions Before 2.5.3.0
a302d595
VS
2479
2480Version 2.5.3.0 introduced C-like handling of "\\" in text. In older versions,
2481"\n", "\t" and "\r" escape sequences were replaced with respective characters
2482in the same matter it's done in C, but "\\" was left intact instead of being
2483replaced with single "\", as one would expect. Starting with 2.5.3.0, all of
2484them are handled in C-like manner.
2485
2486
9d9abdbf 2487@subsection overview_xrcformat_pre_v2301 Versions Before 2.3.0.1
a302d595
VS
2488
2489Prior to version 2.3.0.1, "$" was used for accelerators instead of "_"
2490or "&amp;". For example,
2491@code
2492<label>$File</label>
2493@endcode
2494was used in place of current version's
2495@code
2496<label>_File</label>
2497@endcode
2498(or "&amp;File").
2499
2500*/