2 # RELAX NG schema for XRC files.
4 # See http://docs.wxwidgets.org/trunk/overview_xrcformat.html for freeform
5 # description of the format.
8 # Extending the grammar
9 # -----------------------
11 # The grammar defined below validates all builtin <object> classes. Because the
12 # XRC format is extensible, it allows any content in <object> nodes that have
15 # This can be customized by overriding the 'customClasses' rule in the grammar
16 # when including it from another custom grammar file.
18 # For example, if you wish to validate that only wx's builtin classes are used,
19 # you can disallow any custom <object>s (see xrc_schema_builtin_only.rnc):
21 # include "xrc_schema.rnc" {
22 # customClasses = notAllowed
25 # You can also add validation for custom classes:
27 # include "xrc_schema.rnc" {
28 # customClasses = myExtensionClasses
31 # myExtensionClasses = (MyFoo | MyBar | ...)
34 # attribute class { "MyFoo" },
35 # stdObjectNodeAttributes,
41 default namespace = "http://www.wxwidgets.org/wxxrc"
42 namespace xrc = "http://www.wxwidgets.org/wxxrc"
46 # Versions 2.3.0.1 and 2.5.3.0 differ only in how is '\\' interpreted
47 # in textual content. That's not even validated here, so we accept
48 # both. Additionally, even though the attribute is optional in the
49 # spec, we require it here; in other words, the schema cannot be used
50 # to validate XRC files from previous millennium.
51 attribute version { "2.3.0.1" | "2.5.3.0" },
57 # IMPLEMENTATION NOTES:
59 # The guiding principle for writing this schema is to validate as much as we
60 # possible can, but without introducing false negatives; it is not acceptable
61 # to fail validation of a valid (per the human-readable XRC spec) XRC file.
63 # Unfortunately, there are some noteworthy complications when describing the
64 # XRC format with a formal schema. Working around them results in uglier and
65 # overly permissive schema:
68 # (1) The biggest issue is with the 'platform' attribute, which may be used on
69 # _any_ node in an XRC document. There's no way to specify "universal"
70 # attributes that can be placed anywhere in RELAX NG, so we must add the
71 # attribute everywhere. The 'platform' grammar rule is used for this and it has
72 # an alias, '_', for reduced verbosity. Typical use:
74 # element size {_, t_size }? &
77 # (2) The other 'platform'-related issue is that it messes up cardinality of
78 # properties elements. Properties can only be specified once, so the two forms
79 # for describing properties are
81 # 1. element size {_, t_size }? # optional property
82 # 2. element size {_, t_size } # required property
84 # But this is problematic with 'platform', because it's reasonable (and,
85 # indeed, done in the wild) to set properties differently for different
88 # <object class="wxMenuItem" name="menu_new_from_pot">
89 # <label platform="win">New catalog from POT file...</label>
90 # <label platform="unix|mac">New Catalog from POT File...</label>
93 # But we now have the 'label' property _twice_ and validation fails. The
94 # simplest fix is to change the cardinality of properties to allow this [A]:
96 # 1. element size {_, t_size }* # optional property (0 or more times)
97 # 2. element size {_, t_size }+ # required property (at least once)
99 # Of course, this is too lax and allows invalid (but gracefully handled by
100 # wxXmlResource) markup like this:
102 # <object class="wxMenuItem" name="menu_new_from_pot">
103 # <label>Something</label>
104 # <label>Else</label>
107 # We could make this better by splitting the property declaration into two, one
108 # for the case with 'platform' and one for without [B]:
110 # (element size { t_size } | element size { attribute platform{string}, t_size }+)
112 # But this is verbose and unreadable with the amount of properties present in
113 # the schema. Instead, we use the more-forbidding version and annotate
114 # properties with 'p' annotation (for "property") that has either 'r'
115 # (required) or 'o' (optional) value:
117 # [xrc:p="o"] element checked { t_bool }* # optional
118 # [xrc:p="r"] element label { t_text }+ # required
120 # This makes it possible to implement tools that translate this schema into a
121 # variant that use [B].
124 toplevelObjectNode = (objectRef | builtinToplevelClasses | customClasses)
125 windowNode = (objectRef | builtinWindowClasses | customClasses)
126 sizerNode = (objectRef | builtinSizerClasses | customClasses)
128 # The following three lists must be updated when a new class is added
131 builtinToplevelClasses =
132 ( builtinWindowClasses
139 builtinWindowClasses =
146 | wxBitmapToggleButton
153 | wxCommandLinkButton
176 | wxOwnerDrawnComboBox
178 | wxPropertySheetDialog
190 | wxSimpleHtmlListBox
211 builtinSizerClasses =
218 | wxStdDialogButtonSizer
221 builtinClassesNames =
234 | "wxBitmapToggleButton"
241 | "wxCommandLinkButton"
242 | "wxCollapsiblePane"
243 | "wxColourPickerCtrl"
249 | "wxEditableListBox"
264 | "wxOwnerDrawnComboBox"
266 | "wxPropertySheetDialog"
270 | "wxRibbonButtonBar"
278 | "wxSimpleHtmlListBox"
304 | "wxStdDialogButtonSizer"
307 # class names not used at toplevel, only within something else
308 builtinNestedClassesNames =
319 | "propertysheetpage"
324 | "page" | "panel" | "button" | "item" # wxRibbon classes
326 | "wxWizardPageSimple"
329 allPossibleBuiltinClassNames = (builtinClassesNames | builtinNestedClassesNames)
332 # This grammar rule can be used to plug in any extensions used in an
333 # application. By default, it allows any content under custom <object>
337 attribute class { string - allPossibleBuiltinClassNames } &
338 stdObjectNodeAttributes &
342 # Helper for specifying arbitrary content.
345 (attribute * { text }
351 # Annotations used to mark special kinds of content:
353 # [xrc:p] marks properties, with two possible values:
355 # [xrc:p="r"] for required properties
356 # [xrc:p="o"] for optional properties
360 # All <object> nodes (except the pseudo-classes) have these attributes.
361 stdObjectNodeAttributes =
362 attribute subclass { t_identifier }? &
363 attribute name { t_identifier }? &
366 # All (almost) wxWindow-derived objects have these properties.
367 stdWindowProperties =
368 [xrc:p="o"] element pos {_, t_position }* &
369 [xrc:p="o"] element size {_, t_size }* &
370 [xrc:p="o"] element style {_, t_style }* &
371 [xrc:p="o"] element exstyle {_, t_style }* &
372 [xrc:p="o"] element fg {_, t_colour }* &
373 [xrc:p="o"] element ownfg {_, t_colour }* &
374 [xrc:p="o"] element bg {_, t_colour }* &
375 [xrc:p="o"] element ownbg {_, t_colour }* &
376 [xrc:p="o"] element enabled {_, t_bool }* &
377 [xrc:p="o"] element focused {_, t_bool }* &
378 [xrc:p="o"] element hidden {_, t_bool }* &
379 [xrc:p="o"] element tooltip {_, t_text }* &
380 [xrc:p="o"] element font {_, t_font }* &
381 [xrc:p="o"] element ownfont {_, t_font }* &
382 [xrc:p="o"] element help {_, t_text }*
386 xsd:string { pattern = "(win|mac|unix|os2)( *\| *(win|mac|unix|os2))*" }
388 # shorthand alias for 'platform' for use in properties definitions and
389 # elsewhere where 'platform' would be too verbose
395 t_identifier = string
399 t_integer = xsd:integer
401 t_direction = "wxLEFT" | "wxRIGHT" | "wxTOP" | "wxBOTTOM"
402 t_style = xsd:string { pattern = "(wx[A-Z_]+)( *\| *(wx[A-Z_]+))*" }
405 t_colour = xsd:string { pattern = "#[0-9a-zA-Z][0-9a-zA-Z][0-9a-zA-Z][0-9a-zA-Z][0-9a-zA-Z][0-9a-zA-Z]" } |
406 xsd:string { pattern = "[^#].*" }
408 t_size = xsd:string { pattern = "(-?\d+),(-?\d+)d?" }
409 t_dimension = xsd:string { pattern = "(-?\d+)d?" }
413 attribute stock_id { t_identifier},
414 attribute stock_client { t_identifier}?
418 [xrc:p="o"] element size {_, t_integer }* &
419 [xrc:p="o"] element style {_, ("normal" | "italic" | "slant") }* &
420 [xrc:p="o"] element weight {_, ("normal" | "bold" | "light") }* &
421 [xrc:p="o"] element family {_, ("roman" | "script" | "decorative" | "swiss" |
422 "modern" | "teletype") }* &
423 [xrc:p="o"] element underlined {_, t_bool }* &
424 [xrc:p="o"] element face {_, t_text }* &
425 [xrc:p="o"] element encoding {_, t_text }* &
426 [xrc:p="o"] element sysfont {_, ("wxSYS_OEM_FIXED_FONT" | "wxSYS_ANSI_FIXED_FONT" |
427 "wxSYS_ANSI_VAR_FONT" | "wxSYS_SYSTEM_FONT" |
428 "wxSYS_DEVICE_DEFAULT_FONT" | "wxSYS_SYSTEM_FIXED_FONT" |
429 "wxSYS_DEFAULT_GUI_FONT") }* &
430 [xrc:p="o"] element inherit {_, t_bool }* &
431 [xrc:p="o"] element relativesize {_, t_float }*
435 [xrc:p="o"] element mask {_, t_bool }* &
436 [xrc:p="o"] element size {_, t_size }* &
437 element bitmap {_, t_bitmap }+
440 t_list_of_numbers = xsd:string { pattern = "\d+(,\d+)*" }
444 # Handlers for non-<object> content:
449 attribute name { t_identifier },
450 attribute size { t_integer }?,
451 attribute start { t_integer }?
457 stdObjectNodeAttributes &
458 attribute ref { t_identifier } &
464 # Handlers for specific <object> classes follow:
469 attribute class { "unknown" } &
470 attribute name { t_identifier } &
478 attribute class { "wxBitmap" | "wxIcon" } &
479 stdObjectNodeAttributes &
486 attribute class { "wxAnimationCtrl" } &
487 stdObjectNodeAttributes &
488 stdWindowProperties &
489 [xrc:p="o"] element animation {_, t_url }* &
490 [xrc:p="o"] element inactive-bitmap {_, t_bitmap }*
496 attribute class { "wxAuiNotebook" } &
497 stdObjectNodeAttributes &
498 stdWindowProperties &
499 (wxAuiNotebook_notebookpage | objectRef)*
502 wxAuiNotebook_notebookpage =
504 attribute class { "notebookpage" } &
505 [xrc:p="r"] element label {_, t_text }+ &
506 [xrc:p="o"] element bitmap {_, t_bitmap }* &
507 [xrc:p="o"] element selected {_, t_bool }* &
514 attribute class { "wxBannerWindow" } &
515 stdObjectNodeAttributes &
516 stdWindowProperties &
517 [xrc:p="o"] element direction {_, t_direction }* &
519 element bitmap {_, t_bitmap } |
521 element gradient-start {_, t_colour} &
522 element gradient-end {_, t_colour }
525 [xrc:p="o"] element title {_, t_text }* &
526 [xrc:p="o"] element message {_, t_text }*
532 attribute class { "wxBitmapButton" } &
533 stdObjectNodeAttributes &
534 stdWindowProperties &
535 [xrc:p="o"] element default {_, t_bool }* &
536 [xrc:p="r"] element bitmap {_, t_bitmap }+ &
537 [xrc:p="o"] element selected {_, t_bitmap }* &
538 [xrc:p="o"] element focus {_, t_bitmap }* &
539 [xrc:p="o"] element disabled {_, t_bitmap }* &
540 [xrc:p="o"] element hover {_, t_bitmap }*
546 attribute class { "wxBitmapComboBox" } &
547 stdObjectNodeAttributes &
548 stdWindowProperties &
549 [xrc:p="o"] element selection {_, t_integer }* &
550 [xrc:p="o"] element value {_, t_text }* &
551 (wxBitmapComboBox_ownerdrawnitem | objectRef)*
554 wxBitmapComboBox_ownerdrawnitem =
556 attribute class { "ownerdrawnitem" } &
558 [xrc:p="r"] element text {_, t_text }+ &
559 [xrc:p="o"] element bitmap {_, t_bitmap }*
563 wxBitmapToggleButton =
565 attribute class { "wxBitmapToggleButton" } &
566 stdObjectNodeAttributes &
567 stdWindowProperties &
568 [xrc:p="r"] element bitmap {_, t_bitmap }+ &
569 [xrc:p="o"] element checked {_, t_bool }*
575 attribute class { "wxButton" } &
576 stdObjectNodeAttributes &
577 stdWindowProperties &
578 [xrc:p="o"] element label {_, t_text }* &
579 [xrc:p="o"] element bitmap {_, t_bitmap }* &
580 [xrc:p="o"] element bitmapposition {_, t_direction }* &
581 [xrc:p="o"] element default {_, t_bool }*
587 attribute class { "wxCalendarCtrl" } &
588 stdObjectNodeAttributes &
595 attribute class { "wxCheckBox" } &
596 stdObjectNodeAttributes &
597 stdWindowProperties &
598 [xrc:p="o"] element label {_, t_text }* &
599 [xrc:p="o"] element checked {_, t_bool }*
605 attribute class { "wxCheckListBox" } &
606 stdObjectNodeAttributes &
607 stdWindowProperties &
611 attribute checked { t_bool }?,
620 attribute class { "wxChoice" } &
621 stdObjectNodeAttributes &
622 stdWindowProperties &
623 [xrc:p="o"] element selection {_, t_integer }* &
626 element item {_, t_text }*
633 attribute class { "wxChoicebook" } &
634 stdObjectNodeAttributes &
635 stdWindowProperties &
636 [xrc:p="o"] element imagelist {_, t_imagelist }* &
637 (wxChoicebook_choicebookpage | objectRef)*
640 wxChoicebook_choicebookpage =
642 attribute class { "choicebookpage" } &
644 [xrc:p="r"] element label {_, t_text }+ &
646 element bitmap {_, t_bitmap } |
647 element image {_, t_integer }
649 [xrc:p="o"] element selected {_, t_bool }* &
654 wxCommandLinkButton =
656 attribute class { "wxCommandLinkButton" } &
657 stdObjectNodeAttributes &
658 stdWindowProperties &
659 [xrc:p="r"] element label {_, t_text }+ &
660 [xrc:p="o"] element note {_, t_text }*
666 attribute class { "wxCollapsiblePane" } &
667 stdObjectNodeAttributes &
668 stdWindowProperties &
669 [xrc:p="r"] element label {_, t_text }+ &
670 [xrc:p="o"] element collapsed {_, t_bool }* &
671 (wxCollapsiblePane_panewindow | objectRef)?
674 wxCollapsiblePane_panewindow =
676 attribute class { "panewindow" } &
678 (sizerNode | windowNode)
684 attribute class { "wxColourPickerCtrl" } &
685 stdObjectNodeAttributes &
686 stdWindowProperties &
687 [xrc:p="o"] element value {_, t_colour }*
693 attribute class { "wxComboBox" } &
694 stdObjectNodeAttributes &
695 stdWindowProperties &
696 [xrc:p="o"] element selection {_, t_integer }* &
697 [xrc:p="o"] element value {_, t_string }* &
700 element item {_, t_text }*
707 attribute class { "wxComboCtrl" } &
708 stdObjectNodeAttributes &
709 stdWindowProperties &
710 [xrc:p="o"] element value {_, t_string }*
716 attribute class { "wxDatePickerCtrl" } &
717 stdObjectNodeAttributes &
724 attribute class { "wxDialog" } &
725 stdObjectNodeAttributes &
726 stdWindowProperties &
727 [xrc:p="o"] element title {_, t_text }* &
728 [xrc:p="o"] element icon {_, t_bitmap }* &
729 [xrc:p="o"] element centered {_, t_bool }* &
730 (sizerNode | windowNode* )?
736 attribute class { "wxDirPickerCtrl" } &
737 stdObjectNodeAttributes &
738 stdWindowProperties &
739 [xrc:p="o"] element value {_, t_string }* &
740 [xrc:p="r"] element message {_, t_text}+
746 attribute class { "wxEditableListBox" } &
747 stdObjectNodeAttributes &
748 stdWindowProperties &
749 [xrc:p="o"] element label {_, t_text}* &
752 element item {_, t_text }*
759 attribute class { "wxFileCtrl" } &
760 stdObjectNodeAttributes &
761 stdWindowProperties &
762 [xrc:p="o"] element value {_, t_string }* &
763 [xrc:p="r"] element message {_, t_text }+ &
764 [xrc:p="o"] element wildcard {_, t_string }*
770 attribute class { "wxFilePickerCtrl" } &
771 stdObjectNodeAttributes &
772 stdWindowProperties &
773 [xrc:p="o"] element value {_, t_string }* &
774 [xrc:p="r"] element message {_, t_text }+ &
775 [xrc:p="o"] element wildcard {_, t_string }*
781 attribute class { "wxFontPickerCtrl" } &
782 stdObjectNodeAttributes &
783 stdWindowProperties &
784 [xrc:p="o"] element value {_, t_font }*
790 attribute class { "wxFrame" } &
791 stdObjectNodeAttributes &
792 stdWindowProperties &
793 [xrc:p="o"] element title {_, t_text }* &
794 [xrc:p="o"] element icon {_, t_bitmap }* &
795 [xrc:p="o"] element centered {_, t_bool }* &
796 (sizerNode | windowNode* )?
802 attribute class { "wxGauge" } &
803 stdObjectNodeAttributes &
804 stdWindowProperties &
805 [xrc:p="o"] element range {_, t_integer }* &
806 [xrc:p="o"] element value {_, t_integer }* &
807 [xrc:p="o"] element shadow {_, t_dimension }* &
808 [xrc:p="o"] element bezel {_, t_dimension }*
814 attribute class { "wxGenericDirCtrl" } &
815 stdObjectNodeAttributes &
816 stdWindowProperties &
817 [xrc:p="o"] element defaultfolder {_, t_string }* &
818 [xrc:p="o"] element filter {_, t_text }* &
819 [xrc:p="o"] element defaultfilter {_, t_integer }*
825 attribute class { "wxGrid" } &
826 stdObjectNodeAttributes &
833 attribute class { "wxHtmlWindow" } &
834 stdObjectNodeAttributes &
835 stdWindowProperties &
837 element url {_, t_url } |
838 element htmlcode {_, t_text }
840 [xrc:p="o"] element borders {_, t_dimension }*
846 attribute class { "wxHyperlinkCtrl" } &
847 stdObjectNodeAttributes &
848 stdWindowProperties &
849 [xrc:p="r"] element label {_, t_text }+ &
850 [xrc:p="r"] element url {_, t_url }+
856 attribute class { "wxListBox" } &
857 stdObjectNodeAttributes &
858 stdWindowProperties &
859 [xrc:p="o"] element selection {_, t_integer }* &
862 element item {_, t_text }*
869 attribute class { "wxListbook" } &
870 stdObjectNodeAttributes &
871 stdWindowProperties &
872 [xrc:p="o"] element imagelist {_, t_imagelist }* &
873 (wxListbook_listbookpage | objectRef)*
876 wxListbook_listbookpage =
878 attribute class { "listbookpage" } &
879 [xrc:p="r"] element label {_, t_text }+ &
881 element bitmap {_, t_bitmap } |
882 element image {_, t_integer }
884 [xrc:p="o"] element selected {_, t_bool }* &
891 attribute class { "wxListCtrl" } &
892 stdObjectNodeAttributes &
893 stdWindowProperties &
894 [xrc:p="o"] element imagelist {_, t_imagelist }* &
895 [xrc:p="o"] element imagelist-small {_, t_imagelist }* &
896 (wxListCtrl_listcol | wxListCtrl_listitem | objectRef)*
901 attribute class { "listcol" } &
903 [xrc:p="o"] element align {_, ("wxLIST_FORMAT_LEFT" | "wxLIST_FORMAT_RIGHT" |
904 "wxLIST_FORMAT_CENTRE") }* &
905 [xrc:p="o"] element text {_, t_text }* &
906 [xrc:p="o"] element width {_, t_integer }* &
907 [xrc:p="o"] element image {_, t_integer }*
910 wxListCtrl_listitem =
912 attribute class { "listitem" } &
914 [xrc:p="o"] element align {_, ("wxLIST_FORMAT_LEFT" | "wxLIST_FORMAT_RIGHT" |
915 "wxLIST_FORMAT_CENTRE") }* &
916 [xrc:p="o"] element bg {_, t_colour }* &
917 [xrc:p="o"] element col {_, t_integer }* &
918 [xrc:p="o"] element data {_, t_integer }* &
919 [xrc:p="o"] element font {_, t_font }* &
920 [xrc:p="o"] element state {_, ("wxLIST_STATE_FOCUSED" | "wxLIST_STATE_SELECTED") }* &
921 [xrc:p="o"] element text {_, t_text }* &
922 [xrc:p="o"] element textcolour {_, t_colour }* &
924 element bitmap {_, t_bitmap } |
925 element image {_, t_integer }
928 element bitmap-small {_, t_bitmap } |
929 element image-small {_, t_integer }
936 attribute class { "wxMDIParentFrame" } &
937 stdObjectNodeAttributes &
938 stdWindowProperties &
939 [xrc:p="o"] element title {_, t_text }* &
940 [xrc:p="o"] element icon {_, t_bitmap }* &
941 [xrc:p="o"] element centered {_, t_bool }* &
942 (wxMDIChildFrame | objectRef)*
947 attribute class { "wxMDIChildFrame" } &
948 stdObjectNodeAttributes &
949 stdWindowProperties &
950 [xrc:p="o"] element title {_, t_text }* &
951 [xrc:p="o"] element icon {_, t_bitmap }* &
952 [xrc:p="o"] element centered {_, t_bool }* &
953 (sizerNode | windowNode* )?
959 attribute class { "wxMenuBar" } &
960 stdObjectNodeAttributes &
961 [xrc:p="o"] element style {_, t_style }* &
962 (wxMenu | objectRef)*
967 attribute class { "wxMenu" } &
968 stdObjectNodeAttributes &
969 [xrc:p="o"] element label {_, t_text }* &
970 [xrc:p="o"] element style {_, t_style }* &
971 [xrc:p="o"] element help {_, t_text }* &
972 [xrc:p="o"] element enabled {_, t_bool }* &
977 element object { attribute class { "separator" }, platform } |
978 element object { attribute class { "break" }, platform }
984 attribute class { "wxMenuItem" } &
985 stdObjectNodeAttributes &
986 [xrc:p="o"] element label {_, t_text }* &
987 [xrc:p="o"] element accel {_, t_text }* &
988 [xrc:p="o"] element radio {_, t_bool }* &
989 [xrc:p="o"] element checkable {_, t_bool }* &
990 [xrc:p="o"] element bitmap {_, t_bitmap }* &
991 [xrc:p="o"] element bitmap2 {_, t_bitmap }* &
992 [xrc:p="o"] element help {_, t_text }* &
993 [xrc:p="o"] element enabled {_, t_bool }* &
994 [xrc:p="o"] element checked {_, t_bool }*
1000 attribute class { "wxNotebook" } &
1001 stdObjectNodeAttributes &
1002 stdWindowProperties &
1003 [xrc:p="o"] element imagelist {_, t_imagelist }* &
1004 (wxNotebook_notebookpage | objectRef)*
1007 wxNotebook_notebookpage =
1009 attribute class { "notebookpage" } &
1011 [xrc:p="r"] element label {_, t_text }+ &
1013 element bitmap {_, t_bitmap } |
1014 element image {_, t_integer }
1016 [xrc:p="o"] element selected {_, t_bool }* &
1021 wxOwnerDrawnComboBox =
1023 attribute class { "wxOwnerDrawnComboBox" } &
1024 stdObjectNodeAttributes &
1025 stdWindowProperties &
1026 [xrc:p="o"] element selection {_, t_integer }* &
1027 [xrc:p="o"] element value {_, t_string }* &
1028 [xrc:p="o"] element buttonsize {_, t_size }* &
1031 element item {_, t_text }*
1038 attribute class { "wxPanel" } &
1039 stdObjectNodeAttributes &
1040 stdWindowProperties &
1041 (sizerNode | windowNode* )?
1045 wxPropertySheetDialog =
1047 attribute class { "wxPropertySheetDialog" } &
1048 stdObjectNodeAttributes &
1049 stdWindowProperties &
1050 [xrc:p="o"] element title {_, t_text }* &
1051 [xrc:p="o"] element icon {_, t_bitmap }* &
1052 [xrc:p="o"] element centered {_, t_bool }* &
1053 [xrc:p="o"] element buttons {_, t_style }* &
1054 (wxNotebook_notebookpage | objectRef)*
1057 wxPropertySheetDialog_propertysheetpage =
1059 attribute class { "propertysheetpage" } &
1061 [xrc:p="r"] element label {_, t_text }+ &
1062 [xrc:p="o"] element bitmap {_, t_bitmap }* &
1063 [xrc:p="o"] element selected {_, t_bool }* &
1070 attribute class { "wxRadioButton" } &
1071 stdObjectNodeAttributes &
1072 stdWindowProperties &
1073 [xrc:p="r"] element label {_, t_text }+ &
1074 [xrc:p="o"] element value {_, t_bool }*
1080 attribute class { "wxRadioBox" } &
1081 stdObjectNodeAttributes &
1082 stdWindowProperties &
1083 [xrc:p="o"] element label {_, t_text }* &
1084 [xrc:p="o"] element dimension {_, t_integer }* &
1085 [xrc:p="o"] element selection {_, t_integer }* &
1090 attribute tooltip { t_string }?,
1091 attribute helptext { t_string }?,
1092 attribute enabled { t_bool }?,
1093 attribute hidden { t_bool }?,
1102 attribute class { "wxRibbonBar" } &
1103 stdObjectNodeAttributes &
1104 stdWindowProperties &
1105 [xrc:p="o"] element art-provider {_, ("default" | "aui" | "msw") }* &
1106 (wxRibbonPage | objectRef)*
1111 attribute class { "wxRibbonButtonBar" } &
1112 stdObjectNodeAttributes &
1113 stdWindowProperties &
1114 (wxRibbonButtonBar_button | objectRef)*
1117 wxRibbonButtonBar_button =
1119 attribute class { "button" } &
1120 stdObjectNodeAttributes &
1121 [xrc:p="o"] element hybrid {_, t_bool }* &
1122 [xrc:p="o"] element disabled {_, t_bool }* &
1123 [xrc:p="r"] element label {_, t_text }+ &
1124 [xrc:p="r"] element bitmap {_, t_bitmap }+ &
1125 [xrc:p="o"] element small-bitmap {_, t_bitmap }* &
1126 [xrc:p="o"] element disabled-bitmap {_, t_bitmap }* &
1127 [xrc:p="o"] element small-disabled-bitmap {_, t_bitmap }* &
1128 [xrc:p="o"] element help {_, t_text }*
1133 attribute class { "wxRibbonControl" } &
1134 attribute subclass { t_identifier } & # must be subclassed
1135 attribute name { t_identifier }? &
1141 attribute class { "wxRibbonGallery" } &
1142 stdObjectNodeAttributes &
1143 stdWindowProperties &
1144 (wxRibbonGallery_item | objectRef)*
1147 wxRibbonGallery_item =
1149 attribute class { "item" } &
1150 stdObjectNodeAttributes &
1151 [xrc:p="o"] element bitmap {_, t_bitmap }*
1156 # unfortunately, wxRibbonXmlHandler supports "page" alias
1157 attribute class { "wxRibbonPage" | "page" } &
1158 stdObjectNodeAttributes &
1159 stdWindowProperties &
1160 [xrc:p="o"] element label {_, t_text }* &
1161 [xrc:p="o"] element icon {_, t_bitmap }* &
1162 (wxRibbon_anyControl | objectRef)*
1167 # unfortunately, wxRibbonXmlHandler supports "panel" alias
1168 attribute class { "wxRibbonPanel" | "panel" } &
1169 stdObjectNodeAttributes &
1170 stdWindowProperties &
1171 [xrc:p="o"] element label {_, t_text }* &
1172 [xrc:p="o"] element icon {_, t_bitmap }* &
1173 (sizerNode | wxRibbon_anyControl | objectRef)*
1176 wxRibbon_anyControl = wxRibbonBar | wxRibbonButtonBar | wxRibbonControl |
1177 wxRibbonGallery | wxRibbonPanel
1182 attribute class { "wxRichTextCtrl" } &
1183 stdObjectNodeAttributes &
1184 stdWindowProperties &
1185 [xrc:p="o"] element value {_, t_text }* &
1186 [xrc:p="o"] element maxlength {_, t_integer }*
1192 attribute class { "wxScrollBar" } &
1193 stdObjectNodeAttributes &
1194 stdWindowProperties &
1195 [xrc:p="o"] element value {_, t_integer }* &
1196 [xrc:p="o"] element range {_, t_integer }* &
1197 [xrc:p="o"] element thumbsize {_, t_integer }* &
1198 [xrc:p="o"] element pagesize {_, t_integer }*
1204 attribute class { "wxScrolledWindow" } &
1205 stdObjectNodeAttributes &
1206 stdWindowProperties &
1207 [xrc:p="o"] element scrollrate {_, t_size }* &
1208 (sizerNode | windowNode* )?
1212 wxSimpleHtmlListBox =
1214 attribute class { "wxSimpleHtmlListBox" } &
1215 stdObjectNodeAttributes &
1216 stdWindowProperties &
1217 [xrc:p="o"] element selection {_, t_integer }* &
1220 element item {_, t_text }*
1227 attribute class { "wxSlider" } &
1228 stdObjectNodeAttributes &
1229 stdWindowProperties &
1230 [xrc:p="o"] element value {_, t_integer }* &
1231 [xrc:p="o"] element min {_, t_integer }* &
1232 [xrc:p="o"] element max {_, t_integer }* &
1233 [xrc:p="o"] element pagesize {_, t_integer }* &
1234 [xrc:p="o"] element linesize {_, t_integer }* &
1235 [xrc:p="o"] element tickfreq {_, t_integer }* &
1236 [xrc:p="o"] element tick {_, t_integer }* &
1237 [xrc:p="o"] element thumb {_, t_integer }* &
1238 [xrc:p="o"] element selmin {_, t_integer }* &
1239 [xrc:p="o"] element selmax {_, t_integer }*
1245 attribute class { "wxSpinButton" } &
1246 stdObjectNodeAttributes &
1247 stdWindowProperties &
1248 [xrc:p="o"] element value {_, t_integer }* &
1249 [xrc:p="o"] element min {_, t_integer }* &
1250 [xrc:p="o"] element max {_, t_integer }*
1256 attribute class { "wxSpinCtrl" } &
1257 stdObjectNodeAttributes &
1258 stdWindowProperties &
1259 [xrc:p="o"] element value {_, t_integer }* &
1260 [xrc:p="o"] element min {_, t_integer }* &
1261 [xrc:p="o"] element max {_, t_integer }* &
1262 [xrc:p="o"] element base {_, ("10" | "16") }*
1268 attribute class { "wxSplitterWindow" } &
1269 stdObjectNodeAttributes &
1270 stdWindowProperties &
1271 [xrc:p="o"] element orientation {_, ("vertical" | "horizontal") }* &
1272 [xrc:p="o"] element sashpos {_, t_dimension }* &
1273 [xrc:p="o"] element minsize {_, t_dimension }* &
1274 [xrc:p="o"] element gravity {_, t_float }* &
1275 (windowNode, windowNode?) # 1 or 2 child windows
1281 attribute class { "wxSearchCtrl" } &
1282 stdObjectNodeAttributes &
1283 stdWindowProperties &
1284 [xrc:p="o"] element value {_, t_text }*
1290 attribute class { "wxStatusBar" } &
1291 stdObjectNodeAttributes &
1292 stdWindowProperties &
1293 [xrc:p="o"] element fields {_, t_integer }* &
1294 [xrc:p="o"] element widths {_, t_list_of_numbers }* &
1295 [xrc:p="o"] element styles {_, xsd:string { pattern = "wxSB_(NORMAL|FLAT|RAISED|SUNKEN)(,wxSB_(NORMAL|FLAT|RAISED|SUNKEN))*" } }*
1301 attribute class { "wxStaticBitmap" } &
1302 stdObjectNodeAttributes &
1303 stdWindowProperties &
1304 element bitmap {_, t_bitmap }
1310 attribute class { "wxStaticBox" } &
1311 stdObjectNodeAttributes &
1312 stdWindowProperties &
1313 [xrc:p="o"] element label {_, t_text }*
1319 attribute class { "wxStaticLine" } &
1320 stdObjectNodeAttributes &
1327 attribute class { "wxStaticText" } &
1328 stdObjectNodeAttributes &
1329 stdWindowProperties &
1330 [xrc:p="o"] element label {_, t_text }* &
1331 [xrc:p="o"] element wrap {_, t_dimension }*
1337 attribute class { "wxTextCtrl" } &
1338 stdObjectNodeAttributes &
1339 stdWindowProperties &
1340 [xrc:p="o"] element value {_, t_text }* &
1341 [xrc:p="o"] element maxlength {_, t_integer }*
1347 attribute class { "wxTimePickerCtrl" } &
1348 stdObjectNodeAttributes &
1355 attribute class { "wxToggleButton" } &
1356 stdObjectNodeAttributes &
1357 stdWindowProperties &
1358 [xrc:p="r"] element label {_, t_text }+ &
1359 [xrc:p="o"] element checked {_, t_bool }*
1365 attribute class { "wxToolBar" } &
1366 stdObjectNodeAttributes &
1367 stdWindowProperties &
1368 [xrc:p="o"] element bitmapsize {_, t_size }* &
1369 [xrc:p="o"] element margins {_, t_size }* &
1370 [xrc:p="o"] element packing {_, t_integer }* &
1371 [xrc:p="o"] element separation {_, t_integer }* &
1372 [xrc:p="o"] element dontattachtoframe {_, t_bool }* &
1376 element object { attribute class { "separator" }, platform } |
1377 element object { attribute class { "space" }, platform }
1383 attribute class { "tool" } &
1384 stdObjectNodeAttributes &
1385 [xrc:p="r"] element bitmap {_, t_bitmap }+ &
1386 [xrc:p="o"] element bitmap2 {_, t_bitmap }* &
1387 [xrc:p="o"] element label {_, t_text }* &
1388 [xrc:p="o"] element tooltip {_, t_text }* &
1389 [xrc:p="o"] element longhelp {_, t_text }* &
1390 [xrc:p="o"] element disabled {_, t_bool }* &
1391 [xrc:p="o"] element checked {_, t_bool }* &
1393 element radio {_, t_bool } |
1394 element toggle {_, t_bool } |
1395 element dropdown {_, wxMenu? }
1402 attribute class { "wxToolbook" } &
1403 stdObjectNodeAttributes &
1404 stdWindowProperties &
1405 [xrc:p="o"] element imagelist {_, t_imagelist }* &
1406 (wxToolbook_toolbookpage | objectRef)*
1409 wxToolbook_toolbookpage =
1411 attribute class { "toolbookpage" } &
1413 [xrc:p="r"] element label {_, t_text }+ &
1415 element bitmap {_, t_bitmap } |
1416 element image {_, t_integer }
1418 [xrc:p="o"] element selected {_, t_bool }* &
1425 attribute class { "wxTreeCtrl" } &
1426 stdObjectNodeAttributes &
1427 stdWindowProperties &
1428 [xrc:p="o"] element imagelist {_, t_imagelist }*
1434 attribute class { "wxTreebook" } &
1435 stdObjectNodeAttributes &
1436 stdWindowProperties &
1437 [xrc:p="o"] element imagelist {_, t_imagelist }* &
1438 (wxTreebook_treebookpage | objectRef)*
1441 wxTreebook_treebookpage =
1443 attribute class { "treebookpage" } &
1445 [xrc:p="r"] element depth {_, t_integer }+ &
1446 [xrc:p="r"] element label {_, t_text }+ &
1448 element bitmap {_, t_bitmap } |
1449 element image {_, t_integer }
1451 [xrc:p="o"] element selected {_, t_bool }* &
1452 [xrc:p="o"] element expanded {_, t_bool }* &
1459 attribute class { "wxWizard" } &
1460 stdObjectNodeAttributes &
1461 stdWindowProperties &
1462 [xrc:p="o"] element title {_, t_text }* &
1463 [xrc:p="o"] element bitmap {_, t_bitmap }* &
1464 (wxWizardPage_any | objectRef)*
1469 attribute class { "wxWizardPage" | "wxWizardPageSimple" } &
1470 stdObjectNodeAttributes &
1471 stdWindowProperties &
1472 [xrc:p="o"] element bitmap {_, t_bitmap }* &
1473 (sizerNode | windowNode* )?
1483 attribute class { "spacer" } &
1484 [xrc:p="o"] element size {_, t_size }*
1488 attribute class { "sizeritem" } &
1489 (windowNode | sizerNode)
1492 stdObjectNodeAttributes &
1493 [xrc:p="o"] element option {_, t_integer }* &
1494 [xrc:p="o"] element flag {_, t_style }* &
1495 [xrc:p="o"] element border {_, t_dimension }* &
1496 [xrc:p="o"] element minsize {_, t_size }* &
1497 [xrc:p="o"] element ratio {_, t_size }* &
1498 # TODO: cell{pos,span} are wxGridBagSizer-only and required in it, this is too lax
1499 [xrc:p="o"] element cellpos {_, t_position }* &
1500 [xrc:p="o"] element cellspan {_, t_size }*
1505 attribute class { "wxBoxSizer" } &
1506 stdObjectNodeAttributes &
1507 [xrc:p="o"] element minsize {_, t_size }* &
1508 [xrc:p="o"] element orient {_, ("wxHORIZONTAL" | "wxVERTICAL") }* &
1509 (wxSizer_item | objectRef)*
1514 attribute class { "wxStaticBoxSizer" } &
1515 stdObjectNodeAttributes &
1516 [xrc:p="o"] element minsize {_, t_size }* &
1517 [xrc:p="o"] element label {_, t_text }* &
1518 [xrc:p="o"] element orient {_, ("wxHORIZONTAL" | "wxVERTICAL") }* &
1519 (wxSizer_item | objectRef)*
1524 attribute class { "wxGridSizer" } &
1525 stdObjectNodeAttributes &
1526 [xrc:p="o"] element minsize {_, t_size }* &
1527 [xrc:p="o"] element rows {_, t_integer }* &
1528 [xrc:p="o"] element cols {_, t_integer }* &
1529 [xrc:p="o"] element vgap {_, t_dimension }* &
1530 [xrc:p="o"] element hgap {_, t_dimension }* &
1531 (wxSizer_item | objectRef)*
1536 attribute class { "wxFlexGridSizer" } &
1537 stdObjectNodeAttributes &
1538 [xrc:p="o"] element minsize {_, t_size }* &
1539 [xrc:p="o"] element rows {_, t_integer }* &
1540 [xrc:p="o"] element cols {_, t_integer }* &
1541 [xrc:p="o"] element vgap {_, t_dimension }* &
1542 [xrc:p="o"] element hgap {_, t_dimension }* &
1543 [xrc:p="o"] element flexibledirection {_, ("wxVERTICAL" | "wxHORIZONTAL" | "wxBOTH") }* &
1544 [xrc:p="o"] element nonflexiblegrowmode {_, ("wxFLEX_GROWMODE_NONE" |
1545 "wxFLEX_GROWMODE_SPECIFIED" |
1546 "wxFLEX_GROWMODE_ALL") }* &
1547 [xrc:p="o"] element growablerows {_, t_list_of_numbers }* &
1548 [xrc:p="o"] element growablecols {_, t_list_of_numbers }* &
1549 (wxSizer_item | objectRef)*
1554 attribute class { "wxGridBagSizer" } &
1555 stdObjectNodeAttributes &
1556 [xrc:p="o"] element minsize {_, t_size }* &
1557 [xrc:p="o"] element vgap {_, t_dimension }* &
1558 [xrc:p="o"] element hgap {_, t_dimension }* &
1559 [xrc:p="o"] element flexibledirection {_, ("wxVERTICAL" | "wxHORIZONTAL" | "wxBOTH") }* &
1560 [xrc:p="o"] element nonflexiblegrowmode {_, ("wxFLEX_GROWMODE_NONE" |
1561 "wxFLEX_GROWMODE_SPECIFIED" |
1562 "wxFLEX_GROWMODE_ALL") }* &
1563 [xrc:p="o"] element growablerows {_, t_list_of_numbers }* &
1564 [xrc:p="o"] element growablecols {_, t_list_of_numbers }* &
1565 (wxSizer_item | objectRef)*
1570 attribute class { "wxWrapSizer" } &
1571 stdObjectNodeAttributes &
1572 [xrc:p="o"] element minsize {_, t_size }* &
1573 [xrc:p="r"] element orient {_, ("wxHORIZONTAL" | "wxVERTICAL") }+ &
1574 [xrc:p="o"] element flag {_, t_style }* &
1575 (wxSizer_item | objectRef)*
1578 wxStdDialogButtonSizer =
1580 attribute class { "wxStdDialogButtonSizer" } &
1581 stdObjectNodeAttributes &
1583 attribute class { "button" },
1585 (wxButton | customClasses | objectRef)