X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4c51a665c649f7579fb39e62070cef4f66b3210d..62795f413a7222863b4aee76c08764071f94bd87:/docs/doxygen/overviews/xrc_format.h diff --git a/docs/doxygen/overviews/xrc_format.h b/docs/doxygen/overviews/xrc_format.h index dfd1fed23d..f54d08a215 100644 --- a/docs/doxygen/overviews/xrc_format.h +++ b/docs/doxygen/overviews/xrc_format.h @@ -2,7 +2,6 @@ // Name: xrc_format.h // Purpose: XRC format specification // Author: Vaclav Slavik -// RCS-ID: $Id$ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -18,34 +17,10 @@ @page overview_xrcformat XRC File Format -Table of contents: -- @ref overview_xrcformat_overview -- @ref overview_xrcformat_root -- @ref overview_xrcformat_objects - - @ref overview_xrcformat_object - - @ref overview_xrcformat_object_ref -- @ref overview_xrcformat_datatypes -- @ref overview_xrcformat_windows - - @ref overview_xrcformat_std_props - - @ref overview_xrcformat_controls -- @ref overview_xrcformat_sizers -- @ref overview_xrcformat_other_objects -- @ref overview_xrcformat_platform -- @ref overview_xrcformat_idranges -- @ref overview_xrcformat_extending - - @ref overview_xrcformat_extending_subclass - - @ref overview_xrcformat_extending_unknown - - @ref overview_xrcformat_extending_custom -- @ref overview_xrcformat_packed -- @ref overview_xrcformat_oldversions +@tableofcontents -This document describes the format of XRC resource files, as used by wxXmlResource. - - -
- - -@section overview_xrcformat_overview Overview +This document describes the format of XRC resource files, as used by +wxXmlResource. XRC file is a XML file with all of its elements in the @c http://www.wxwidgets.org/wxxrc namespace. For backward compatibility, @@ -66,6 +41,7 @@ Child objects are not directly accessible via wxXmlResource, they can only be accessed using XRCCTRL(). + @section overview_xrcformat_root Resource Root Element The root element is always @c \. It has one optional attribute, @c @@ -214,7 +190,7 @@ For example, "my_dlg" in this snippet: My dialog 1 - + @endcode is identical to: @code @@ -379,7 +355,8 @@ Examples of stock bitmaps usage: @endcode -Specifying the bitmap directly and using @c stock_id are mutually exclusive. +If both specifications are provided, then @c stock_id is used if it is +recognized by wxArtProvider and the provided bitmap file is used as a fallback. @subsection overview_xrcformat_type_style Style @@ -402,9 +379,10 @@ Examples: XRC uses similar, but more flexible, abstract description of fonts to that used by wxFont class. A font can be described either in terms of its elementary -properties, or it can be derived from one of system fonts. +properties, or it can be derived from one of system fonts or the parent window +font. -The font property element is "composite" element: unlike majority of +The font property element is a "composite" element: unlike majority of properties, it doesn't have text value but contains several child elements instead. These children are handled in the same way as object properties and can be one of the following "sub-properties": @@ -413,7 +391,8 @@ and can be one of the following "sub-properties": @hdr3col{property, type, description} @row3col{size, unsigned integer, Pixel size of the font (default: wxNORMAL_FONT's size or @c sysfont's - size if the @c sysfont property is used.} + size if the @c sysfont property is used or the current size of the font + of the enclosing control if the @c inherit property is used.} @row3col{style, enum, One of "normal", "italic" or "slant" (default: normal).} @row3col{weight, enum, @@ -431,14 +410,18 @@ and can be one of the following "sub-properties": (default: unspecified).} @row3col{sysfont, , Symbolic name of system standard font(one of wxSYS_*_FONT constants).} +@row3col{inherit, @ref overview_xrcformat_type_bool, + If true, the font of the enclosing control is used. If this property and the + @c sysfont property are specified the @c sysfont property takes precedence.} @row3col{relativesize, float, - Float, font size relative to chosen system font's size; can only be - used when 'sysfont' is used and when 'size' is not used.} + Float, font size relative to chosen system font's or inherited font's size; + can only be used when 'sysfont' or 'inherit' is used and when 'size' is not + used.} @endTable All of them are optional, if they are missing, appropriate wxFont default is -used. If the @c sysfont property is used, then the defaults are taken from it -instead. +used. If the @c sysfont or @c inherit property is used, then the defaults are +taken from it instead. Examples: @code @@ -456,6 +439,40 @@ Examples: @endcode +@note You cannot use @c inherit for a font that gets used before the enclosing + control is created, e.g. if the control gets the font passed as parameter + for its constructor, or if the control is not derived from wxWindow. + + +@subsection overview_xrcformat_type_imagelist Image List + +Defines a wxImageList. + +The imagelist property element is a "composite" element: unlike majority of +properties, it doesn't have text value but contains several child elements +instead. These children are handled similarly to object properties +and can be one of the following "sub-properties": + +@beginTable +@hdr3col{property, type, description} +@row3col{mask, @ref overview_xrcformat_type_bool, + If masks should be created for all images (default: 1).} +@row3col{size, @ref overview_xrcformat_type_size, + The size of the images in the list (default: the size of the first bitmap).} +@row3col{bitmap, @ref overview_xrcformat_type_bitmap, + Adds a new image. Unlike normal object properties, @c bitmap may be used more than once + to add multiple images to the list. At least one @c bitmap value is required.} +@endTable + +Example: +@code + + 32,32 + + + +@endcode + @section overview_xrcformat_windows Controls and Windows @@ -493,6 +510,8 @@ from properties lists below. wxWindow::SetOwnBackgroundColour() (default: none).} @row3col{enabled, @ref overview_xrcformat_type_bool, If set to 0, the control is disabled (default: 1).} +@row3col{focused, @ref overview_xrcformat_type_bool, + If set to 1, the control has focus initially (default: 0).} @row3col{hidden, @ref overview_xrcformat_type_bool, If set to 1, the control is created hidden (default: 0).} @row3col{tooltip, @ref overview_xrcformat_type_text, @@ -522,7 +541,72 @@ controls cannot have children. @beginTable @hdr3col{property, type, description} @row3col{animation, @ref overview_xrcformat_type_url, - Animation file to load into the control (required).} + Animation file to load into the control (default: none).} +@row3col{inactive-bitmap, @ref overview_xrcformat_type_bitmap, + Bitmap to use when not playing the animation (default: the default).} +@endTable + + +@subsubsection xrc_wxauinotebook wxAuiNotebook + +A wxAuiNotebook can have one or more child objects of the @c notebookpage +pseudo-class. +@c notebookpage objects have the following properties: + +@beginTable +@hdr3col{property, type, description} +@row3col{label, @ref overview_xrcformat_type_text, + Page label (required).} +@row3col{bitmap, @ref overview_xrcformat_type_bitmap, + Bitmap shown alongside the label (default: none).} +@row3col{selected, @ref overview_xrcformat_type_bool, + Is the page selected initially (only one page can be selected; default: 0)?} +@endTable + +Each @c notebookpage must have exactly one non-toplevel window as its child. + +Example: +@code + + + + + bitmap.png + + ... + + + +@endcode + +Notice that wxAuiNotebook support in XRC is available in wxWidgets 2.9.5 and +later only and you need to explicitly register its handler using +@code + #include + + AddHandler(new wxAuiNotebookXmlHandler); +@endcode +to use it. + + +@subsubsection xrc_wxbannerwindow wxBannerWindow + +@beginTable +@hdr3col{property, type, description} +@row3col{direction, @c wxLEFT|wxRIGHT|wxTOP|wxBOTTOM, + The side along which the banner will be positioned (default: wxLEFT).} +@row3col{bitmap, @ref overview_xrcformat_type_bitmap, + Bitmap to use as the banner background (default: none).} +@row3col{title, @ref overview_xrcformat_type_text, + Banner title, should be single line (default: none).} +@row3col{message, @ref overview_xrcformat_type_text, + Possibly multi-line banner message (default: none).} +@row3col{gradient-start, @ref overview_xrcformat_type_colour, + Starting colour of the gradient used as banner background. + (Optional. Can't be used if a valid bitmap is specified. If used, both gradient values must be set.)} +@row3col{gradient-end, @ref overview_xrcformat_type_colour, + End colour of the gradient used as banner background. + (Optional. Can't be used if a valid bitmap is specified. If used, both gradient values must be set.)} @endTable @@ -586,16 +670,27 @@ Example: @endcode +@subsubsection xrc_wxbitmaptogglebutton wxBitmapToggleButton + +@beginTable +@hdr3col{property, type, description} +@row3col{bitmap, @ref overview_xrcformat_type_bitmap, + Label to display on the button (required).} +@row3col{checked, @ref overview_xrcformat_type_bool, + Should the button be checked/pressed initially (default: 0)?} +@endTable + + @subsubsection xrc_wxbutton wxButton @beginTable @hdr3col{property, type, description} @row3col{label, @ref overview_xrcformat_type_text, - Label to display on the button (may be empty if only bitmap is used).} + Label to display on the button (may be omitted if only the bitmap or stock ID is used).} @row3col{bitmap, @ref overview_xrcformat_type_bitmap, Bitmap to display in the button (optional).} @row3col{bitmapposition, @c wxLEFT|wxRIGHT|wxTOP|wxBOTTOM, - Position of the bitmap in the button, see wxButton::SetBitmapPosition().} + Position of the bitmap in the button, see wxButton::SetBitmapPosition() (default: wxLEFT).} @row3col{default, @ref overview_xrcformat_type_bool, Should this button be the default button in dialog (default: 0)?} @endTable @@ -611,7 +706,7 @@ No additional properties. @beginTable @hdr3col{property, type, description} @row3col{label, @ref overview_xrcformat_type_text, - Label to use for the checkbox (required).} + Label to use for the checkbox (default: empty).} @row3col{checked, @ref overview_xrcformat_type_bool, Should the checkbox be checked initially (default: 0)?} @endTable @@ -674,9 +769,16 @@ Example: @subsubsection xrc_wxchoicebook wxChoicebook -A choicebook can have one or more child objects of the @c choicebookpage -pseudo-class (similarly to @ref xrc_wxnotebook "wxNotebook" and its -@c notebookpage) and one child object of the @ref xrc_wximagelist class. +@beginTable +@hdr3col{property, type, description} +@row3col{imagelist, @ref overview_xrcformat_type_imagelist, + Image list to use for the images (default: none, built implicitly).} +@endTable + +Additionally, a choicebook can have one or more child objects of the @c +choicebookpage pseudo-class (similarly to @ref xrc_wxnotebook "wxNotebook" and +its @c notebookpage). + @c choicebookpage objects have the following properties: @beginTable @@ -684,10 +786,10 @@ pseudo-class (similarly to @ref xrc_wxnotebook "wxNotebook" and its @row3col{label, @ref overview_xrcformat_type_text, Sheet page's title (required).} @row3col{bitmap, @ref overview_xrcformat_type_bitmap, - Bitmap shown alongside the label (default: none).} + Bitmap shown alongside the label (default: none, mutually exclusive with @c image).} @row3col{image, integer, The zero-based index of the image associated with the item - into the image list.} + into the image list (default: none, mutually exclusive with @c bitmap, only if imagelist was set).} @row3col{selected, @ref overview_xrcformat_type_bool, Is the page selected initially (only one page can be selected; default: 0)?} @endTable @@ -706,9 +808,9 @@ concatenated into a single string using a new line character between them @hdr3col{property, type, description} @row3col{label, @ref overview_xrcformat_type_text, First line of text on the button, typically the label of an action that - will be made when the button is pressed. } + will be made when the button is pressed (required). } @row3col{note, @ref overview_xrcformat_type_text, - Second line of text describing the action performed when the button is pressed. } + Second line of text describing the action performed when the button is pressed (default: none). } @endTable @@ -769,6 +871,16 @@ Example: @endcode + +@subsubsection xrc_wxcomboctrl wxComboCtrl + +@beginTable +@hdr3col{property, type, description} +@row3col{value, @ref overview_xrcformat_type_string, + Initial value in the control (default: empty).} +@endTable + + @subsubsection xrc_wxdatepickerctrl wxDatePickerCtrl No additional properties. @@ -791,6 +903,7 @@ wxDialog may have optional children: either exactly one objects. If sizer child is used, it sets @ref wxSizer::SetSizeHints() "size hints" too. + @subsubsection xrc_wxdirpickerctrl wxDirPickerCtrl @beginTable @@ -802,6 +915,34 @@ objects. If sizer child is used, it sets @endTable +@subsubsection xrc_wxeditablelistbox wxEditableListBox + +@beginTable +@hdr3col{property, type, description} +@row3col{label, @ref overview_xrcformat_type_text, + Label shown above the list (default: empty).} +@row3col{content, items, + Content of the control; this property has any number of @c \ XML + elements as its children, with the items text as their text values + (default: empty).} +@endTable + +Example: +@code + + 250,160 + + + Milk + Pizza + Bread + Orange juice + Paper towels + + +@endcode + + @subsubsection xrc_wxfilectrl wxFileCtrl @beginTable @@ -812,7 +953,8 @@ objects. If sizer child is used, it sets Selects a certain file.} @row3col{wildcard, @ref overview_xrcformat_type_string, Sets the wildcard, which can contain multiple file types, for example: - "BMP files (*.bmp)|*.bmp|GIF files (*.gif)|*.gif".} + "BMP files (*.bmp)|*.bmp|GIF files (*.gif)|*.gif" + (default: all files).} @endTable @@ -826,7 +968,8 @@ objects. If sizer child is used, it sets Message shown to the user in wxDirDialog shown by the control (required).} @row3col{wildcard, @ref overview_xrcformat_type_string, Sets the wildcard, which can contain multiple file types, for example: - "BMP files (*.bmp)|*.bmp|GIF files (*.gif)|*.gif".} + "BMP files (*.bmp)|*.bmp|GIF files (*.gif)|*.gif" + (default: all files).} @endTable @@ -874,7 +1017,7 @@ objects. If sizer child is used, it sets @beginTable @hdr3col{property, type, description} -@row3col{defaultfolder, @ref overview_xrcformat_type_text, +@row3col{defaultfolder, @ref overview_xrcformat_type_string, Initial folder (default: empty).} @row3col{filter, @ref overview_xrcformat_type_text, Filter string, using the same syntax as used by wxFileDialog, e.g. @@ -893,9 +1036,9 @@ No additional properties. @beginTable @hdr3col{property, type, description} @row3col{url, @ref overview_xrcformat_type_url, - Page to display in the window.} + Page to display in the window (default: none).} @row3col{htmlcode, @ref overview_xrcformat_type_text, - HTML markup to display in the window.} + HTML markup to display in the window (default: none).} @row3col{borders, @ref overview_xrcformat_type_dimension, Border around HTML content (default: 0).} @endTable @@ -916,42 +1059,6 @@ page. @endTable -@subsubsection xrc_wximagelist wxImageList - -The imagelist can be used as a child object for the following classes: - - @ref xrc_wxchoicebook - - @ref xrc_wxlistbook - - @ref xrc_wxlistctrl - - @ref xrc_wxnotebook - - @ref xrc_wxtreebook - - @ref xrc_wxtreectrl - -The available properties are: - -@beginTable -@hdr3col{property, type, description} -@row3col{bitmap, @ref overview_xrcformat_type_bitmap, - Adds a new image by keeping its optional mask bitmap (see below).} -@row3col{mask, @ref overview_xrcformat_type_bool, - If masks should be created for all images (default: true).} -@row3col{size, @ref overview_xrcformat_type_size, - The size of the images in the list (default: the size of the first bitmap).} -@endTable - -Example: -@code - - 32,32 - - - -@endcode - -In the specific case of the @ref xrc_wxlistctrl, the tag can take the name -@c \ to define the 'small' image list, related to the flag -@c wxIMAGE_LIST_SMALL (see wxListCtrl documentation). - - @subsubsection xrc_wxlistbox wxListBox @beginTable @@ -982,9 +1089,16 @@ Example: @subsubsection xrc_wxlistbook wxListbook -A listbook can have one or more child objects of the @c listbookpage -pseudo-class (similarly to @ref xrc_wxnotebook "wxNotebook" and its -@c notebookpage) and one child object of the @ref xrc_wximagelist class. +@beginTable +@hdr3col{property, type, description} +@row3col{imagelist, @ref overview_xrcformat_type_imagelist, + Image list to use for the images (default: none, built implicitly).} +@endTable + +Additionally, a listbook can have one or more child objects of the @c +listbookpage pseudo-class (similarly to @ref xrc_wxnotebook "wxNotebook" and +its @c notebookpage). + @c listbookpage objects have the following properties: @beginTable @@ -992,10 +1106,10 @@ pseudo-class (similarly to @ref xrc_wxnotebook "wxNotebook" and its @row3col{label, @ref overview_xrcformat_type_text, Sheet page's title (required).} @row3col{bitmap, @ref overview_xrcformat_type_bitmap, - Bitmap shown alongside the label (default: none).} + Bitmap shown alongside the label (default: none, mutually exclusive with @c image).} @row3col{image, integer, The zero-based index of the image associated with the item - into the image list.} + into the image list (default: none, mutually exclusive with @c bitmap, only if imagelist was set).} @row3col{selected, @ref overview_xrcformat_type_bool, Is the page selected initially (only one page can be selected; default: 0)?} @endTable @@ -1005,29 +1119,35 @@ Each @c listbookpage has exactly one non-toplevel window as its child. @subsubsection xrc_wxlistctrl wxListCtrl -A list control can have one or more child objects of the class @ref xrc_wxlistitem -and one or more objects of the @ref xrc_wximagelist class. The latter is -defined either using @c \ tag for the control with @c wxLC_ICON -style or using @c \ tag for the control with @c -wxLC_SMALL_ICON style. +@beginTable +@hdr3col{property, type, description} +@row3col{imagelist, @ref overview_xrcformat_type_imagelist, + The normal (wxIMAGE_LIST_NORMAL) image list (default: none, built implicitly).} +@row3col{imagelist-small, @ref overview_xrcformat_type_imagelist, + The small (wxIMAGE_LIST_SMALL) image list (default: none, built implicitly).} +@endTable -Report mode list controls (i.e. created with @c wxLC_REPORT style) can in -addition have one or more @ref xrc_wxlistcol child elements. +A list control can have optional child objects of the @ref xrc_wxlistitem +class. Report mode list controls (i.e. created with @c wxLC_REPORT style) can +in addition have optional @ref xrc_wxlistcol child objects. @paragraph xrc_wxlistcol listcol The @c listcol class can only be used for wxListCtrl children. It can have the -following properties: +following properties (all of them optional): + @beginTable @hdr3col{property, type, description} @row3col{align, wxListColumnFormat, The alignment for the item. Can be one of @c wxLIST_FORMAT_LEFT, @c wxLIST_FORMAT_RIGHT or @c wxLIST_FORMAT_CENTRE.} -@row3col{text, @ref overview_xrcformat_type_string, +@row3col{text, @ref overview_xrcformat_type_text, The title of the column. } @row3col{width, integer, The column width. } +@row3col{image, integer, + The zero-based index of the image associated with the item in the 'small' image list. } @endTable The columns are appended to the control in order of their appearance and may be @@ -1037,7 +1157,7 @@ objects. @paragraph xrc_wxlistitem listitem The @c listitem is a child object for the class @ref xrc_wxlistctrl. -It can have the following properties: +It can have the following properties (all of them optional): @beginTable @hdr3col{property, type, description} @@ -1048,33 +1168,34 @@ It can have the following properties: @row3col{bg, @ref overview_xrcformat_type_colour, The background color for the item.} @row3col{bitmap, @ref overview_xrcformat_type_bitmap, - Add a bitmap to the (normal) @ref xrc_wximagelist associated with the + Add a bitmap to the (normal) @ref overview_xrcformat_type_imagelist associated with the @ref xrc_wxlistctrl parent and associate it with this item. - If the imagelist is not defined it will be created implicitly.} + If the imagelist is not defined it will be created implicitly + (default: none, mutually exclusive with @c image).} @row3col{bitmap-small, @ref overview_xrcformat_type_bitmap, - Add a bitmap in the 'small' @ref xrc_wximagelist associated with the + Add a bitmap in the 'small' @ref overview_xrcformat_type_imagelist associated with the @ref xrc_wxlistctrl parent and associate it with this item. - If the 'small' imagelist is not defined it will be created implicitly.} + If the 'small' imagelist is not defined it will be created implicitly + (default: none, mutually exclusive with @c image-small).} @row3col{col, integer, The zero-based column index.} @row3col{image, integer, The zero-based index of the image associated with the item - in the (normal) image list.} + in the (normal) image list + (default: none, mutually exclusive with @c bitmap, only if imagelist was set).} @row3col{image-small, integer, The zero-based index of the image associated with the item - in the 'small' image list.} + in the 'small' image list + (default: none, mutually exclusive with @c bitmap-small, only if imagelist-small was set).} @row3col{data, integer, The client data for the item.} @row3col{font, @ref overview_xrcformat_type_font, The font for the item.} -@row3col{image, integer, - The zero-based index of the image associated with the item - into the image list.} @row3col{state, @ref overview_xrcformat_type_style, The item state. Can be any combination of the following values: - @c wxLIST_STATE_FOCUSED: The item has the focus. - @c wxLIST_STATE_SELECTED: The item is selected.} -@row3col{text, @ref overview_xrcformat_type_string, +@row3col{text, @ref overview_xrcformat_type_text, The text label for the item. } @row3col{textcolour, @ref overview_xrcformat_type_colour, The text colour for the item. } @@ -1113,6 +1234,8 @@ objects. If sizer child is used, it sets @row3col{label, @ref overview_xrcformat_type_text, Menu's label (default: empty, but required for menus other than popup menus).} +@row3col{style, @ref overview_xrcformat_type_style, + Window style for the menu.} @row3col{help, @ref overview_xrcformat_type_text, Help shown in statusbar when the menu is selected (only for submenus of another wxMenu, default: none).} @@ -1122,7 +1245,7 @@ objects. If sizer child is used, it sets @endTable Note that unlike most controls, wxMenu does @em not have -@ref overview_xrcformat_std_props. +@ref overview_xrcformat_std_props, with the exception of @c style. A menu object can have one or more child objects of the wxMenuItem or wxMenu classes or @c break or @c separator pseudo-classes. @@ -1136,7 +1259,7 @@ wxMenuItem objects support the following properties: @beginTable @hdr3col{property, type, description} @row3col{label, @ref overview_xrcformat_type_text, - Item's label (required).} + Item's label (may be omitted if stock ID is used).} @row3col{accel, @ref overview_xrcformat_type_text_notrans, Item's accelerator (default: none).} @row3col{radio, @ref overview_xrcformat_type_bool, @@ -1183,8 +1306,14 @@ Example: @subsubsection xrc_wxmenubar wxMenuBar -No properties. Note that unlike most controls, wxMenuBar does @em not have -@ref overview_xrcformat_std_props. +@beginTable +@hdr3col{property, type, description} +@row3col{style, @ref overview_xrcformat_type_style, + Window style for the menu bar.} +@endTable + +Note that unlike most controls, wxMenuBar does @em not have +@ref overview_xrcformat_std_props, with the exception of @c style. A menubar can have one or more child objects of the @ref xrc_wxmenu "wxMenu" class. @@ -1192,8 +1321,15 @@ class. @subsubsection xrc_wxnotebook wxNotebook +@beginTable +@hdr3col{property, type, description} +@row3col{imagelist, @ref overview_xrcformat_type_imagelist, + Image list to use for the images (default: none, built implicitly).} +@endTable + A notebook can have one or more child objects of the @c notebookpage -pseudo-class and one child object of the @ref xrc_wximagelist class. +pseudo-class. + @c notebookpage objects have the following properties: @beginTable @@ -1201,10 +1337,12 @@ pseudo-class and one child object of the @ref xrc_wximagelist class. @row3col{label, @ref overview_xrcformat_type_text, Page's title (required).} @row3col{bitmap, @ref overview_xrcformat_type_bitmap, - Bitmap shown alongside the label (default: none).} + Bitmap shown alongside the label + (default: none, mutually exclusive with @c image).} @row3col{image, integer, The zero-based index of the image associated with the item - into the image list.} + into the image list + (default: none, mutually exclusive with @c bitmap, only if imagelist was set).} @row3col{selected, @ref overview_xrcformat_type_bool, Is the page selected initially (only one page can be selected; default: 0)?} @endTable @@ -1300,7 +1438,7 @@ Each @c propertysheetpage has exactly one non-toplevel window as its child. @beginTable @hdr3col{property, type, description} @row3col{label, @ref overview_xrcformat_type_text, - Label for the whole box (required).} + Label for the whole box (default: empty).} @row3col{dimension, integer, Specifies the maximum number of rows (if style contains @c wxRA_SPECIFY_ROWS) or columns (if style contains @c wxRA_SPECIFY_COLS) @@ -1348,6 +1486,139 @@ Example: @endcode +@subsubsection xrc_wxribbonbar wxRibbonBar + +@beginTable +@hdr3col{property, type, description} +@row3col{art-provider, @ref overview_xrcformat_type_string, + One of @c default, @c aui or @c msw (default: @c default).} +@endTable + +A wxRibbonBar may have @ref xrc_wxribbonpage child objects. The @c page +pseudo-class may be used instead of @c wxRibbonPage when used as wxRibbonBar +children. + +Example: +@code + + + + + + + + open.xpm + + + + + + + + + + + + zoomin.xpm + + + zoomout.xpm + + + + + +@endcode + +Notice that wxRibbonBar support in XRC is available in wxWidgets 2.9.5 and +later only and you need to explicitly register its handler using +@code + #include + + AddHandler(new wxRibbonXmlHandler); +@endcode +to use it. + + +@subsubsection xrc_wxribbonbuttonbar wxRibbonButtonBar + +No additional properties. + +wxRibbonButtonBar can have child objects of the @c button pseudo-class. @c button +objects have the following properties: + +@beginTable +@hdr3col{property, type, description} +@row3col{hybrid, @ref overview_xrcformat_type_bool, + If true, the @c wxRIBBON_BUTTON_HYBRID kind is used (default: false).} +@row3col{disabled, @ref overview_xrcformat_type_bool, + Whether the button should be disabled (default: false).} +@row3col{label, @ref overview_xrcformat_type_text, + Item's label (required).} +@row3col{bitmap, @ref overview_xrcformat_type_bitmap, + Item's bitmap (required).} +@row3col{small-bitmap, @ref overview_xrcformat_type_bitmap, + Small bitmap (default: none).} +@row3col{disabled-bitmap, @ref overview_xrcformat_type_bitmap, + Disabled bitmap (default: none).} +@row3col{small-disabled-bitmap, @ref overview_xrcformat_type_bitmap, + Small disabled bitmap (default: none).} +@row3col{help, @ref overview_xrcformat_type_text, + Item's help text (default: none).} +@endTable + + +@subsubsection xrc_wxribboncontrol wxRibbonControl + +No additional properties. + +Objects of this type *must* be subclassed with the @c subclass attribute. + + +@subsubsection xrc_wxribbongallery wxRibbonGallery + +No additional properties. + +wxRibbonGallery can have child objects of the @c item pseudo-class. @c item +objects have the following properties: + +@beginTable +@hdr3col{property, type, description} +@row3col{bitmap, @ref overview_xrcformat_type_bitmap, + Item's bitmap (default: none).} +@endTable + + +@subsubsection xrc_wxribbonpage wxRibbonPage + +@beginTable +@hdr3col{property, type, description} +@row3col{label, @ref overview_xrcformat_type_text, + Label (default: none).} +@row3col{icon, @ref overview_xrcformat_type_bitmap, + Icon (default: none).} +@endTable + +A wxRibbonPage may have children of any type derived from wxRibbonControl. +Most commontly, wxRibbonPanel is used. As a special case, the @c panel +pseudo-class may be used instead of @c wxRibbonPanel when used as wxRibbonPage +children. + + +@subsubsection xrc_wxribbonpanel wxRibbonPanel + +@beginTable +@hdr3col{property, type, description} +@row3col{label, @ref overview_xrcformat_type_text, + Label (default: none).} +@row3col{icon, @ref overview_xrcformat_type_bitmap, + Icon (default: none).} +@endTable + +A wxRibbonPanel may have children of any type derived from wxRibbonControl or +a single wxSizer child with non-ribbon windows in it. + + @subsubsection xrc_wxrichtextctrl wxRichTextCtrl @beginTable @@ -1358,6 +1629,15 @@ Example: Maximum length of the text entered (default: unlimited).} @endTable +Notice that wxRichTextCtrl support in XRC is available in wxWidgets 2.9.5 and +later only and you need to explicitly register its handler using +@code + #include + + AddHandler(new wxRichTextCtrl); +@endcode +to use it. + @subsubsection xrc_wxscrollbar wxScrollBar @@ -1428,7 +1708,7 @@ HTML markup. Note that the markup has to be escaped: @row3col{max, integer, Maximum allowed value (default: 100).} @row3col{pagesize, integer, - Line size; number of steps the slider moves when the user moves + Page size; number of steps the slider moves when the user moves pages up or down (default: unset).} @row3col{linesize, integer, Line size; number of steps the slider moves when the user moves it @@ -1461,7 +1741,12 @@ HTML markup. Note that the markup has to be escaped: @subsubsection xrc_wxspinctrl wxSpinCtrl -wxSpinCtrl supports the properties as @ref xrc_wxspinbutton. +wxSpinCtrl supports the same properties as @ref xrc_wxspinbutton and, since +wxWidgets 2.9.5, another one: +@beginTable +@row3col{base, integer, + Numeric base, currently can be only 10 or 16 (default: 10).} +@endTable @subsubsection xrc_wxsplitterwindow wxSplitterWindow @@ -1470,9 +1755,9 @@ wxSpinCtrl supports the properties as @ref xrc_wxspinbutton. @hdr3col{property, type, description} @row3col{orientation, @ref overview_xrcformat_type_string, Orientation of the splitter, either "vertical" or "horizontal" (default: horizontal).} -@row3col{sashpos, integer, +@row3col{sashpos, @ref overview_xrcformat_type_dimension, Initial position of the sash (default: 0).} -@row3col{minsize, integer, +@row3col{minsize, @ref overview_xrcformat_type_dimension, Minimum child size (default: not set).} @row3col{gravity, @ref overview_xrcformat_type_float, Sash gravity, see wxSplitterWindow::SetSashGravity() (default: not set).} @@ -1502,11 +1787,11 @@ child and the second one for right/bottom child window. @row3col{widths, @ref overview_xrcformat_type_string, Comma-separated list of @em fields integers. Each value specifies width of one field; the values are interpreted using the same convention used - by wxStatusBar::SetStatusWidths().} + by wxStatusBar::SetStatusWidths() (default: not set).} @row3col{styles, @ref overview_xrcformat_type_string, - Comma-separated list of @em fields flags. Each value specifies status bar - fieldd style and can be one of @c wxSB_NORMAL, @c wxSB_FLAT or - @c wxSB_RAISED. See wxStatusBar::SetStatusStyles() for their description.} + Comma-separated list of @em fields style values. Each value specifies style + of one field and can be one of @c wxSB_NORMAL, @c wxSB_FLAT, @c wxSB_RAISED or + @c wxSB_SUNKEN (default: not set).} @endTable @@ -1524,7 +1809,7 @@ child and the second one for right/bottom child window. @beginTable @hdr3col{property, type, description} @row3col{label, @ref overview_xrcformat_type_text, - Static box's label (required).} + Static box's label (default: empty).} @endTable @@ -1538,8 +1823,8 @@ No additional properties. @beginTable @hdr3col{property, type, description} @row3col{label, @ref overview_xrcformat_type_text, - Label to display (required).} -@row3col{wrap, integer, + Label to display (default: empty).} +@row3col{wrap, @ref overview_xrcformat_type_dimension, Wrap the text so that each line is at most the given number of pixels, see wxStaticText::Wrap() (default: no wrap).} @endTable @@ -1555,7 +1840,12 @@ No additional properties. @endTable -@subsubsection xrc_wxtogglebuttton wxToggleButton +@subsubsection xrc_wxtimepickerctrl wxTimePickerCtrl + +No additional properties. + + +@subsubsection xrc_wxtogglebutton wxToggleButton @beginTable @hdr3col{property, type, description} @@ -1585,7 +1875,7 @@ No additional properties. @endTable A toolbar can have one or more child objects of any wxControl-derived class or -one of two pseudo-classes: @c separator or @c tool. +one of three pseudo-classes: @c separator, @c space or @c tool. The @c separator pseudo-class is used to insert separators into the toolbar and has neither properties nor children. Similarly, the @c space pseudo-class is @@ -1615,6 +1905,8 @@ properties: Help text shown in statusbar when the mouse is on the tool (default: none).} @row3col{disabled, @ref overview_xrcformat_type_bool, Is the tool initially disabled (default: 0)?} +@row3col{checked, @ref overview_xrcformat_type_bool, + Is the tool initially checked (default: 0)? (only available since wxWidgets 2.9.3)} @endTable The presence of a @c dropdown property indicates that the tool is of type @@ -1623,7 +1915,7 @@ xrc_wxmenu child object defining the drop-down button associated menu. Notice that @c radio, @c toggle and @c dropdown are mutually exclusive. -Children that are neither @c tool nor @c separator must be instances of classes +Children that are not @c tool, @c space or @c separator must be instances of classes derived from wxControl and are added to the toolbar using wxToolBar::AddControl(). @@ -1669,9 +1961,16 @@ Example: @subsubsection xrc_wxtoolbook wxToolbook +@beginTable +@hdr3col{property, type, description} +@row3col{imagelist, @ref overview_xrcformat_type_imagelist, + Image list to use for the images (default: none, built implicitly).} +@endTable + A toolbook can have one or more child objects of the @c toolbookpage pseudo-class (similarly to @ref xrc_wxnotebook "wxNotebook" and its -@c notebookpage) and one child object of the @ref xrc_wximagelist class. +@c notebookpage). + @c toolbookpage objects have the following properties: @beginTable @@ -1679,10 +1978,12 @@ pseudo-class (similarly to @ref xrc_wxnotebook "wxNotebook" and its @row3col{label, @ref overview_xrcformat_type_text, Sheet page's title (required).} @row3col{bitmap, @ref overview_xrcformat_type_bitmap, - Bitmap shown alongside the label (default: none).} + Bitmap shown alongside the label + (default: none, mutually exclusive with @c image).} @row3col{image, integer, The zero-based index of the image associated with the item - into the image list.} + into the image list + (default: none, mutually exclusive with @c bitmap, only if imagelist was set).} @row3col{selected, @ref overview_xrcformat_type_bool, Is the page selected initially (only one page can be selected; default: 0)?} @endTable @@ -1692,16 +1993,25 @@ Each @c toolbookpage has exactly one non-toplevel window as its child. @subsubsection xrc_wxtreectrl wxTreeCtrl -A treectrl can have one child object of the @ref xrc_wximagelist class. - -No additional properties. +@beginTable +@hdr3col{property, type, description} +@row3col{imagelist, @ref overview_xrcformat_type_imagelist, + Image list to use for the images (default: none).} +@endTable @subsubsection xrc_wxtreebook wxTreebook +@beginTable +@hdr3col{property, type, description} +@row3col{imagelist, @ref overview_xrcformat_type_imagelist, + Image list to use for the images (default: none, built implicitly).} +@endTable + A treebook can have one or more child objects of the @c treebookpage pseudo-class (similarly to @ref xrc_wxnotebook "wxNotebook" and its -@c notebookpage) and one child object of the @ref xrc_wximagelist class. +@c notebookpage). + @c treebookpage objects have the following properties: @beginTable @@ -1711,12 +2021,16 @@ pseudo-class (similarly to @ref xrc_wxnotebook "wxNotebook" and its @row3col{label, @ref overview_xrcformat_type_text, Sheet page's title (required).} @row3col{bitmap, @ref overview_xrcformat_type_bitmap, - Bitmap shown alongside the label (default: none).} + Bitmap shown alongside the label (default: none, mutually exclusive with @c image).} @row3col{image, integer, The zero-based index of the image associated with the item - into the image list.} + into the image list + (default: none, mutually exclusive with @c bitmap, only if imagelist was set).} @row3col{selected, @ref overview_xrcformat_type_bool, Is the page selected initially (only one page can be selected; default: 0)?} +@row3col{expanded, @ref overview_xrcformat_type_bool, + If set to 1, the page is initially expanded. By default all pages are + initially collapsed.} @endTable Each @c treebookpage has exactly one non-toplevel window as its child. @@ -1787,10 +2101,16 @@ wxWizardPageSimple classes. They both support the following properties @beginTable @hdr3col{property, type, description} +@row3col{title, @ref overview_xrcformat_type_text, + Wizard window's title (default: none).} @row3col{bitmap, @ref overview_xrcformat_type_bitmap, Page-specific bitmap (default: none).} @endTable +wxWizardPage and wxWizardPageSimple nodes may have optional children: either +exactly one @ref overview_xrcformat_sizers "sizer" child or any number of +non-toplevel window objects. + wxWizardPageSimple pages are automatically chained together; wxWizardPage pages transitions must be handled programmatically. @@ -1823,7 +2143,7 @@ they have one property: @beginTable @hdr3col{property, type, description} -@row3col{size, @ref overview_xrcformat_type_size, Size of the empty space (required).} +@row3col{size, @ref overview_xrcformat_type_size, Size of the empty space (default: @c wxDefaultSize).} @endTable Both @c sizeritem and @c spacer objects can have any of the following @@ -1860,8 +2180,8 @@ Example of sizers XRC code: 0 0 0 - 0 - 0 + 0:1 + 0:1 wxALIGN_CENTRE|wxALL 5 @@ -1921,7 +2241,7 @@ class-specific properties. All classes support the following properties: @row3col{orient, @ref overview_xrcformat_type_style, Sizer orientation, "wxHORIZONTAL" or "wxVERTICAL" (default: wxHORIZONTAL).} @row3col{label, @ref overview_xrcformat_type_text, - Label to be used for the static box around the sizer (required).} + Label to be used for the static box around the sizer (default: empty).} @endTable @subsection overview_xrcformat_wxgridsizer wxGridSizer @@ -1930,8 +2250,8 @@ class-specific properties. All classes support the following properties: @hdr3col{property, type, description} @row3col{rows, integer, Number of rows in the grid (default: 0 - determine automatically).} @row3col{cols, integer, Number of columns in the grid (default: 0 - determine automatically).} -@row3col{vgap, integer, Vertical gap between children (default: 0).} -@row3col{hgap, integer, Horizontal gap between children (default: 0).} +@row3col{vgap, @ref overview_xrcformat_type_dimension, Vertical gap between children (default: 0).} +@row3col{hgap, @ref overview_xrcformat_type_dimension, Horizontal gap between children (default: 0).} @endTable @subsection overview_xrcformat_wxflexgridsizer wxFlexGridSizer @@ -1940,27 +2260,47 @@ class-specific properties. All classes support the following properties: @hdr3col{property, type, description} @row3col{rows, integer, Number of rows in the grid (default: 0 - determine automatically).} @row3col{cols, integer, Number of columns in the grid (default: 0 - determine automatically).} -@row3col{vgap, integer, Vertical gap between children (default: 0).} -@row3col{hgap, integer, Horizontal gap between children (default: 0).} +@row3col{vgap, @ref overview_xrcformat_type_dimension, Vertical gap between children (default: 0).} +@row3col{hgap, @ref overview_xrcformat_type_dimension, Horizontal gap between children (default: 0).} +@row3col{flexibledirection, @ref overview_xrcformat_type_style, + Flexible direction, @c wxVERTICAL, @c wxHORIZONTAL or @c wxBOTH (default). + This property is only available since wxWidgets 2.9.5.} +@row3col{nonflexiblegrowmode, @ref overview_xrcformat_type_style, + Grow mode in the non-flexible direction, + @c wxFLEX_GROWMODE_NONE, @c wxFLEX_GROWMODE_SPECIFIED (default) or + @c wxFLEX_GROWMODE_ALL. + This property is only available since wxWidgets 2.9.5.} @row3col{growablerows, comma-separated integers list, - Comma-separated list of indexes of rows that are growable - (default: none).} + Comma-separated list of indexes of rows that are growable (none by default). + Since wxWidgets 2.9.5 optional proportion can be appended to each number + after a colon (@c :).} @row3col{growablecols, comma-separated integers list, - Comma-separated list of indexes of columns that are growable - (default: none).} + Comma-separated list of indexes of columns that are growable (none by default). + Since wxWidgets 2.9.5 optional proportion can be appended to each number + after a colon (@c :).} @endTable @subsection overview_xrcformat_wxgridbagsizer wxGridBagSizer @beginTable @hdr3col{property, type, description} -@row3col{vgap, integer, Vertical gap between children (default: 0).} -@row3col{hgap, integer, Horizontal gap between children (default: 0).} +@row3col{vgap, @ref overview_xrcformat_type_dimension, Vertical gap between children (default: 0).} +@row3col{hgap, @ref overview_xrcformat_type_dimension, Horizontal gap between children (default: 0).} +@row3col{flexibledirection, @ref overview_xrcformat_type_style, + Flexible direction, @c wxVERTICAL, @c wxHORIZONTAL, @c wxBOTH (default: @c wxBOTH).} +@row3col{nonflexiblegrowmode, @ref overview_xrcformat_type_style, + Grow mode in the non-flexible direction, + @c wxFLEX_GROWMODE_NONE, @c wxFLEX_GROWMODE_SPECIFIED, @c wxFLEX_GROWMODE_ALL + (default: @c wxFLEX_GROWMODE_SPECIFIED).} @row3col{growablerows, comma-separated integers list, - Comma-separated list of indexes of rows that are growable + Comma-separated list of indexes of rows that are growable, + optionally the proportion can be appended after each number + separated by a @c : (default: none).} @row3col{growablecols, comma-separated integers list, - Comma-separated list of indexes of columns that are growable + Comma-separated list of indexes of columns that are growable, + optionally the proportion can be appended after each number + separated by a @c : (default: none).} @endTable @@ -2103,7 +2443,7 @@ Whether a range has positive or negative IDs, [start] is always a smaller number than [end]; so code like this works as expected: @code -for (int n=XRCID("foo[start]"); n < XRCID("foo[end]"); ++n) +for (int n=XRCID("foo[start]"); n <= XRCID("foo[end]"); ++n) ... @endcode