]>
Commit | Line | Data |
---|---|---|
60f8d69a VS |
1 | # |
2 | # RELAX NG schema for XRC files. | |
3 | # | |
4 | # See http://docs.wxwidgets.org/trunk/overview_xrcformat.html for freeform | |
5 | # description of the format. | |
6 | # | |
7 | # | |
8 | # Extending the grammar | |
9 | # ----------------------- | |
10 | # | |
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 | |
13 | # non-builtin class. | |
14 | # | |
15 | # This can be customized by overriding the 'customClasses' rule in the grammar | |
16 | # when including it from another custom grammar file. | |
17 | # | |
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): | |
20 | # | |
21 | # include "xrc_schema.rnc" { | |
22 | # customClasses = notAllowed | |
23 | # } | |
24 | # | |
25 | # You can also add validation for custom classes: | |
26 | # | |
27 | # include "xrc_schema.rnc" { | |
28 | # customClasses = myExtensionClasses | |
29 | # } | |
30 | # | |
31 | # myExtensionClasses = (MyFoo | MyBar | ...) | |
32 | # MyFoo = | |
33 | # element object { | |
34 | # attribute class { "MyFoo" }, | |
35 | # stdObjectNodeAttributes, | |
36 | # ... | |
37 | # } | |
38 | # ... | |
39 | # | |
40 | ||
41 | default namespace = "http://www.wxwidgets.org/wxxrc" | |
42 | namespace xrc = "http://www.wxwidgets.org/wxxrc" | |
43 | ||
44 | start = | |
45 | element resource { | |
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" }, | |
52 | ||
53 | toplevelObjectNode* | |
54 | } | |
55 | ||
56 | ||
57 | # IMPLEMENTATION NOTES: | |
58 | # | |
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. | |
62 | # | |
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: | |
66 | # | |
67 | # | |
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: | |
73 | # | |
74 | # element size {_, t_size }? & | |
75 | # | |
76 | # | |
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 | |
80 | # | |
81 | # 1. element size {_, t_size }? # optional property | |
82 | # 2. element size {_, t_size } # required property | |
83 | # | |
84 | # But this is problematic with 'platform', because it's reasonable (and, | |
85 | # indeed, done in the wild) to set properties differently for different | |
86 | # platforms: | |
87 | # | |
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> | |
91 | # </object> | |
92 | # | |
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]: | |
95 | # | |
96 | # 1. element size {_, t_size }* # optional property (0 or more times) | |
97 | # 2. element size {_, t_size }+ # required property (at least once) | |
98 | # | |
99 | # Of course, this is too lax and allows invalid (but gracefully handled by | |
100 | # wxXmlResource) markup like this: | |
101 | # | |
102 | # <object class="wxMenuItem" name="menu_new_from_pot"> | |
103 | # <label>Something</label> | |
104 | # <label>Else</label> | |
105 | # </object> | |
106 | # | |
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]: | |
109 | # | |
110 | # (element size { t_size } | element size { attribute platform{string}, t_size }+) | |
111 | # | |
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: | |
116 | # | |
117 | # [xrc:p="o"] element checked { t_bool }* # optional | |
118 | # [xrc:p="r"] element label { t_text }+ # required | |
119 | # | |
120 | # This makes it possible to implement tools that translate this schema into a | |
121 | # variant that use [B]. | |
122 | # | |
123 | ||
124 | toplevelObjectNode = (objectRef | builtinToplevelClasses | customClasses) | |
125 | windowNode = (objectRef | builtinWindowClasses | customClasses) | |
126 | sizerNode = (objectRef | builtinSizerClasses | customClasses) | |
127 | ||
128 | # The following three lists must be updated when a new class is added | |
129 | # to this file. | |
130 | ||
131 | builtinToplevelClasses = | |
132 | ( builtinWindowClasses | |
133 | | idsRange | |
134 | | wxBitmap_or_wxIcon | |
135 | | wxMenuBar | |
136 | | wxMenu | |
137 | ) | |
138 | ||
139 | builtinWindowClasses = | |
140 | ( unknown | |
141 | | wxAnimationCtrl | |
142 | | wxAuiNotebook | |
143 | | wxBannerWindow | |
144 | | wxBitmapButton | |
145 | | wxBitmapComboBox | |
146 | | wxBitmapToggleButton | |
147 | | wxButton | |
148 | | wxCalendarCtrl | |
149 | | wxCheckBox | |
150 | | wxCheckListBox | |
151 | | wxChoice | |
152 | | wxChoicebook | |
153 | | wxCommandLinkButton | |
154 | | wxCollapsiblePane | |
155 | | wxColourPickerCtrl | |
156 | | wxComboBox | |
157 | | wxComboCtrl | |
158 | | wxDatePickerCtrl | |
159 | | wxDialog | |
160 | | wxDirPickerCtrl | |
161 | | wxEditableListBox | |
162 | | wxFileCtrl | |
163 | | wxFilePickerCtrl | |
164 | | wxFontPickerCtrl | |
165 | | wxFrame | |
166 | | wxGauge | |
167 | | wxGenericDirCtrl | |
168 | | wxGrid | |
169 | | wxHtmlWindow | |
170 | | wxHyperlinkCtrl | |
171 | | wxListBox | |
172 | | wxListbook | |
173 | | wxListCtrl | |
174 | | wxMDIParentFrame | |
175 | | wxNotebook | |
176 | | wxOwnerDrawnComboBox | |
177 | | wxPanel | |
178 | | wxPropertySheetDialog | |
179 | | wxRadioButton | |
180 | | wxRadioBox | |
181 | | wxRibbonBar | |
182 | | wxRibbonButtonBar | |
183 | | wxRibbonControl | |
184 | | wxRibbonGallery | |
185 | | wxRibbonPage | |
186 | | wxRibbonPanel | |
187 | | wxRichTextCtrl | |
188 | | wxScrollBar | |
189 | | wxScrolledWindow | |
190 | | wxSimpleHtmlListBox | |
191 | | wxSlider | |
192 | | wxSpinButton | |
193 | | wxSpinCtrl | |
194 | | wxSplitterWindow | |
195 | | wxSearchCtrl | |
196 | | wxStatusBar | |
197 | | wxStaticBitmap | |
198 | | wxStaticBox | |
199 | | wxStaticLine | |
200 | | wxStaticText | |
201 | | wxTextCtrl | |
202 | | wxTimePickerCtrl | |
203 | | wxToggleButton | |
204 | | wxToolBar | |
205 | | wxToolbook | |
206 | | wxTreeCtrl | |
207 | | wxTreebook | |
208 | | wxWizard | |
209 | ) | |
210 | ||
211 | builtinSizerClasses = | |
212 | ( wxBoxSizer | |
213 | | wxStaticBoxSizer | |
214 | | wxGridSizer | |
215 | | wxFlexGridSizer | |
216 | | wxGridBagSizer | |
217 | | wxWrapSizer | |
218 | | wxStdDialogButtonSizer | |
219 | ) | |
220 | ||
221 | builtinClassesNames = | |
222 | ( "wxBitmap" | |
223 | | "wxIcon" | |
224 | | "wxMenuBar" | |
225 | | "wxMenu" | |
226 | ||
227 | | "unknown" | |
228 | ||
229 | | "wxAnimationCtrl" | |
230 | | "wxAuiNotebook" | |
231 | | "wxBannerWindow" | |
232 | | "wxBitmapButton" | |
233 | | "wxBitmapComboBox" | |
234 | | "wxBitmapToggleButton" | |
235 | | "wxButton" | |
236 | | "wxCalendarCtrl" | |
237 | | "wxCheckBox" | |
238 | | "wxCheckListBox" | |
239 | | "wxChoice" | |
240 | | "wxChoicebook" | |
241 | | "wxCommandLinkButton" | |
242 | | "wxCollapsiblePane" | |
243 | | "wxColourPickerCtrl" | |
244 | | "wxComboBox" | |
245 | | "wxComboCtrl" | |
246 | | "wxDatePickerCtrl" | |
247 | | "wxDialog" | |
248 | | "wxDirPickerCtrl" | |
249 | | "wxEditableListBox" | |
250 | | "wxFileCtrl" | |
251 | | "wxFilePickerCtrl" | |
252 | | "wxFontPickerCtrl" | |
253 | | "wxFrame" | |
254 | | "wxGauge" | |
255 | | "wxGenericDirCtrl" | |
256 | | "wxGrid" | |
257 | | "wxHtmlWindow" | |
258 | | "wxHyperlinkCtrl" | |
259 | | "wxListBox" | |
260 | | "wxListbook" | |
261 | | "wxListCtrl" | |
262 | | "wxMDIParentFrame" | |
263 | | "wxNotebook" | |
264 | | "wxOwnerDrawnComboBox" | |
265 | | "wxPanel" | |
266 | | "wxPropertySheetDialog" | |
267 | | "wxRadioButton" | |
268 | | "wxRadioBox" | |
269 | | "wxRibbonBar" | |
270 | | "wxRibbonButtonBar" | |
271 | | "wxRibbonControl" | |
272 | | "wxRibbonGallery" | |
273 | | "wxRibbonPage" | |
274 | | "wxRibbonPanel" | |
275 | | "wxRichTextCtrl" | |
276 | | "wxScrollBar" | |
277 | | "wxScrolledWindow" | |
278 | | "wxSimpleHtmlListBox" | |
279 | | "wxSlider" | |
280 | | "wxSpinButton" | |
281 | | "wxSpinCtrl" | |
282 | | "wxSplitterWindow" | |
283 | | "wxSearchCtrl" | |
284 | | "wxStatusBar" | |
285 | | "wxStaticBitmap" | |
286 | | "wxStaticBox" | |
287 | | "wxStaticLine" | |
288 | | "wxStaticText" | |
289 | | "wxTextCtrl" | |
290 | | "wxTimePickerCtrl" | |
291 | | "wxToggleButton" | |
292 | | "wxToolBar" | |
293 | | "wxToolbook" | |
294 | | "wxTreeCtrl" | |
295 | | "wxTreebook" | |
296 | | "wxWizard" | |
297 | ||
298 | | "wxBoxSizer" | |
299 | | "wxStaticBoxSizer" | |
300 | | "wxGridSizer" | |
301 | | "wxFlexGridSizer" | |
302 | | "wxGridBagSizer" | |
303 | | "wxWrapSizer" | |
304 | | "wxStdDialogButtonSizer" | |
305 | ) | |
306 | ||
307 | # class names not used at toplevel, only within something else | |
308 | builtinNestedClassesNames = | |
309 | ( "wxMenuItem" | |
310 | | "separator" | |
311 | | "break" | |
312 | | "space" | |
313 | | "tool" | |
314 | | "panewindow" | |
315 | | "notebookpage" | |
316 | | "choicebookpage" | |
317 | | "listbookpage" | |
318 | | "treebookpage" | |
319 | | "propertysheetpage" | |
320 | | "ownerdrawnitem" | |
321 | | "listcol" | |
322 | | "listitem" | |
323 | | "wxMDIChildFrame" | |
324 | | "page" | "panel" | "button" | "item" # wxRibbon classes | |
325 | | "wxWizardPage" | |
326 | | "wxWizardPageSimple" | |
327 | ) | |
328 | ||
329 | allPossibleBuiltinClassNames = (builtinClassesNames | builtinNestedClassesNames) | |
330 | ||
331 | ||
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> | |
334 | # nodes. | |
335 | customClasses = | |
336 | element object { | |
337 | attribute class { string - allPossibleBuiltinClassNames } & | |
338 | stdObjectNodeAttributes & | |
339 | anyXMLContent* | |
340 | } | |
341 | ||
342 | # Helper for specifying arbitrary content. | |
343 | anyXMLContent = | |
344 | element * { | |
345 | (attribute * { text } | |
346 | | text | |
347 | | anyXMLContent)* | |
348 | } | |
349 | ||
350 | ||
351 | # Annotations used to mark special kinds of content: | |
352 | # | |
353 | # [xrc:p] marks properties, with two possible values: | |
354 | # | |
355 | # [xrc:p="r"] for required properties | |
356 | # [xrc:p="o"] for optional properties | |
357 | # | |
358 | ||
359 | ||
360 | # All <object> nodes (except the pseudo-classes) have these attributes. | |
361 | stdObjectNodeAttributes = | |
362 | attribute subclass { t_identifier }? & | |
363 | attribute name { t_identifier }? & | |
364 | platform | |
365 | ||
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 }* | |
383 | ||
384 | platform = | |
385 | attribute platform { | |
386 | xsd:string { pattern = "(win|mac|unix|os2)( *\| *(win|mac|unix|os2))*" } | |
387 | }? | |
388 | # shorthand alias for 'platform' for use in properties definitions and | |
389 | # elsewhere where 'platform' would be too verbose | |
390 | _ = platform | |
391 | ||
392 | ||
393 | # Basic data types. | |
394 | ||
395 | t_identifier = string | |
396 | t_text = string | |
397 | t_string = string | |
398 | t_bool = "1" | "0" | |
399 | t_integer = xsd:integer | |
400 | t_float = xsd:float | |
401 | t_direction = "wxLEFT" | "wxRIGHT" | "wxTOP" | "wxBOTTOM" | |
402 | t_style = xsd:string { pattern = "(wx[A-Z_]+)( *\| *(wx[A-Z_]+))*" } | |
403 | ||
404 | t_url = string | |
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 = "[^#].*" } | |
407 | t_position = t_size | |
408 | t_size = xsd:string { pattern = "(-?\d+),(-?\d+)d?" } | |
409 | t_dimension = xsd:string { pattern = "(-?\d+)d?" } | |
410 | ||
411 | t_bitmap = t_url?, | |
412 | ( | |
413 | attribute stock_id { t_identifier}, | |
414 | attribute stock_client { t_identifier}? | |
415 | )? | |
416 | ||
417 | t_font = ( | |
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 }* | |
432 | ) | |
433 | ||
434 | t_imagelist = ( | |
435 | [xrc:p="o"] element mask {_, t_bool }* & | |
436 | [xrc:p="o"] element size {_, t_size }* & | |
437 | element bitmap {_, t_bitmap }+ | |
438 | ) | |
439 | ||
440 | t_list_of_numbers = xsd:string { pattern = "\d+(,\d+)*" } | |
441 | ||
442 | ||
443 | # | |
444 | # Handlers for non-<object> content: | |
445 | # | |
446 | ||
447 | idsRange = | |
448 | element ids-range { | |
449 | attribute name { t_identifier }, | |
450 | attribute size { t_integer }?, | |
451 | attribute start { t_integer }? | |
452 | } | |
453 | ||
454 | ||
455 | objectRef = | |
456 | element object_ref { | |
457 | stdObjectNodeAttributes & | |
458 | attribute ref { t_identifier } & | |
459 | anyXMLContent* | |
460 | } | |
461 | ||
462 | ||
463 | # | |
464 | # Handlers for specific <object> classes follow: | |
465 | # | |
466 | ||
467 | unknown = | |
468 | element object { | |
469 | attribute class { "unknown" } & | |
470 | attribute name { t_identifier } & | |
471 | platform & | |
472 | stdWindowProperties | |
473 | } | |
474 | ||
475 | ||
476 | wxBitmap_or_wxIcon = | |
477 | element object { | |
478 | attribute class { "wxBitmap" | "wxIcon" } & | |
479 | stdObjectNodeAttributes & | |
480 | t_bitmap | |
481 | } | |
482 | ||
483 | ||
484 | wxAnimationCtrl = | |
485 | element object { | |
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 }* | |
491 | } | |
492 | ||
493 | ||
494 | wxAuiNotebook = | |
495 | element object { | |
496 | attribute class { "wxAuiNotebook" } & | |
497 | stdObjectNodeAttributes & | |
498 | stdWindowProperties & | |
499 | (wxAuiNotebook_notebookpage | objectRef)* | |
500 | } | |
501 | ||
502 | wxAuiNotebook_notebookpage = | |
503 | element object { | |
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 }* & | |
508 | windowNode | |
509 | } | |
510 | ||
511 | ||
512 | wxBannerWindow = | |
513 | element object { | |
514 | attribute class { "wxBannerWindow" } & | |
515 | stdObjectNodeAttributes & | |
516 | stdWindowProperties & | |
517 | [xrc:p="o"] element direction {_, t_direction }* & | |
518 | [xrc:p="o"]( | |
519 | element bitmap {_, t_bitmap } | | |
520 | ( | |
521 | element gradient-start {_, t_colour} & | |
522 | element gradient-end {_, t_colour } | |
523 | ) | |
524 | )* & | |
525 | [xrc:p="o"] element title {_, t_text }* & | |
526 | [xrc:p="o"] element message {_, t_text }* | |
527 | } | |
528 | ||
529 | ||
530 | wxBitmapButton = | |
531 | element object { | |
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 }* | |
541 | } | |
542 | ||
543 | ||
544 | wxBitmapComboBox = | |
545 | element object { | |
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)* | |
552 | } | |
553 | ||
554 | wxBitmapComboBox_ownerdrawnitem = | |
555 | element object { | |
556 | attribute class { "ownerdrawnitem" } & | |
557 | platform & | |
558 | [xrc:p="r"] element text {_, t_text }+ & | |
559 | [xrc:p="o"] element bitmap {_, t_bitmap }* | |
560 | } | |
561 | ||
562 | ||
563 | wxBitmapToggleButton = | |
564 | element object { | |
565 | attribute class { "wxBitmapToggleButton" } & | |
566 | stdObjectNodeAttributes & | |
567 | stdWindowProperties & | |
568 | [xrc:p="r"] element bitmap {_, t_bitmap }+ & | |
569 | [xrc:p="o"] element checked {_, t_bool }* | |
570 | } | |
571 | ||
572 | ||
573 | wxButton = | |
574 | element object { | |
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 }* | |
582 | } | |
583 | ||
584 | ||
585 | wxCalendarCtrl = | |
586 | element object { | |
587 | attribute class { "wxCalendarCtrl" } & | |
588 | stdObjectNodeAttributes & | |
589 | stdWindowProperties | |
590 | } | |
591 | ||
592 | ||
593 | wxCheckBox = | |
594 | element object { | |
595 | attribute class { "wxCheckBox" } & | |
596 | stdObjectNodeAttributes & | |
597 | stdWindowProperties & | |
598 | [xrc:p="o"] element label {_, t_text }* & | |
599 | [xrc:p="o"] element checked {_, t_bool }* | |
600 | } | |
601 | ||
602 | ||
603 | wxCheckListBox = | |
604 | element object { | |
605 | attribute class { "wxCheckListBox" } & | |
606 | stdObjectNodeAttributes & | |
607 | stdWindowProperties & | |
608 | element content { | |
609 | platform, | |
610 | element item { | |
611 | attribute checked { t_bool }?, | |
612 | t_text | |
613 | }* | |
614 | }? | |
615 | } | |
616 | ||
617 | ||
618 | wxChoice = | |
619 | element object { | |
620 | attribute class { "wxChoice" } & | |
621 | stdObjectNodeAttributes & | |
622 | stdWindowProperties & | |
623 | [xrc:p="o"] element selection {_, t_integer }* & | |
624 | element content { | |
625 | platform, | |
626 | element item {_, t_text }* | |
627 | }? | |
628 | } | |
629 | ||
630 | ||
631 | wxChoicebook = | |
632 | element object { | |
633 | attribute class { "wxChoicebook" } & | |
634 | stdObjectNodeAttributes & | |
635 | stdWindowProperties & | |
636 | [xrc:p="o"] element imagelist {_, t_imagelist }* & | |
637 | (wxChoicebook_choicebookpage | objectRef)* | |
638 | } | |
639 | ||
640 | wxChoicebook_choicebookpage = | |
641 | element object { | |
642 | attribute class { "choicebookpage" } & | |
643 | platform & | |
644 | [xrc:p="r"] element label {_, t_text }+ & | |
645 | [xrc:p="o"]( | |
646 | element bitmap {_, t_bitmap } | | |
647 | element image {_, t_integer } | |
648 | )* & | |
649 | [xrc:p="o"] element selected {_, t_bool }* & | |
650 | windowNode | |
651 | } | |
652 | ||
653 | ||
654 | wxCommandLinkButton = | |
655 | element object { | |
656 | attribute class { "wxCommandLinkButton" } & | |
657 | stdObjectNodeAttributes & | |
658 | stdWindowProperties & | |
659 | [xrc:p="r"] element label {_, t_text }+ & | |
660 | [xrc:p="o"] element note {_, t_text }* | |
661 | } | |
662 | ||
663 | ||
664 | wxCollapsiblePane = | |
665 | element object { | |
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)? | |
672 | } | |
673 | ||
674 | wxCollapsiblePane_panewindow = | |
675 | element object { | |
676 | attribute class { "panewindow" } & | |
677 | platform & | |
678 | (sizerNode | windowNode) | |
679 | } | |
680 | ||
681 | ||
682 | wxColourPickerCtrl = | |
683 | element object { | |
684 | attribute class { "wxColourPickerCtrl" } & | |
685 | stdObjectNodeAttributes & | |
686 | stdWindowProperties & | |
687 | [xrc:p="o"] element value {_, t_colour }* | |
688 | } | |
689 | ||
690 | ||
691 | wxComboBox = | |
692 | element object { | |
693 | attribute class { "wxComboBox" } & | |
694 | stdObjectNodeAttributes & | |
695 | stdWindowProperties & | |
696 | [xrc:p="o"] element selection {_, t_integer }* & | |
697 | [xrc:p="o"] element value {_, t_string }* & | |
698 | element content { | |
699 | platform, | |
700 | element item {_, t_text }* | |
701 | }? | |
702 | } | |
703 | ||
704 | ||
705 | wxComboCtrl = | |
706 | element object { | |
707 | attribute class { "wxComboCtrl" } & | |
708 | stdObjectNodeAttributes & | |
709 | stdWindowProperties & | |
710 | [xrc:p="o"] element value {_, t_string }* | |
711 | } | |
712 | ||
713 | ||
714 | wxDatePickerCtrl = | |
715 | element object { | |
716 | attribute class { "wxDatePickerCtrl" } & | |
717 | stdObjectNodeAttributes & | |
718 | stdWindowProperties | |
719 | } | |
720 | ||
721 | ||
722 | wxDialog = | |
723 | element object { | |
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* )? | |
731 | } | |
732 | ||
733 | ||
734 | wxDirPickerCtrl = | |
735 | element object { | |
736 | attribute class { "wxDirPickerCtrl" } & | |
737 | stdObjectNodeAttributes & | |
738 | stdWindowProperties & | |
739 | [xrc:p="o"] element value {_, t_string }* & | |
740 | [xrc:p="r"] element message {_, t_text}+ | |
741 | } | |
742 | ||
743 | ||
744 | wxEditableListBox = | |
745 | element object { | |
746 | attribute class { "wxEditableListBox" } & | |
747 | stdObjectNodeAttributes & | |
748 | stdWindowProperties & | |
749 | [xrc:p="o"] element label {_, t_text}* & | |
750 | element content { | |
751 | platform, | |
752 | element item {_, t_text }* | |
753 | }? | |
754 | } | |
755 | ||
756 | ||
757 | wxFileCtrl = | |
758 | element object { | |
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 }* | |
765 | } | |
766 | ||
767 | ||
768 | wxFilePickerCtrl = | |
769 | element object { | |
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 }* | |
776 | } | |
777 | ||
778 | ||
779 | wxFontPickerCtrl = | |
780 | element object { | |
781 | attribute class { "wxFontPickerCtrl" } & | |
782 | stdObjectNodeAttributes & | |
783 | stdWindowProperties & | |
784 | [xrc:p="o"] element value {_, t_font }* | |
785 | } | |
786 | ||
787 | ||
788 | wxFrame = | |
789 | element object { | |
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* )? | |
797 | } | |
798 | ||
799 | ||
800 | wxGauge = | |
801 | element object { | |
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 }* | |
809 | } | |
810 | ||
811 | ||
812 | wxGenericDirCtrl = | |
813 | element object { | |
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 }* | |
820 | } | |
821 | ||
822 | ||
823 | wxGrid = | |
824 | element object { | |
825 | attribute class { "wxGrid" } & | |
826 | stdObjectNodeAttributes & | |
827 | stdWindowProperties | |
828 | } | |
829 | ||
830 | ||
831 | wxHtmlWindow = | |
832 | element object { | |
833 | attribute class { "wxHtmlWindow" } & | |
834 | stdObjectNodeAttributes & | |
835 | stdWindowProperties & | |
836 | [xrc:p="o"]( | |
837 | element url {_, t_url } | | |
838 | element htmlcode {_, t_text } | |
839 | )* & | |
840 | [xrc:p="o"] element borders {_, t_dimension }* | |
841 | } | |
842 | ||
843 | ||
844 | wxHyperlinkCtrl = | |
845 | element object { | |
846 | attribute class { "wxHyperlinkCtrl" } & | |
847 | stdObjectNodeAttributes & | |
848 | stdWindowProperties & | |
849 | [xrc:p="r"] element label {_, t_text }+ & | |
850 | [xrc:p="r"] element url {_, t_url }+ | |
851 | } | |
852 | ||
853 | ||
854 | wxListBox = | |
855 | element object { | |
856 | attribute class { "wxListBox" } & | |
857 | stdObjectNodeAttributes & | |
858 | stdWindowProperties & | |
859 | [xrc:p="o"] element selection {_, t_integer }* & | |
860 | element content { | |
861 | platform, | |
862 | element item {_, t_text }* | |
863 | }? | |
864 | } | |
865 | ||
866 | ||
867 | wxListbook = | |
868 | element object { | |
869 | attribute class { "wxListbook" } & | |
870 | stdObjectNodeAttributes & | |
871 | stdWindowProperties & | |
872 | [xrc:p="o"] element imagelist {_, t_imagelist }* & | |
873 | (wxListbook_listbookpage | objectRef)* | |
874 | } | |
875 | ||
876 | wxListbook_listbookpage = | |
877 | element object { | |
878 | attribute class { "listbookpage" } & | |
879 | [xrc:p="r"] element label {_, t_text }+ & | |
880 | [xrc:p="o"]( | |
881 | element bitmap {_, t_bitmap } | | |
882 | element image {_, t_integer } | |
883 | )* & | |
884 | [xrc:p="o"] element selected {_, t_bool }* & | |
885 | windowNode | |
886 | } | |
887 | ||
888 | ||
889 | wxListCtrl = | |
890 | element object { | |
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)* | |
897 | } | |
898 | ||
899 | wxListCtrl_listcol = | |
900 | element object { | |
901 | attribute class { "listcol" } & | |
902 | platform & | |
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 }* | |
908 | } | |
909 | ||
910 | wxListCtrl_listitem = | |
911 | element object { | |
912 | attribute class { "listitem" } & | |
913 | platform & | |
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 }* & | |
923 | [xrc:p="o"]( | |
924 | element bitmap {_, t_bitmap } | | |
925 | element image {_, t_integer } | |
926 | )* & | |
927 | [xrc:p="o"]( | |
928 | element bitmap-small {_, t_bitmap } | | |
929 | element image-small {_, t_integer } | |
930 | )* | |
931 | } | |
932 | ||
933 | ||
934 | wxMDIParentFrame = | |
935 | element object { | |
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)* | |
943 | } | |
944 | ||
945 | wxMDIChildFrame = | |
946 | element object { | |
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* )? | |
954 | } | |
955 | ||
956 | ||
957 | wxMenuBar = | |
958 | element object { | |
959 | attribute class { "wxMenuBar" } & | |
960 | stdObjectNodeAttributes & | |
961 | [xrc:p="o"] element style {_, t_style }* & | |
962 | (wxMenu | objectRef)* | |
963 | } | |
964 | ||
965 | wxMenu = | |
966 | element object { | |
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 }* & | |
973 | ( | |
974 | wxMenuItem | | |
975 | wxMenu | | |
976 | objectRef | | |
977 | element object { attribute class { "separator" }, platform } | | |
978 | element object { attribute class { "break" }, platform } | |
979 | )* | |
980 | } | |
981 | ||
982 | wxMenuItem = | |
983 | element object { | |
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 }* | |
995 | } | |
996 | ||
997 | ||
998 | wxNotebook = | |
999 | element object { | |
1000 | attribute class { "wxNotebook" } & | |
1001 | stdObjectNodeAttributes & | |
1002 | stdWindowProperties & | |
1003 | [xrc:p="o"] element imagelist {_, t_imagelist }* & | |
1004 | (wxNotebook_notebookpage | objectRef)* | |
1005 | } | |
1006 | ||
1007 | wxNotebook_notebookpage = | |
1008 | element object { | |
1009 | attribute class { "notebookpage" } & | |
1010 | platform & | |
1011 | [xrc:p="r"] element label {_, t_text }+ & | |
1012 | ( | |
1013 | element bitmap {_, t_bitmap } | | |
1014 | element image {_, t_integer } | |
1015 | )? & | |
1016 | [xrc:p="o"] element selected {_, t_bool }* & | |
1017 | windowNode | |
1018 | } | |
1019 | ||
1020 | ||
1021 | wxOwnerDrawnComboBox = | |
1022 | element object { | |
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 }* & | |
1029 | element content { | |
1030 | platform, | |
1031 | element item {_, t_text }* | |
1032 | }? | |
1033 | } | |
1034 | ||
1035 | ||
1036 | wxPanel = | |
1037 | element object { | |
1038 | attribute class { "wxPanel" } & | |
1039 | stdObjectNodeAttributes & | |
1040 | stdWindowProperties & | |
1041 | (sizerNode | windowNode* )? | |
1042 | } | |
1043 | ||
1044 | ||
1045 | wxPropertySheetDialog = | |
1046 | element object { | |
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)* | |
1055 | } | |
1056 | ||
1057 | wxPropertySheetDialog_propertysheetpage = | |
1058 | element object { | |
1059 | attribute class { "propertysheetpage" } & | |
1060 | platform & | |
1061 | [xrc:p="r"] element label {_, t_text }+ & | |
1062 | [xrc:p="o"] element bitmap {_, t_bitmap }* & | |
1063 | [xrc:p="o"] element selected {_, t_bool }* & | |
1064 | windowNode | |
1065 | } | |
1066 | ||
1067 | ||
1068 | wxRadioButton = | |
1069 | element object { | |
1070 | attribute class { "wxRadioButton" } & | |
1071 | stdObjectNodeAttributes & | |
1072 | stdWindowProperties & | |
1073 | [xrc:p="r"] element label {_, t_text }+ & | |
1074 | [xrc:p="o"] element value {_, t_bool }* | |
1075 | } | |
1076 | ||
1077 | ||
1078 | wxRadioBox = | |
1079 | element object { | |
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 }* & | |
1086 | element content { | |
1087 | platform, | |
1088 | element item { | |
1089 | platform, | |
1090 | attribute tooltip { t_string }?, | |
1091 | attribute helptext { t_string }?, | |
1092 | attribute enabled { t_bool }?, | |
1093 | attribute hidden { t_bool }?, | |
1094 | t_text | |
1095 | }* | |
1096 | }? | |
1097 | } | |
1098 | ||
1099 | ||
1100 | wxRibbonBar = | |
1101 | element object { | |
1102 | attribute class { "wxRibbonBar" } & | |
1103 | stdObjectNodeAttributes & | |
1104 | stdWindowProperties & | |
1105 | [xrc:p="o"] element art-provider {_, ("default" | "aui" | "msw") }* & | |
1106 | (wxRibbonPage | objectRef)* | |
1107 | } | |
1108 | ||
1109 | wxRibbonButtonBar = | |
1110 | element object { | |
1111 | attribute class { "wxRibbonButtonBar" } & | |
1112 | stdObjectNodeAttributes & | |
1113 | stdWindowProperties & | |
1114 | (wxRibbonButtonBar_button | objectRef)* | |
1115 | } | |
1116 | ||
1117 | wxRibbonButtonBar_button = | |
1118 | element object { | |
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 }* | |
1129 | } | |
1130 | ||
1131 | wxRibbonControl = | |
1132 | element object { | |
1133 | attribute class { "wxRibbonControl" } & | |
1134 | attribute subclass { t_identifier } & # must be subclassed | |
1135 | attribute name { t_identifier }? & | |
1136 | platform | |
1137 | } | |
1138 | ||
1139 | wxRibbonGallery = | |
1140 | element object { | |
1141 | attribute class { "wxRibbonGallery" } & | |
1142 | stdObjectNodeAttributes & | |
1143 | stdWindowProperties & | |
1144 | (wxRibbonGallery_item | objectRef)* | |
1145 | } | |
1146 | ||
1147 | wxRibbonGallery_item = | |
1148 | element object { | |
1149 | attribute class { "item" } & | |
1150 | stdObjectNodeAttributes & | |
1151 | [xrc:p="o"] element bitmap {_, t_bitmap }* | |
1152 | } | |
1153 | ||
1154 | wxRibbonPage = | |
1155 | element object { | |
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)* | |
1163 | } | |
1164 | ||
1165 | wxRibbonPanel = | |
1166 | element object { | |
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)* | |
1174 | } | |
1175 | ||
1176 | wxRibbon_anyControl = wxRibbonBar | wxRibbonButtonBar | wxRibbonControl | | |
1177 | wxRibbonGallery | wxRibbonPanel | |
1178 | ||
1179 | ||
1180 | wxRichTextCtrl = | |
1181 | element object { | |
1182 | attribute class { "wxRichTextCtrl" } & | |
1183 | stdObjectNodeAttributes & | |
1184 | stdWindowProperties & | |
1185 | [xrc:p="o"] element value {_, t_text }* & | |
1186 | [xrc:p="o"] element maxlength {_, t_integer }* | |
1187 | } | |
1188 | ||
1189 | ||
1190 | wxScrollBar = | |
1191 | element object { | |
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 }* | |
1199 | } | |
1200 | ||
1201 | ||
1202 | wxScrolledWindow = | |
1203 | element object { | |
1204 | attribute class { "wxScrolledWindow" } & | |
1205 | stdObjectNodeAttributes & | |
1206 | stdWindowProperties & | |
1207 | [xrc:p="o"] element scrollrate {_, t_size }* & | |
1208 | (sizerNode | windowNode* )? | |
1209 | } | |
1210 | ||
1211 | ||
1212 | wxSimpleHtmlListBox = | |
1213 | element object { | |
1214 | attribute class { "wxSimpleHtmlListBox" } & | |
1215 | stdObjectNodeAttributes & | |
1216 | stdWindowProperties & | |
1217 | [xrc:p="o"] element selection {_, t_integer }* & | |
1218 | element content { | |
1219 | platform, | |
1220 | element item {_, t_text }* | |
1221 | }? | |
1222 | } | |
1223 | ||
1224 | ||
1225 | wxSlider = | |
1226 | element object { | |
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 }* | |
1240 | } | |
1241 | ||
1242 | ||
1243 | wxSpinButton = | |
1244 | element object { | |
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 }* | |
1251 | } | |
1252 | ||
1253 | ||
1254 | wxSpinCtrl = | |
1255 | element object { | |
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") }* | |
1263 | } | |
1264 | ||
1265 | ||
1266 | wxSplitterWindow = | |
1267 | element object { | |
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 | |
1276 | } | |
1277 | ||
1278 | ||
1279 | wxSearchCtrl = | |
1280 | element object { | |
1281 | attribute class { "wxSearchCtrl" } & | |
1282 | stdObjectNodeAttributes & | |
1283 | stdWindowProperties & | |
1284 | [xrc:p="o"] element value {_, t_text }* | |
1285 | } | |
1286 | ||
1287 | ||
1288 | wxStatusBar = | |
1289 | element object { | |
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))*" } }* | |
1296 | } | |
1297 | ||
1298 | ||
1299 | wxStaticBitmap = | |
1300 | element object { | |
1301 | attribute class { "wxStaticBitmap" } & | |
1302 | stdObjectNodeAttributes & | |
1303 | stdWindowProperties & | |
1304 | element bitmap {_, t_bitmap } | |
1305 | } | |
1306 | ||
1307 | ||
1308 | wxStaticBox = | |
1309 | element object { | |
1310 | attribute class { "wxStaticBox" } & | |
1311 | stdObjectNodeAttributes & | |
1312 | stdWindowProperties & | |
1313 | [xrc:p="o"] element label {_, t_text }* | |
1314 | } | |
1315 | ||
1316 | ||
1317 | wxStaticLine = | |
1318 | element object { | |
1319 | attribute class { "wxStaticLine" } & | |
1320 | stdObjectNodeAttributes & | |
1321 | stdWindowProperties | |
1322 | } | |
1323 | ||
1324 | ||
1325 | wxStaticText = | |
1326 | element object { | |
1327 | attribute class { "wxStaticText" } & | |
1328 | stdObjectNodeAttributes & | |
1329 | stdWindowProperties & | |
1330 | [xrc:p="o"] element label {_, t_text }* & | |
1331 | [xrc:p="o"] element wrap {_, t_dimension }* | |
1332 | } | |
1333 | ||
1334 | ||
1335 | wxTextCtrl = | |
1336 | element object { | |
1337 | attribute class { "wxTextCtrl" } & | |
1338 | stdObjectNodeAttributes & | |
1339 | stdWindowProperties & | |
1340 | [xrc:p="o"] element value {_, t_text }* & | |
1341 | [xrc:p="o"] element maxlength {_, t_integer }* | |
1342 | } | |
1343 | ||
1344 | ||
1345 | wxTimePickerCtrl = | |
1346 | element object { | |
1347 | attribute class { "wxTimePickerCtrl" } & | |
1348 | stdObjectNodeAttributes & | |
1349 | stdWindowProperties | |
1350 | } | |
1351 | ||
1352 | ||
1353 | wxToggleButton = | |
1354 | element object { | |
1355 | attribute class { "wxToggleButton" } & | |
1356 | stdObjectNodeAttributes & | |
1357 | stdWindowProperties & | |
1358 | [xrc:p="r"] element label {_, t_text }+ & | |
1359 | [xrc:p="o"] element checked {_, t_bool }* | |
1360 | } | |
1361 | ||
1362 | ||
1363 | wxToolBar = | |
1364 | element object { | |
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 }* & | |
1373 | ( | |
1374 | windowNode | | |
1375 | wxToolBar_tool | | |
1376 | element object { attribute class { "separator" }, platform } | | |
1377 | element object { attribute class { "space" }, platform } | |
1378 | )* | |
1379 | } | |
1380 | ||
1381 | wxToolBar_tool = | |
1382 | element object { | |
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 }* & | |
1392 | [xrc:p="o"]( | |
1393 | element radio {_, t_bool } | | |
1394 | element toggle {_, t_bool } | | |
1395 | element dropdown {_, wxMenu? } | |
1396 | )* | |
1397 | } | |
1398 | ||
1399 | ||
1400 | wxToolbook = | |
1401 | element object { | |
1402 | attribute class { "wxToolbook" } & | |
1403 | stdObjectNodeAttributes & | |
1404 | stdWindowProperties & | |
1405 | [xrc:p="o"] element imagelist {_, t_imagelist }* & | |
1406 | (wxToolbook_toolbookpage | objectRef)* | |
1407 | } | |
1408 | ||
1409 | wxToolbook_toolbookpage = | |
1410 | element object { | |
1411 | attribute class { "toolbookpage" } & | |
1412 | platform & | |
1413 | [xrc:p="r"] element label {_, t_text }+ & | |
1414 | [xrc:p="o"]( | |
1415 | element bitmap {_, t_bitmap } | | |
1416 | element image {_, t_integer } | |
1417 | )* & | |
1418 | [xrc:p="o"] element selected {_, t_bool }* & | |
1419 | windowNode | |
1420 | } | |
1421 | ||
1422 | ||
1423 | wxTreeCtrl = | |
1424 | element object { | |
1425 | attribute class { "wxTreeCtrl" } & | |
1426 | stdObjectNodeAttributes & | |
1427 | stdWindowProperties & | |
1428 | [xrc:p="o"] element imagelist {_, t_imagelist }* | |
1429 | } | |
1430 | ||
1431 | ||
1432 | wxTreebook = | |
1433 | element object { | |
1434 | attribute class { "wxTreebook" } & | |
1435 | stdObjectNodeAttributes & | |
1436 | stdWindowProperties & | |
1437 | [xrc:p="o"] element imagelist {_, t_imagelist }* & | |
1438 | (wxTreebook_treebookpage | objectRef)* | |
1439 | } | |
1440 | ||
1441 | wxTreebook_treebookpage = | |
1442 | element object { | |
1443 | attribute class { "treebookpage" } & | |
1444 | platform & | |
1445 | [xrc:p="r"] element depth {_, t_integer }+ & | |
1446 | [xrc:p="r"] element label {_, t_text }+ & | |
1447 | [xrc:p="o"]( | |
1448 | element bitmap {_, t_bitmap } | | |
1449 | element image {_, t_integer } | |
1450 | )* & | |
1451 | [xrc:p="o"] element selected {_, t_bool }* & | |
1452 | [xrc:p="o"] element expanded {_, t_bool }* & | |
1453 | windowNode | |
1454 | } | |
1455 | ||
1456 | ||
1457 | wxWizard = | |
1458 | element object { | |
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)* | |
1465 | } | |
1466 | ||
1467 | wxWizardPage_any = | |
1468 | element object { | |
1469 | attribute class { "wxWizardPage" | "wxWizardPageSimple" } & | |
1470 | stdObjectNodeAttributes & | |
1471 | stdWindowProperties & | |
1472 | [xrc:p="o"] element bitmap {_, t_bitmap }* & | |
1473 | (sizerNode | windowNode* )? | |
1474 | } | |
1475 | ||
1476 | ||
1477 | ||
1478 | ||
1479 | wxSizer_item = | |
1480 | element object { | |
1481 | ( | |
1482 | ( | |
1483 | attribute class { "spacer" } & | |
1484 | [xrc:p="o"] element size {_, t_size }* | |
1485 | ) | |
1486 | | | |
1487 | ( | |
1488 | attribute class { "sizeritem" } & | |
1489 | (windowNode | sizerNode) | |
1490 | ) | |
1491 | ) & | |
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 }* | |
1501 | } | |
1502 | ||
1503 | wxBoxSizer = | |
1504 | element object { | |
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)* | |
1510 | } | |
1511 | ||
1512 | wxStaticBoxSizer = | |
1513 | element object { | |
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)* | |
1520 | } | |
1521 | ||
1522 | wxGridSizer = | |
1523 | element object { | |
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)* | |
1532 | } | |
1533 | ||
1534 | wxFlexGridSizer = | |
1535 | element object { | |
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)* | |
1550 | } | |
1551 | ||
1552 | wxGridBagSizer = | |
1553 | element object { | |
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)* | |
1566 | } | |
1567 | ||
1568 | wxWrapSizer = | |
1569 | element object { | |
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)* | |
1576 | } | |
1577 | ||
1578 | wxStdDialogButtonSizer = | |
1579 | element object { | |
1580 | attribute class { "wxStdDialogButtonSizer" } & | |
1581 | stdObjectNodeAttributes & | |
1582 | element object { | |
1583 | attribute class { "button" }, | |
1584 | platform, | |
1585 | (wxButton | customClasses | objectRef) | |
1586 | }+ | |
1587 | } |