The term ATTRIBUTE is specific to XRC and refers to a subnode
of an <object> or <object_ref> node that is itself not <object> or <object_ref>.
-In the example bellow, <pos>, <label> and <style> are attributes, while neither
+In the example below, <pos>, <label> and <style> are attributes, while neither
<resource> nor either of <object>s is:
<?xml version="1.0" encoding="utf-8">
- <resource xmlns="http://www.wxwidgets.org/wxxrc" version="2.3.0.1">
+ <resource xmlns="http://www.wxwidgets.org/wxxrc" version="2.5.3.0">
<object class="wxPanel">
<style>wxSUNKEN_BORDER</style> <!-- attr -->
<object class="wxStaticText">
The <resource> node contains namespace declaration, too:
- <resource xmlns="http://www.wxwidgets.org/wxxrc" version="2.3.0.1">
+ <resource xmlns="http://www.wxwidgets.org/wxxrc" version="2.5.3.0">
The <resource> node is only allowed to have <object> and <object_ref>
subnodes, all of which must have the "name" property.
object should be created in this place. The other two are optional. "name" is
ID used to identify the object. It is the value passed to the XRCID() macro and
is also used to construct wxWindow's id and name attributes and must be unique
-among all children of the neareset container object (wxDialog, wxFrame,
-wxPanel, wxNotebook) upside from the object in XML nodes hiearchy (two distinct
+among all children of the nearest container object (wxDialog, wxFrame,
+wxPanel, wxNotebook) upside from the object in XML nodes hierarchy (two distinct
containers may contain objects with same "name", though). "subclass" is
optional name of class whose constructor will be called instead of the
constructor for "class". Subclass must be available in the program that loads
new <object> classes (and therefore different <object>'s child nodes).
<object_ref> node is identical to <object>, except that it does _not_ have
-"class" property and has additonal required property "ref". It's concept is
+"class" property and has additional required property "ref". It's concept is
similar to Unix symlinks: value of the "ref" property is equal to the value of
"name" property of some existing node (called referred node) in the resources
-(not neccessary top-level). Referred node's "class" property and all subnodes
+(not necessary top-level). Referred node's "class" property and all subnodes
are copied in place of the referee <object_ref> node which is then processed as
regular <object> node. If the <object_ref> node itself has child nodes, then
these nodes _override_ any nodes from the referred node.
"__" -> "_"
"\n" -> line break (C character '\n')
"\r" -> carriage return (C character '\r')
- "\t" -> tabelator (C character '\t')
+ "\t" -> tab (C character '\t')
+ "\\" -> "\"
+ (introduced in version 2.5.3.0, not done in earlier versions)
Version Note:
'$' was used instead of '_' prior to version 2.3.0.1.
------------------
List of style flags that can be passed to wxSomeClass' constructor. Flags are
written in same way as in C++ code (e.g. "wxSUNKEN_BORDER",
-"wxHW_SCROLLBAR_NEVER") and are delimined with any combination of whitespaces
+"wxHW_SCROLLBAR_NEVER") and are delimited with any combination of whitespaces
and '|'. Possible flags are class-dependent and are not described in this
technote. Please refer to wxWidgets manual for all styles that given class can
accept; if XRC does not accept a flag listed in wxWidgets documentation, it is
the location of XRC resource file). In addition, attribute node may have
"stock_id" and "stock_client" properties. Their values may be any of wxArtID (or
wxArtClient respectively) values as used by wxArtProvider (because the user may
-define own constants, efectively any string is legal here). Examples are
+define own constants, effectively any string is legal here). Examples are
"wxART_FILE_OPEN" (id) or "wxART_MENU" (client).
Any of "stock_id" or "stock_client" properties or the filename may be omitted.
XRC determines the bitmap to use according to this algorithm:
1. If there is non-empty "stock_id" property, query wxArtProvider for the
bitmap (if there is no "stock_client", use default one, which is usually
- wxART_OTHER; exceptions are noted in class-specific sections bellow). If
+ wxART_OTHER; exceptions are noted in class-specific sections below). If
the query fails, continue to 2.
2. Load the bitmap from the file in attribute value.
Boolean value, either "0" (false) or "1" (true).
+Font
+----
+Font value. A font can be described either in terms of its elementary
+properties, or it can be derived from one of system fonts. The font node
+may contain following subnodes (the table lists subnode name on the left and
+variable type as per the definitions above on the right side):
+
+size UnsignedInteger
+style normal | italic | slant
+weight normal | bold | light
+family roman | script | decorative | swiss | modern | teletype
+underlined Boolean
+face comma-separated list of faces
+encoding charset of the font (meaningless in Unicode build), as string
+sysfont symbolic name of system standard font
+ (one of wxSYS_*_FONT constants)
+relativesize Float, font size relative to choosen system font's size;
+ can only be used when 'sysfont' is used and when 'size' is not
+ used
+
+All of them are optional, if they are missing, wxFont default is used.
+
+Examples:
+
+ <font>
+ <face>arial,helvetica</face>
+ <size>12</size>
+ </font>
+
+ <font>
+ <sysfont>wxSYS_DEFAULT_GUI_FONT</sysfont>
+ <weight>bold</weight>
+ <relativesize>1.5</relativesize>
+ </font>
+
+
+Colour
+------
+A colour value is either explicit RGB value in the standard #rrggbb format
+where rr, gg and bb are hexadecimal case-insensitive values in the 00..FF
+range, or a symbolic name. Symbolic names are wxSYS_COLOUR_* constants defined
+by wxWidgets, written as strings.
+
+Example:
+
+ <bg>wxSYS_COLOUR_SCROLLBAR</bg>
+ <fg>#FF0000</fg>
+
+
4. Supported classes
====================
wxButton
--------
-position Position -1,-1
+pos Position -1,-1
size Size -1,-1
style Style[wxButton]
wxCalendarCtrl
--------------
-position Position -1,-1
+pos Position -1,-1
size Size -1,-1
style Style[wxCalendarCtrl]
wxCheckBox
----------
-position Position -1,-1
+pos Position -1,-1
size Size -1,-1
style Style[wxCheckBox]
checked Boolean false
wxCheckList
-----------
-position Position -1,-1
+pos Position -1,-1
size Size -1,-1
style Style[wxCheckList]
-content (see bellow) (empty)
+content (see below) (empty)
Optional "content" attribute does not have attribute value. Instead,
arbitrary number of <item> nodes may be rooted under it (the control
</object>
+wxDatePickerCtrl
+----------------
+pos Position -1,-1
+size Size -1,-1
+style Style[wxDatePickerCtrl]
+
+
+wxDialog
+--------
+pos Position -1,-1
+size Size -1,-1
+style Style[wxDialog] wxDEFAULT_DIALOG_STYLE
+title I18nString ""
+icon Bitmap (empty)
+centered Boolean false
+
+wxDialog may have children objects.
+
+
+wxFrame
+--------
+pos Position -1,-1
+size Size -1,-1
+style Style[wxDialog] wxDEFAULT_FRAME_STYLE
+title I18nString ""
+icon Bitmap (empty)
+centered Boolean false
+
+wxFrame may have children objects. There can be at most one wxToolBar,
+wxMenuBar and wxStatusBar children; objects of these types are automatically
+set as frame's tool-, menu- and statusbar respectively.
+
+
wxScrolledWindow
----------------
-position Position -1,-1
+pos Position -1,-1
size Size -1,-1
style Style[wxScrolledWindow] wxHSCROLL | wxVSCROLL
+wxScolledWindow may have children objects.
+
wxSplitterWindow
----------------
-position Position -1,-1
+pos Position -1,-1
size Size -1,-1
style Style[wxSplitterWindow] wxSP_3D
sashpos Integer 0
wxSplitterWindow must have at least one and at most two children objects.
If there's only one child object, it is passed to wxSplitterWindow::Initialize
-and the splitter is created unsplitted. If there are two children, the
-splitter is created splitted, either horizontally or vertically depending
+and the splitter is created unsplit. If there are two children, the
+splitter is created split, either horizontally or vertically depending
on the value of "orientation" attribute.
+
wxStatusBar
-----------
fields Integer number of fields
widths Width1, Width2, Width3, ...
+
wxToolBar
---------
-position Position -1,-1
+pos Position -1,-1
size Size -1,-1
style Style[wxToolBar] wxNO_BORDER|wxTB_HORIZONTAL
bitmapsize Size -1,-1
label I18nString ""
tooltip I18nString ""
longhelp I18nString ""
- position Position -1,-1
+ pos Position -1,-1
Constraints:
At most one of "toggle" and "radio" attributes may be 1.
- Attribute "position" may not appear if "label" or "radio" attributes
+ Attribute "pos" may not appear if "label" or "radio" attributes
are used or if parent wxToolBar's style contains wxTB_TEXT.
Note:
- Use of "position" attribute is strongly discouraged, it is deprecated
+ Use of "pos" attribute is strongly discouraged, it is deprecated
usage of wxToolBar and it is not supported by MSW and GTK
implementations.