xrc_schema.rnc 48 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608
  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. default namespace = "http://www.wxwidgets.org/wxxrc"
  41. namespace xrc = "http://www.wxwidgets.org/wxxrc"
  42. start =
  43. element resource {
  44. # Versions 2.3.0.1 and 2.5.3.0 differ only in how is '\\' interpreted
  45. # in textual content. That's not even validated here, so we accept
  46. # both. Additionally, even though the attribute is optional in the
  47. # spec, we require it here; in other words, the schema cannot be used
  48. # to validate XRC files from previous millennium.
  49. attribute version { "2.3.0.1" | "2.5.3.0" },
  50. toplevelObjectNode*
  51. }
  52. # IMPLEMENTATION NOTES:
  53. #
  54. # The guiding principle for writing this schema is to validate as much as we
  55. # possible can, but without introducing false negatives; it is not acceptable
  56. # to fail validation of a valid (per the human-readable XRC spec) XRC file.
  57. #
  58. # Unfortunately, there are some noteworthy complications when describing the
  59. # XRC format with a formal schema. Working around them results in uglier and
  60. # overly permissive schema:
  61. #
  62. #
  63. # (1) The biggest issue is with the 'platform' attribute, which may be used on
  64. # _any_ node in an XRC document. There's no way to specify "universal"
  65. # attributes that can be placed anywhere in RELAX NG, so we must add the
  66. # attribute everywhere. The 'platform' grammar rule is used for this and it has
  67. # an alias, '_', for reduced verbosity. Typical use:
  68. #
  69. # element size {_, t_size }? &
  70. #
  71. #
  72. # (2) The other 'platform'-related issue is that it messes up cardinality of
  73. # properties elements. Properties can only be specified once, so the two forms
  74. # for describing properties would be
  75. #
  76. # 1. element size {_, t_size }? # optional property
  77. # 2. element size {_, t_size } # required property
  78. #
  79. # (Fortunately, all XRC properties are optional, se the second case is a
  80. # non-issue and can be safely ignored. It is nevertheless briefly mentioned
  81. # below for explanatory purposes.)
  82. #
  83. # But this is problematic with 'platform', because it's reasonable (and,
  84. # indeed, done in the wild) to set properties differently for different
  85. # platforms:
  86. #
  87. # <object class="wxMenuItem" name="menu_new_from_pot">
  88. # <label platform="win">New catalog from POT file...</label>
  89. # <label platform="unix|mac">New Catalog from POT File...</label>
  90. # </object>
  91. #
  92. # But we now have the 'label' property _twice_ and validation fails. The
  93. # simplest fix is to change the cardinality of properties to allow this [A]:
  94. #
  95. # 1. element size {_, t_size }* # optional property (0 or more times)
  96. # 2. element size {_, t_size }+ # required property (at least once)
  97. #
  98. # Of course, this is too lax and allows invalid (but gracefully handled by
  99. # wxXmlResource) markup like this:
  100. #
  101. # <object class="wxMenuItem" name="menu_new_from_pot">
  102. # <label>Something</label>
  103. # <label>Else</label>
  104. # </object>
  105. #
  106. # We could make this better by splitting the property declaration into two, one
  107. # for the case with 'platform' and one for without [B]:
  108. #
  109. # (element size { t_size } | element size { attribute platform{string}, t_size }+)
  110. #
  111. # But this is verbose and unreadable with the amount of properties present in
  112. # the schema. Instead, we use the more-forbidding version and annotate
  113. # properties with 'p' annotation (for "property") to mark these uses of * as
  114. # special and enable post-processing of the schema.
  115. #
  116. # The value of the annotation is normally just "o" (for "optional" -- remember
  117. # that there are no required properties) to indicate optional properties.
  118. #
  119. # Since we have the annotation anyway, we take advantage of it to indicate
  120. # properties that are strictly speaking optional, but should almost always be
  121. # specified, even though they don't _have_ to be. A typical example would be
  122. # wxStaticText's label: it very rarely makes sense to omit it, but usually
  123. # doesn't. Such properties are indicated with the "important" value of the
  124. # annotation:
  125. #
  126. # [xrc:p="o"] element checked { t_bool }* # optional
  127. # [xrc:p="important"] element label { t_text }* # should be provided
  128. #
  129. # This makes it possible to implement tools that translate this schema into a
  130. # variant that uses [B].
  131. #
  132. toplevelObjectNode = (objectRef | builtinToplevelClasses | customClasses)
  133. windowNode = (objectRef | builtinWindowClasses | customClasses)
  134. sizerNode = (objectRef | builtinSizerClasses | customClasses)
  135. # The following three lists must be updated when a new class is added
  136. # to this file.
  137. builtinToplevelClasses =
  138. ( builtinWindowClasses
  139. | idsRange
  140. | wxBitmap_or_wxIcon
  141. | wxMenuBar
  142. | wxMenu
  143. )
  144. builtinWindowClasses =
  145. ( unknown
  146. | wxAnimationCtrl
  147. | wxAuiNotebook
  148. | wxBannerWindow
  149. | wxBitmapButton
  150. | wxBitmapComboBox
  151. | wxBitmapToggleButton
  152. | wxButton
  153. | wxCalendarCtrl
  154. | wxCheckBox
  155. | wxCheckListBox
  156. | wxChoice
  157. | wxChoicebook
  158. | wxCommandLinkButton
  159. | wxCollapsiblePane
  160. | wxColourPickerCtrl
  161. | wxComboBox
  162. | wxComboCtrl
  163. | wxDatePickerCtrl
  164. | wxDialog
  165. | wxDirPickerCtrl
  166. | wxEditableListBox
  167. | wxFileCtrl
  168. | wxFilePickerCtrl
  169. | wxFontPickerCtrl
  170. | wxFrame
  171. | wxGauge
  172. | wxGenericDirCtrl
  173. | wxGrid
  174. | wxHtmlWindow
  175. | wxHyperlinkCtrl
  176. | wxListBox
  177. | wxListbook
  178. | wxListCtrl
  179. | wxMDIParentFrame
  180. | wxNotebook
  181. | wxOwnerDrawnComboBox
  182. | wxPanel
  183. | wxPropertySheetDialog
  184. | wxRadioButton
  185. | wxRadioBox
  186. | wxRibbonBar
  187. | wxRibbonButtonBar
  188. | wxRibbonControl
  189. | wxRibbonGallery
  190. | wxRibbonPage
  191. | wxRibbonPanel
  192. | wxRichTextCtrl
  193. | wxScrollBar
  194. | wxScrolledWindow
  195. | wxSimpleHtmlListBox
  196. | wxSlider
  197. | wxSpinButton
  198. | wxSpinCtrl
  199. | wxSplitterWindow
  200. | wxSearchCtrl
  201. | wxStatusBar
  202. | wxStaticBitmap
  203. | wxStaticBox
  204. | wxStaticLine
  205. | wxStaticText
  206. | wxTextCtrl
  207. | wxTimePickerCtrl
  208. | wxToggleButton
  209. | wxToolBar
  210. | wxToolbook
  211. | wxTreeCtrl
  212. | wxTreebook
  213. | wxWizard
  214. )
  215. builtinSizerClasses =
  216. ( wxBoxSizer
  217. | wxStaticBoxSizer
  218. | wxGridSizer
  219. | wxFlexGridSizer
  220. | wxGridBagSizer
  221. | wxWrapSizer
  222. | wxStdDialogButtonSizer
  223. )
  224. builtinClassesNames =
  225. ( "wxBitmap"
  226. | "wxIcon"
  227. | "wxMenuBar"
  228. | "wxMenu"
  229. | "unknown"
  230. | "wxAnimationCtrl"
  231. | "wxAuiNotebook"
  232. | "wxBannerWindow"
  233. | "wxBitmapButton"
  234. | "wxBitmapComboBox"
  235. | "wxBitmapToggleButton"
  236. | "wxButton"
  237. | "wxCalendarCtrl"
  238. | "wxCheckBox"
  239. | "wxCheckListBox"
  240. | "wxChoice"
  241. | "wxChoicebook"
  242. | "wxCommandLinkButton"
  243. | "wxCollapsiblePane"
  244. | "wxColourPickerCtrl"
  245. | "wxComboBox"
  246. | "wxComboCtrl"
  247. | "wxDatePickerCtrl"
  248. | "wxDialog"
  249. | "wxDirPickerCtrl"
  250. | "wxEditableListBox"
  251. | "wxFileCtrl"
  252. | "wxFilePickerCtrl"
  253. | "wxFontPickerCtrl"
  254. | "wxFrame"
  255. | "wxGauge"
  256. | "wxGenericDirCtrl"
  257. | "wxGrid"
  258. | "wxHtmlWindow"
  259. | "wxHyperlinkCtrl"
  260. | "wxListBox"
  261. | "wxListbook"
  262. | "wxListCtrl"
  263. | "wxMDIParentFrame"
  264. | "wxNotebook"
  265. | "wxOwnerDrawnComboBox"
  266. | "wxPanel"
  267. | "wxPropertySheetDialog"
  268. | "wxRadioButton"
  269. | "wxRadioBox"
  270. | "wxRibbonBar"
  271. | "wxRibbonButtonBar"
  272. | "wxRibbonControl"
  273. | "wxRibbonGallery"
  274. | "wxRibbonPage"
  275. | "wxRibbonPanel"
  276. | "wxRichTextCtrl"
  277. | "wxScrollBar"
  278. | "wxScrolledWindow"
  279. | "wxSimpleHtmlListBox"
  280. | "wxSlider"
  281. | "wxSpinButton"
  282. | "wxSpinCtrl"
  283. | "wxSplitterWindow"
  284. | "wxSearchCtrl"
  285. | "wxStatusBar"
  286. | "wxStaticBitmap"
  287. | "wxStaticBox"
  288. | "wxStaticLine"
  289. | "wxStaticText"
  290. | "wxTextCtrl"
  291. | "wxTimePickerCtrl"
  292. | "wxToggleButton"
  293. | "wxToolBar"
  294. | "wxToolbook"
  295. | "wxTreeCtrl"
  296. | "wxTreebook"
  297. | "wxWizard"
  298. | "wxBoxSizer"
  299. | "wxStaticBoxSizer"
  300. | "wxGridSizer"
  301. | "wxFlexGridSizer"
  302. | "wxGridBagSizer"
  303. | "wxWrapSizer"
  304. | "wxStdDialogButtonSizer"
  305. )
  306. # class names not used at toplevel, only within something else
  307. builtinNestedClassesNames =
  308. ( "wxMenuItem"
  309. | "separator"
  310. | "break"
  311. | "space"
  312. | "tool"
  313. | "panewindow"
  314. | "notebookpage"
  315. | "choicebookpage"
  316. | "listbookpage"
  317. | "treebookpage"
  318. | "propertysheetpage"
  319. | "ownerdrawnitem"
  320. | "listcol"
  321. | "listitem"
  322. | "wxMDIChildFrame"
  323. | "page" | "panel" | "button" | "item" # wxRibbon classes
  324. | "wxWizardPage"
  325. | "wxWizardPageSimple"
  326. )
  327. allPossibleBuiltinClassNames = (builtinClassesNames | builtinNestedClassesNames)
  328. # This grammar rule can be used to plug in any extensions used in an
  329. # application. By default, it allows any content under custom <object>
  330. # nodes.
  331. customClasses =
  332. element object {
  333. attribute class { string - allPossibleBuiltinClassNames } &
  334. stdObjectNodeAttributes &
  335. anyXMLContent*
  336. }
  337. # Helper for specifying arbitrary content.
  338. anyXMLContent =
  339. element * {
  340. (attribute * { text }
  341. | text
  342. | anyXMLContent)*
  343. }
  344. # Annotations used to mark special kinds of content:
  345. #
  346. # [xrc:p] marks properties, with two possible values:
  347. #
  348. # [xrc:p="o"] for normal/optional properties
  349. # [xrc:p="important"] for important properties that
  350. # should almost always be set
  351. #
  352. # All <object> nodes (except the pseudo-classes) have these attributes.
  353. stdObjectNodeAttributes =
  354. attribute subclass { t_identifier }? &
  355. attribute name { t_identifier }? &
  356. platform
  357. # All (almost) wxWindow-derived objects have these properties.
  358. stdWindowProperties =
  359. [xrc:p="o"] element pos {_, t_position }* &
  360. [xrc:p="o"] element size {_, t_size }* &
  361. [xrc:p="o"] element style {_, t_style }* &
  362. [xrc:p="o"] element exstyle {_, t_style }* &
  363. [xrc:p="o"] element fg {_, t_colour }* &
  364. [xrc:p="o"] element ownfg {_, t_colour }* &
  365. [xrc:p="o"] element bg {_, t_colour }* &
  366. [xrc:p="o"] element ownbg {_, t_colour }* &
  367. [xrc:p="o"] element enabled {_, t_bool }* &
  368. [xrc:p="o"] element focused {_, t_bool }* &
  369. [xrc:p="o"] element hidden {_, t_bool }* &
  370. [xrc:p="o"] element tooltip {_, t_text }* &
  371. [xrc:p="o"] element font {_, t_font }* &
  372. [xrc:p="o"] element ownfont {_, t_font }* &
  373. [xrc:p="o"] element help {_, t_text }*
  374. platform =
  375. attribute platform {
  376. xsd:string { pattern = "(win|mac|unix|os2)( *\| *(win|mac|unix|os2))*" }
  377. }?
  378. # shorthand alias for 'platform' for use in properties definitions and
  379. # elsewhere where 'platform' would be too verbose
  380. _ = platform
  381. # Basic data types.
  382. t_identifier = string
  383. t_text = string
  384. t_string = string
  385. t_bool = "1" | "0"
  386. t_integer = xsd:integer
  387. t_unsigned = xsd:nonNegativeInteger
  388. t_float = xsd:float
  389. t_direction = "wxLEFT" | "wxRIGHT" | "wxTOP" | "wxBOTTOM"
  390. t_style = xsd:string { pattern = "(wx[A-Z0-9_]+)( *\| *(wx[A-Z0-9_]+))*" }
  391. t_url = string
  392. 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]" } |
  393. xsd:string { pattern = "[^#].*" }
  394. t_position = t_size
  395. t_size = xsd:string { pattern = "(-?\d+),(-?\d+)d?" }
  396. t_dimension = xsd:string { pattern = "(-?\d+)d?" }
  397. t_bitmap = t_url?,
  398. (
  399. attribute stock_id { t_identifier},
  400. attribute stock_client { t_identifier}?
  401. )?
  402. t_font = (
  403. [xrc:p="o"] element size {_, t_integer }* &
  404. [xrc:p="o"] element style {_, ("normal" | "italic" | "slant") }* &
  405. [xrc:p="o"] element weight {_, ("normal" | "bold" | "light") }* &
  406. [xrc:p="o"] element family {_, ("roman" | "script" | "decorative" | "swiss" |
  407. "modern" | "teletype") }* &
  408. [xrc:p="o"] element underlined {_, t_bool }* &
  409. [xrc:p="o"] element face {_, t_text }* &
  410. [xrc:p="o"] element encoding {_, t_text }* &
  411. [xrc:p="o"] element sysfont {_, ("wxSYS_OEM_FIXED_FONT" | "wxSYS_ANSI_FIXED_FONT" |
  412. "wxSYS_ANSI_VAR_FONT" | "wxSYS_SYSTEM_FONT" |
  413. "wxSYS_DEVICE_DEFAULT_FONT" | "wxSYS_SYSTEM_FIXED_FONT" |
  414. "wxSYS_DEFAULT_GUI_FONT") }* &
  415. [xrc:p="o"] element inherit {_, t_bool }* &
  416. [xrc:p="o"] element relativesize {_, t_float }*
  417. )
  418. t_imagelist = (
  419. [xrc:p="o"] element mask {_, t_bool }* &
  420. [xrc:p="o"] element size {_, t_size }* &
  421. element bitmap {_, t_bitmap }+
  422. )
  423. t_list_of_numbers = xsd:string { pattern = "\d+(,\d+)*" }
  424. #
  425. # Handlers for non-<object> content:
  426. #
  427. idsRange =
  428. element ids-range {
  429. attribute name { t_identifier },
  430. attribute size { t_integer }?,
  431. attribute start { t_integer }?
  432. }
  433. objectRef =
  434. element object_ref {
  435. stdObjectNodeAttributes &
  436. attribute ref { t_identifier } &
  437. anyXMLContent*
  438. }
  439. #
  440. # Handlers for specific <object> classes follow:
  441. #
  442. unknown =
  443. element object {
  444. attribute class { "unknown" } &
  445. attribute name { t_identifier } &
  446. platform &
  447. stdWindowProperties
  448. }
  449. wxBitmap_or_wxIcon =
  450. element object {
  451. attribute class { "wxBitmap" | "wxIcon" } &
  452. stdObjectNodeAttributes &
  453. t_bitmap
  454. }
  455. wxAnimationCtrl =
  456. element object {
  457. attribute class { "wxAnimationCtrl" } &
  458. stdObjectNodeAttributes &
  459. stdWindowProperties &
  460. [xrc:p="o"] element animation {_, t_url }* &
  461. [xrc:p="o"] element inactive-bitmap {_, t_bitmap }*
  462. }
  463. wxAuiNotebook =
  464. element object {
  465. attribute class { "wxAuiNotebook" } &
  466. stdObjectNodeAttributes &
  467. stdWindowProperties &
  468. (wxAuiNotebook_notebookpage | objectRef)*
  469. }
  470. wxAuiNotebook_notebookpage =
  471. element object {
  472. attribute class { "notebookpage" } &
  473. [xrc:p="important"] element label {_, t_text }* &
  474. [xrc:p="o"] element bitmap {_, t_bitmap }* &
  475. [xrc:p="o"] element selected {_, t_bool }* &
  476. windowNode
  477. }
  478. wxBannerWindow =
  479. element object {
  480. attribute class { "wxBannerWindow" } &
  481. stdObjectNodeAttributes &
  482. stdWindowProperties &
  483. [xrc:p="o"] element direction {_, t_direction }* &
  484. [xrc:p="o"](
  485. element bitmap {_, t_bitmap } |
  486. (
  487. element gradient-start {_, t_colour} &
  488. element gradient-end {_, t_colour }
  489. )
  490. )* &
  491. [xrc:p="o"] element title {_, t_text }* &
  492. [xrc:p="o"] element message {_, t_text }*
  493. }
  494. wxBitmapButton =
  495. element object {
  496. attribute class { "wxBitmapButton" } &
  497. stdObjectNodeAttributes &
  498. stdWindowProperties &
  499. [xrc:p="o"] element default {_, t_bool }* &
  500. [xrc:p="important"] element bitmap {_, t_bitmap }* &
  501. [xrc:p="o"] element selected {_, t_bitmap }* &
  502. [xrc:p="o"] element focus {_, t_bitmap }* &
  503. [xrc:p="o"] element disabled {_, t_bitmap }* &
  504. [xrc:p="o"] element hover {_, t_bitmap }*
  505. }
  506. wxBitmapComboBox =
  507. element object {
  508. attribute class { "wxBitmapComboBox" } &
  509. stdObjectNodeAttributes &
  510. stdWindowProperties &
  511. [xrc:p="o"] element selection {_, t_integer }* &
  512. [xrc:p="o"] element value {_, t_text }* &
  513. (wxBitmapComboBox_ownerdrawnitem | objectRef)*
  514. }
  515. wxBitmapComboBox_ownerdrawnitem =
  516. element object {
  517. attribute class { "ownerdrawnitem" } &
  518. platform &
  519. [xrc:p="important"] element text {_, t_text }* &
  520. [xrc:p="o"] element bitmap {_, t_bitmap }*
  521. }
  522. wxBitmapToggleButton =
  523. element object {
  524. attribute class { "wxBitmapToggleButton" } &
  525. stdObjectNodeAttributes &
  526. stdWindowProperties &
  527. [xrc:p="important"] element bitmap {_, t_bitmap }* &
  528. [xrc:p="o"] element checked {_, t_bool }*
  529. }
  530. wxButton =
  531. element object {
  532. attribute class { "wxButton" } &
  533. stdObjectNodeAttributes &
  534. stdWindowProperties &
  535. [xrc:p="o"] element label {_, t_text }* &
  536. [xrc:p="o"] element bitmap {_, t_bitmap }* &
  537. [xrc:p="o"] element bitmapposition {_, t_direction }* &
  538. [xrc:p="o"] element default {_, t_bool }*
  539. }
  540. wxCalendarCtrl =
  541. element object {
  542. attribute class { "wxCalendarCtrl" } &
  543. stdObjectNodeAttributes &
  544. stdWindowProperties
  545. }
  546. wxCheckBox =
  547. element object {
  548. attribute class { "wxCheckBox" } &
  549. stdObjectNodeAttributes &
  550. stdWindowProperties &
  551. [xrc:p="important"] element label {_, t_text }* &
  552. [xrc:p="o"] element checked {_, t_bool }*
  553. }
  554. wxCheckListBox =
  555. element object {
  556. attribute class { "wxCheckListBox" } &
  557. stdObjectNodeAttributes &
  558. stdWindowProperties &
  559. element content {
  560. platform,
  561. element item {
  562. attribute checked { t_bool }?,
  563. t_text
  564. }*
  565. }?
  566. }
  567. wxChoice =
  568. element object {
  569. attribute class { "wxChoice" } &
  570. stdObjectNodeAttributes &
  571. stdWindowProperties &
  572. [xrc:p="o"] element selection {_, t_integer }* &
  573. element content {
  574. platform,
  575. element item {_, t_text }*
  576. }?
  577. }
  578. wxChoicebook =
  579. element object {
  580. attribute class { "wxChoicebook" } &
  581. stdObjectNodeAttributes &
  582. stdWindowProperties &
  583. [xrc:p="o"] element imagelist {_, t_imagelist }* &
  584. (wxChoicebook_choicebookpage | objectRef)*
  585. }
  586. wxChoicebook_choicebookpage =
  587. element object {
  588. attribute class { "choicebookpage" } &
  589. platform &
  590. [xrc:p="important"] element label {_, t_text }* &
  591. [xrc:p="o"](
  592. element bitmap {_, t_bitmap } |
  593. element image {_, t_integer }
  594. )* &
  595. [xrc:p="o"] element selected {_, t_bool }* &
  596. windowNode
  597. }
  598. wxCommandLinkButton =
  599. element object {
  600. attribute class { "wxCommandLinkButton" } &
  601. stdObjectNodeAttributes &
  602. stdWindowProperties &
  603. [xrc:p="important"] element label {_, t_text }* &
  604. [xrc:p="o"] element note {_, t_text }*
  605. }
  606. wxCollapsiblePane =
  607. element object {
  608. attribute class { "wxCollapsiblePane" } &
  609. stdObjectNodeAttributes &
  610. stdWindowProperties &
  611. [xrc:p="important"] element label {_, t_text }* &
  612. [xrc:p="o"] element collapsed {_, t_bool }* &
  613. (wxCollapsiblePane_panewindow | objectRef)?
  614. }
  615. wxCollapsiblePane_panewindow =
  616. element object {
  617. attribute class { "panewindow" } &
  618. platform &
  619. (sizerNode | windowNode)
  620. }
  621. wxColourPickerCtrl =
  622. element object {
  623. attribute class { "wxColourPickerCtrl" } &
  624. stdObjectNodeAttributes &
  625. stdWindowProperties &
  626. [xrc:p="o"] element value {_, t_colour }*
  627. }
  628. wxComboBox =
  629. element object {
  630. attribute class { "wxComboBox" } &
  631. stdObjectNodeAttributes &
  632. stdWindowProperties &
  633. [xrc:p="o"] element selection {_, t_integer }* &
  634. [xrc:p="o"] element value {_, t_string }* &
  635. element content {
  636. platform,
  637. element item {_, t_text }*
  638. }?
  639. }
  640. wxComboCtrl =
  641. element object {
  642. attribute class { "wxComboCtrl" } &
  643. stdObjectNodeAttributes &
  644. stdWindowProperties &
  645. [xrc:p="o"] element value {_, t_string }*
  646. }
  647. wxDatePickerCtrl =
  648. element object {
  649. attribute class { "wxDatePickerCtrl" } &
  650. stdObjectNodeAttributes &
  651. stdWindowProperties
  652. }
  653. wxDialog =
  654. element object {
  655. attribute class { "wxDialog" } &
  656. stdObjectNodeAttributes &
  657. stdWindowProperties &
  658. [xrc:p="o"] element title {_, t_text }* &
  659. [xrc:p="o"] element icon {_, t_bitmap }* &
  660. [xrc:p="o"] element centered {_, t_bool }* &
  661. (sizerNode | windowNode* )?
  662. }
  663. wxDirPickerCtrl =
  664. element object {
  665. attribute class { "wxDirPickerCtrl" } &
  666. stdObjectNodeAttributes &
  667. stdWindowProperties &
  668. [xrc:p="o"] element value {_, t_string }* &
  669. [xrc:p="important"] element message {_, t_text}*
  670. }
  671. wxEditableListBox =
  672. element object {
  673. attribute class { "wxEditableListBox" } &
  674. stdObjectNodeAttributes &
  675. stdWindowProperties &
  676. [xrc:p="o"] element label {_, t_text}* &
  677. element content {
  678. platform,
  679. element item {_, t_text }*
  680. }?
  681. }
  682. wxFileCtrl =
  683. element object {
  684. attribute class { "wxFileCtrl" } &
  685. stdObjectNodeAttributes &
  686. stdWindowProperties &
  687. [xrc:p="o"] element defaultdirectory {_, t_string }* &
  688. [xrc:p="o"] element defaultfilename {_, t_string }* &
  689. [xrc:p="o"] element wildcard {_, t_string }*
  690. }
  691. wxFilePickerCtrl =
  692. element object {
  693. attribute class { "wxFilePickerCtrl" } &
  694. stdObjectNodeAttributes &
  695. stdWindowProperties &
  696. [xrc:p="o"] element value {_, t_string }* &
  697. [xrc:p="important"] element message {_, t_text }* &
  698. [xrc:p="o"] element wildcard {_, t_string }*
  699. }
  700. wxFontPickerCtrl =
  701. element object {
  702. attribute class { "wxFontPickerCtrl" } &
  703. stdObjectNodeAttributes &
  704. stdWindowProperties &
  705. [xrc:p="o"] element value {_, t_font }*
  706. }
  707. wxFrame =
  708. element object {
  709. attribute class { "wxFrame" } &
  710. stdObjectNodeAttributes &
  711. stdWindowProperties &
  712. [xrc:p="o"] element title {_, t_text }* &
  713. [xrc:p="o"] element icon {_, t_bitmap }* &
  714. [xrc:p="o"] element centered {_, t_bool }* &
  715. (sizerNode | windowNode* )?
  716. }
  717. wxGauge =
  718. element object {
  719. attribute class { "wxGauge" } &
  720. stdObjectNodeAttributes &
  721. stdWindowProperties &
  722. [xrc:p="o"] element range {_, t_integer }* &
  723. [xrc:p="o"] element value {_, t_integer }* &
  724. [xrc:p="o"] element shadow {_, t_dimension }* &
  725. [xrc:p="o"] element bezel {_, t_dimension }*
  726. }
  727. wxGenericDirCtrl =
  728. element object {
  729. attribute class { "wxGenericDirCtrl" } &
  730. stdObjectNodeAttributes &
  731. stdWindowProperties &
  732. [xrc:p="o"] element defaultfolder {_, t_string }* &
  733. [xrc:p="o"] element filter {_, t_text }* &
  734. [xrc:p="o"] element defaultfilter {_, t_integer }*
  735. }
  736. wxGrid =
  737. element object {
  738. attribute class { "wxGrid" } &
  739. stdObjectNodeAttributes &
  740. stdWindowProperties
  741. }
  742. wxHtmlWindow =
  743. element object {
  744. attribute class { "wxHtmlWindow" } &
  745. stdObjectNodeAttributes &
  746. stdWindowProperties &
  747. [xrc:p="o"](
  748. element url {_, t_url } |
  749. element htmlcode {_, t_text }
  750. )* &
  751. [xrc:p="o"] element borders {_, t_dimension }*
  752. }
  753. wxHyperlinkCtrl =
  754. element object {
  755. attribute class { "wxHyperlinkCtrl" } &
  756. stdObjectNodeAttributes &
  757. stdWindowProperties &
  758. [xrc:p="important"] element label {_, t_text }* &
  759. [xrc:p="important"] element url {_, t_url }*
  760. }
  761. wxListBox =
  762. element object {
  763. attribute class { "wxListBox" } &
  764. stdObjectNodeAttributes &
  765. stdWindowProperties &
  766. [xrc:p="o"] element selection {_, t_integer }* &
  767. element content {
  768. platform,
  769. element item {_, t_text }*
  770. }?
  771. }
  772. wxListbook =
  773. element object {
  774. attribute class { "wxListbook" } &
  775. stdObjectNodeAttributes &
  776. stdWindowProperties &
  777. [xrc:p="o"] element imagelist {_, t_imagelist }* &
  778. (wxListbook_listbookpage | objectRef)*
  779. }
  780. wxListbook_listbookpage =
  781. element object {
  782. attribute class { "listbookpage" } &
  783. [xrc:p="important"] element label {_, t_text }* &
  784. [xrc:p="o"](
  785. element bitmap {_, t_bitmap } |
  786. element image {_, t_integer }
  787. )* &
  788. [xrc:p="o"] element selected {_, t_bool }* &
  789. windowNode
  790. }
  791. wxListCtrl =
  792. element object {
  793. attribute class { "wxListCtrl" } &
  794. stdObjectNodeAttributes &
  795. stdWindowProperties &
  796. [xrc:p="o"] element imagelist {_, t_imagelist }* &
  797. [xrc:p="o"] element imagelist-small {_, t_imagelist }* &
  798. (wxListCtrl_listcol | wxListCtrl_listitem | objectRef)*
  799. }
  800. wxListCtrl_listcol =
  801. element object {
  802. attribute class { "listcol" } &
  803. platform &
  804. [xrc:p="o"] element align {_, ("wxLIST_FORMAT_LEFT" | "wxLIST_FORMAT_RIGHT" |
  805. "wxLIST_FORMAT_CENTRE") }* &
  806. [xrc:p="o"] element text {_, t_text }* &
  807. [xrc:p="o"] element width {_, t_integer }* &
  808. [xrc:p="o"] element image {_, t_integer }*
  809. }
  810. wxListCtrl_listitem =
  811. element object {
  812. attribute class { "listitem" } &
  813. platform &
  814. [xrc:p="o"] element align {_, ("wxLIST_FORMAT_LEFT" | "wxLIST_FORMAT_RIGHT" |
  815. "wxLIST_FORMAT_CENTRE") }* &
  816. [xrc:p="o"] element bg {_, t_colour }* &
  817. [xrc:p="o"] element col {_, t_integer }* &
  818. [xrc:p="o"] element data {_, t_integer }* &
  819. [xrc:p="o"] element font {_, t_font }* &
  820. [xrc:p="o"] element state {_, ("wxLIST_STATE_FOCUSED" | "wxLIST_STATE_SELECTED") }* &
  821. [xrc:p="o"] element text {_, t_text }* &
  822. [xrc:p="o"] element textcolour {_, t_colour }* &
  823. [xrc:p="o"](
  824. element bitmap {_, t_bitmap } |
  825. element image {_, t_integer }
  826. )* &
  827. [xrc:p="o"](
  828. element bitmap-small {_, t_bitmap } |
  829. element image-small {_, t_integer }
  830. )*
  831. }
  832. wxMDIParentFrame =
  833. element object {
  834. attribute class { "wxMDIParentFrame" } &
  835. stdObjectNodeAttributes &
  836. stdWindowProperties &
  837. [xrc:p="o"] element title {_, t_text }* &
  838. [xrc:p="o"] element icon {_, t_bitmap }* &
  839. [xrc:p="o"] element centered {_, t_bool }* &
  840. (wxMDIChildFrame | objectRef)*
  841. }
  842. wxMDIChildFrame =
  843. element object {
  844. attribute class { "wxMDIChildFrame" } &
  845. stdObjectNodeAttributes &
  846. stdWindowProperties &
  847. [xrc:p="o"] element title {_, t_text }* &
  848. [xrc:p="o"] element icon {_, t_bitmap }* &
  849. [xrc:p="o"] element centered {_, t_bool }* &
  850. (sizerNode | windowNode* )?
  851. }
  852. wxMenuBar =
  853. element object {
  854. attribute class { "wxMenuBar" } &
  855. stdObjectNodeAttributes &
  856. [xrc:p="o"] element style {_, t_style }* &
  857. (wxMenu | objectRef)*
  858. }
  859. wxMenu =
  860. element object {
  861. attribute class { "wxMenu" } &
  862. stdObjectNodeAttributes &
  863. [xrc:p="o"] element label {_, t_text }* &
  864. [xrc:p="o"] element style {_, t_style }* &
  865. [xrc:p="o"] element help {_, t_text }* &
  866. [xrc:p="o"] element enabled {_, t_bool }* &
  867. (
  868. wxMenuItem |
  869. wxMenu |
  870. objectRef |
  871. element object { attribute class { "separator" }, platform } |
  872. element object { attribute class { "break" }, platform }
  873. )*
  874. }
  875. wxMenuItem =
  876. element object {
  877. attribute class { "wxMenuItem" } &
  878. stdObjectNodeAttributes &
  879. [xrc:p="o"] element label {_, t_text }* &
  880. [xrc:p="o"] element accel {_, t_text }* &
  881. [xrc:p="o"] element radio {_, t_bool }* &
  882. [xrc:p="o"] element checkable {_, t_bool }* &
  883. [xrc:p="o"] element bitmap {_, t_bitmap }* &
  884. [xrc:p="o"] element bitmap2 {_, t_bitmap }* &
  885. [xrc:p="o"] element help {_, t_text }* &
  886. [xrc:p="o"] element enabled {_, t_bool }* &
  887. [xrc:p="o"] element checked {_, t_bool }*
  888. }
  889. wxNotebook =
  890. element object {
  891. attribute class { "wxNotebook" } &
  892. stdObjectNodeAttributes &
  893. stdWindowProperties &
  894. [xrc:p="o"] element imagelist {_, t_imagelist }* &
  895. (wxNotebook_notebookpage | objectRef)*
  896. }
  897. wxNotebook_notebookpage =
  898. element object {
  899. attribute class { "notebookpage" } &
  900. platform &
  901. [xrc:p="important"] element label {_, t_text }* &
  902. (
  903. element bitmap {_, t_bitmap } |
  904. element image {_, t_integer }
  905. )? &
  906. [xrc:p="o"] element selected {_, t_bool }* &
  907. windowNode
  908. }
  909. wxOwnerDrawnComboBox =
  910. element object {
  911. attribute class { "wxOwnerDrawnComboBox" } &
  912. stdObjectNodeAttributes &
  913. stdWindowProperties &
  914. [xrc:p="o"] element selection {_, t_integer }* &
  915. [xrc:p="o"] element value {_, t_string }* &
  916. [xrc:p="o"] element buttonsize {_, t_size }* &
  917. element content {
  918. platform,
  919. element item {_, t_text }*
  920. }?
  921. }
  922. wxPanel =
  923. element object {
  924. attribute class { "wxPanel" } &
  925. stdObjectNodeAttributes &
  926. stdWindowProperties &
  927. (sizerNode | windowNode* )?
  928. }
  929. wxPropertySheetDialog =
  930. element object {
  931. attribute class { "wxPropertySheetDialog" } &
  932. stdObjectNodeAttributes &
  933. stdWindowProperties &
  934. [xrc:p="o"] element title {_, t_text }* &
  935. [xrc:p="o"] element icon {_, t_bitmap }* &
  936. [xrc:p="o"] element centered {_, t_bool }* &
  937. [xrc:p="o"] element buttons {_, t_style }* &
  938. (wxNotebook_notebookpage | objectRef)*
  939. }
  940. wxPropertySheetDialog_propertysheetpage =
  941. element object {
  942. attribute class { "propertysheetpage" } &
  943. platform &
  944. [xrc:p="important"] element label {_, t_text }* &
  945. [xrc:p="o"] element bitmap {_, t_bitmap }* &
  946. [xrc:p="o"] element selected {_, t_bool }* &
  947. windowNode
  948. }
  949. wxRadioButton =
  950. element object {
  951. attribute class { "wxRadioButton" } &
  952. stdObjectNodeAttributes &
  953. stdWindowProperties &
  954. [xrc:p="important"] element label {_, t_text }* &
  955. [xrc:p="o"] element value {_, t_bool }*
  956. }
  957. wxRadioBox =
  958. element object {
  959. attribute class { "wxRadioBox" } &
  960. stdObjectNodeAttributes &
  961. stdWindowProperties &
  962. [xrc:p="important"] element label {_, t_text }* &
  963. [xrc:p="o"] element dimension {_, t_integer }* &
  964. [xrc:p="o"] element selection {_, t_integer }* &
  965. element content {
  966. platform,
  967. element item {
  968. platform,
  969. attribute tooltip { t_string }?,
  970. attribute helptext { t_string }?,
  971. attribute enabled { t_bool }?,
  972. attribute hidden { t_bool }?,
  973. t_text
  974. }*
  975. }?
  976. }
  977. wxRibbonBar =
  978. element object {
  979. attribute class { "wxRibbonBar" } &
  980. stdObjectNodeAttributes &
  981. stdWindowProperties &
  982. [xrc:p="o"] element art-provider {_, ("default" | "aui" | "msw") }* &
  983. (wxRibbonPage | objectRef)*
  984. }
  985. wxRibbonButtonBar =
  986. element object {
  987. attribute class { "wxRibbonButtonBar" } &
  988. stdObjectNodeAttributes &
  989. stdWindowProperties &
  990. (wxRibbonButtonBar_button | objectRef)*
  991. }
  992. wxRibbonButtonBar_button =
  993. element object {
  994. attribute class { "button" } &
  995. stdObjectNodeAttributes &
  996. [xrc:p="o"] element hybrid {_, t_bool }* &
  997. [xrc:p="o"] element disabled {_, t_bool }* &
  998. [xrc:p="important"] element label {_, t_text }* &
  999. [xrc:p="important"] element bitmap {_, t_bitmap }* &
  1000. [xrc:p="o"] element small-bitmap {_, t_bitmap }* &
  1001. [xrc:p="o"] element disabled-bitmap {_, t_bitmap }* &
  1002. [xrc:p="o"] element small-disabled-bitmap {_, t_bitmap }* &
  1003. [xrc:p="o"] element help {_, t_text }*
  1004. }
  1005. wxRibbonControl =
  1006. element object {
  1007. attribute class { "wxRibbonControl" } &
  1008. attribute subclass { t_identifier } & # must be subclassed
  1009. attribute name { t_identifier }? &
  1010. platform
  1011. }
  1012. wxRibbonGallery =
  1013. element object {
  1014. attribute class { "wxRibbonGallery" } &
  1015. stdObjectNodeAttributes &
  1016. stdWindowProperties &
  1017. (wxRibbonGallery_item | objectRef)*
  1018. }
  1019. wxRibbonGallery_item =
  1020. element object {
  1021. attribute class { "item" } &
  1022. stdObjectNodeAttributes &
  1023. [xrc:p="o"] element bitmap {_, t_bitmap }*
  1024. }
  1025. wxRibbonPage =
  1026. element object {
  1027. # unfortunately, wxRibbonXmlHandler supports "page" alias
  1028. attribute class { "wxRibbonPage" | "page" } &
  1029. stdObjectNodeAttributes &
  1030. stdWindowProperties &
  1031. [xrc:p="o"] element label {_, t_text }* &
  1032. [xrc:p="o"] element icon {_, t_bitmap }* &
  1033. (wxRibbon_anyControl | objectRef)*
  1034. }
  1035. wxRibbonPanel =
  1036. element object {
  1037. # unfortunately, wxRibbonXmlHandler supports "panel" alias
  1038. attribute class { "wxRibbonPanel" | "panel" } &
  1039. stdObjectNodeAttributes &
  1040. stdWindowProperties &
  1041. [xrc:p="o"] element label {_, t_text }* &
  1042. [xrc:p="o"] element icon {_, t_bitmap }* &
  1043. (sizerNode | wxRibbon_anyControl | objectRef)*
  1044. }
  1045. wxRibbon_anyControl = wxRibbonBar | wxRibbonButtonBar | wxRibbonControl |
  1046. wxRibbonGallery | wxRibbonPanel
  1047. wxRichTextCtrl =
  1048. element object {
  1049. attribute class { "wxRichTextCtrl" } &
  1050. stdObjectNodeAttributes &
  1051. stdWindowProperties &
  1052. [xrc:p="o"] element value {_, t_text }* &
  1053. [xrc:p="o"] element maxlength {_, t_integer }* &
  1054. [xrc:p="o"] element hint {_, t_text }*
  1055. }
  1056. wxScrollBar =
  1057. element object {
  1058. attribute class { "wxScrollBar" } &
  1059. stdObjectNodeAttributes &
  1060. stdWindowProperties &
  1061. [xrc:p="o"] element value {_, t_integer }* &
  1062. [xrc:p="o"] element range {_, t_integer }* &
  1063. [xrc:p="o"] element thumbsize {_, t_integer }* &
  1064. [xrc:p="o"] element pagesize {_, t_integer }*
  1065. }
  1066. wxScrolledWindow =
  1067. element object {
  1068. attribute class { "wxScrolledWindow" } &
  1069. stdObjectNodeAttributes &
  1070. stdWindowProperties &
  1071. [xrc:p="o"] element scrollrate {_, t_size }* &
  1072. (sizerNode | windowNode* )?
  1073. }
  1074. wxSimpleHtmlListBox =
  1075. element object {
  1076. attribute class { "wxSimpleHtmlListBox" } &
  1077. stdObjectNodeAttributes &
  1078. stdWindowProperties &
  1079. [xrc:p="o"] element selection {_, t_integer }* &
  1080. element content {
  1081. platform,
  1082. element item {_, t_text }*
  1083. }?
  1084. }
  1085. wxSlider =
  1086. element object {
  1087. attribute class { "wxSlider" } &
  1088. stdObjectNodeAttributes &
  1089. stdWindowProperties &
  1090. [xrc:p="o"] element value {_, t_integer }* &
  1091. [xrc:p="o"] element min {_, t_integer }* &
  1092. [xrc:p="o"] element max {_, t_integer }* &
  1093. [xrc:p="o"] element pagesize {_, t_integer }* &
  1094. [xrc:p="o"] element linesize {_, t_integer }* &
  1095. [xrc:p="o"] element tickfreq {_, t_integer }* &
  1096. [xrc:p="o"] element tick {_, t_integer }* &
  1097. [xrc:p="o"] element thumb {_, t_integer }* &
  1098. [xrc:p="o"] element selmin {_, t_integer }* &
  1099. [xrc:p="o"] element selmax {_, t_integer }*
  1100. }
  1101. wxSpinButton =
  1102. element object {
  1103. attribute class { "wxSpinButton" } &
  1104. stdObjectNodeAttributes &
  1105. stdWindowProperties &
  1106. [xrc:p="o"] element value {_, t_integer }* &
  1107. [xrc:p="o"] element min {_, t_integer }* &
  1108. [xrc:p="o"] element max {_, t_integer }*
  1109. }
  1110. wxSpinCtrl =
  1111. element object {
  1112. attribute class { "wxSpinCtrl" } &
  1113. stdObjectNodeAttributes &
  1114. stdWindowProperties &
  1115. [xrc:p="o"] element value {_, t_integer }* &
  1116. [xrc:p="o"] element min {_, t_integer }* &
  1117. [xrc:p="o"] element max {_, t_integer }* &
  1118. [xrc:p="o"] element base {_, ("10" | "16") }*
  1119. }
  1120. wxSplitterWindow =
  1121. element object {
  1122. attribute class { "wxSplitterWindow" } &
  1123. stdObjectNodeAttributes &
  1124. stdWindowProperties &
  1125. [xrc:p="o"] element orientation {_, ("vertical" | "horizontal") }* &
  1126. [xrc:p="o"] element sashpos {_, t_dimension }* &
  1127. [xrc:p="o"] element minsize {_, t_dimension }* &
  1128. [xrc:p="o"] element gravity {_, t_float }* &
  1129. (windowNode, windowNode?) # 1 or 2 child windows
  1130. }
  1131. wxSearchCtrl =
  1132. element object {
  1133. attribute class { "wxSearchCtrl" } &
  1134. stdObjectNodeAttributes &
  1135. stdWindowProperties &
  1136. [xrc:p="o"] element value {_, t_text }*
  1137. }
  1138. wxStatusBar =
  1139. element object {
  1140. attribute class { "wxStatusBar" } &
  1141. stdObjectNodeAttributes &
  1142. stdWindowProperties &
  1143. [xrc:p="o"] element fields {_, t_integer }* &
  1144. [xrc:p="o"] element widths {_, t_list_of_numbers }* &
  1145. [xrc:p="o"] element styles {_, xsd:string { pattern = "wxSB_(NORMAL|FLAT|RAISED|SUNKEN)(,wxSB_(NORMAL|FLAT|RAISED|SUNKEN))*" } }*
  1146. }
  1147. wxStaticBitmap =
  1148. element object {
  1149. attribute class { "wxStaticBitmap" } &
  1150. stdObjectNodeAttributes &
  1151. stdWindowProperties &
  1152. element bitmap {_, t_bitmap }
  1153. }
  1154. wxStaticBox =
  1155. element object {
  1156. attribute class { "wxStaticBox" } &
  1157. stdObjectNodeAttributes &
  1158. stdWindowProperties &
  1159. [xrc:p="important"] element label {_, t_text }*
  1160. }
  1161. wxStaticLine =
  1162. element object {
  1163. attribute class { "wxStaticLine" } &
  1164. stdObjectNodeAttributes &
  1165. stdWindowProperties
  1166. }
  1167. wxStaticText =
  1168. element object {
  1169. attribute class { "wxStaticText" } &
  1170. stdObjectNodeAttributes &
  1171. stdWindowProperties &
  1172. [xrc:p="important"] element label {_, t_text }* &
  1173. [xrc:p="o"] element wrap {_, t_dimension }*
  1174. }
  1175. wxTextCtrl =
  1176. element object {
  1177. attribute class { "wxTextCtrl" } &
  1178. stdObjectNodeAttributes &
  1179. stdWindowProperties &
  1180. [xrc:p="o"] element value {_, t_text }* &
  1181. [xrc:p="o"] element maxlength {_, t_integer }*
  1182. }
  1183. wxTimePickerCtrl =
  1184. element object {
  1185. attribute class { "wxTimePickerCtrl" } &
  1186. stdObjectNodeAttributes &
  1187. stdWindowProperties
  1188. }
  1189. wxToggleButton =
  1190. element object {
  1191. attribute class { "wxToggleButton" } &
  1192. stdObjectNodeAttributes &
  1193. stdWindowProperties &
  1194. [xrc:p="important"] element label {_, t_text }* &
  1195. [xrc:p="o"] element checked {_, t_bool }*
  1196. }
  1197. wxToolBar =
  1198. element object {
  1199. attribute class { "wxToolBar" } &
  1200. stdObjectNodeAttributes &
  1201. stdWindowProperties &
  1202. [xrc:p="o"] element bitmapsize {_, t_size }* &
  1203. [xrc:p="o"] element margins {_, t_size }* &
  1204. [xrc:p="o"] element packing {_, t_integer }* &
  1205. [xrc:p="o"] element separation {_, t_integer }* &
  1206. [xrc:p="o"] element dontattachtoframe {_, t_bool }* &
  1207. (
  1208. windowNode |
  1209. wxToolBar_tool |
  1210. element object { attribute class { "separator" }, platform } |
  1211. element object { attribute class { "space" }, platform }
  1212. )*
  1213. }
  1214. wxToolBar_tool =
  1215. element object {
  1216. attribute class { "tool" } &
  1217. stdObjectNodeAttributes &
  1218. [xrc:p="important"] element bitmap {_, t_bitmap }* &
  1219. [xrc:p="o"] element bitmap2 {_, t_bitmap }* &
  1220. [xrc:p="o"] element label {_, t_text }* &
  1221. [xrc:p="o"] element tooltip {_, t_text }* &
  1222. [xrc:p="o"] element longhelp {_, t_text }* &
  1223. [xrc:p="o"] element disabled {_, t_bool }* &
  1224. [xrc:p="o"] element checked {_, t_bool }* &
  1225. [xrc:p="o"](
  1226. element radio {_, t_bool } |
  1227. element toggle {_, t_bool } |
  1228. element dropdown {_, wxMenu? }
  1229. )*
  1230. }
  1231. wxToolbook =
  1232. element object {
  1233. attribute class { "wxToolbook" } &
  1234. stdObjectNodeAttributes &
  1235. stdWindowProperties &
  1236. [xrc:p="o"] element imagelist {_, t_imagelist }* &
  1237. (wxToolbook_toolbookpage | objectRef)*
  1238. }
  1239. wxToolbook_toolbookpage =
  1240. element object {
  1241. attribute class { "toolbookpage" } &
  1242. platform &
  1243. [xrc:p="important"] element label {_, t_text }* &
  1244. [xrc:p="o"](
  1245. element bitmap {_, t_bitmap } |
  1246. element image {_, t_integer }
  1247. )* &
  1248. [xrc:p="o"] element selected {_, t_bool }* &
  1249. windowNode
  1250. }
  1251. wxTreeCtrl =
  1252. element object {
  1253. attribute class { "wxTreeCtrl" } &
  1254. stdObjectNodeAttributes &
  1255. stdWindowProperties &
  1256. [xrc:p="o"] element imagelist {_, t_imagelist }*
  1257. }
  1258. wxTreebook =
  1259. element object {
  1260. attribute class { "wxTreebook" } &
  1261. stdObjectNodeAttributes &
  1262. stdWindowProperties &
  1263. [xrc:p="o"] element imagelist {_, t_imagelist }* &
  1264. (wxTreebook_treebookpage | objectRef)*
  1265. }
  1266. wxTreebook_treebookpage =
  1267. element object {
  1268. attribute class { "treebookpage" } &
  1269. platform &
  1270. [xrc:p="important"] element depth {_, t_integer }* &
  1271. [xrc:p="important"] element label {_, t_text }* &
  1272. [xrc:p="o"](
  1273. element bitmap {_, t_bitmap } |
  1274. element image {_, t_integer }
  1275. )* &
  1276. [xrc:p="o"] element selected {_, t_bool }* &
  1277. [xrc:p="o"] element expanded {_, t_bool }* &
  1278. windowNode
  1279. }
  1280. wxWizard =
  1281. element object {
  1282. attribute class { "wxWizard" } &
  1283. stdObjectNodeAttributes &
  1284. stdWindowProperties &
  1285. [xrc:p="o"] element title {_, t_text }* &
  1286. [xrc:p="o"] element bitmap {_, t_bitmap }* &
  1287. (wxWizardPage_any | objectRef)*
  1288. }
  1289. wxWizardPage_any =
  1290. element object {
  1291. attribute class { "wxWizardPage" | "wxWizardPageSimple" } &
  1292. stdObjectNodeAttributes &
  1293. stdWindowProperties &
  1294. [xrc:p="o"] element bitmap {_, t_bitmap }* &
  1295. (sizerNode | windowNode* )?
  1296. }
  1297. wxSizer_item =
  1298. element object {
  1299. (
  1300. (
  1301. attribute class { "spacer" } &
  1302. [xrc:p="o"] element size {_, t_size }*
  1303. )
  1304. |
  1305. (
  1306. attribute class { "sizeritem" } &
  1307. (windowNode | sizerNode)
  1308. )
  1309. ) &
  1310. stdObjectNodeAttributes &
  1311. [xrc:p="o"] element option {_, t_integer }* &
  1312. [xrc:p="o"] element border {_, t_dimension }* &
  1313. [xrc:p="o"] element minsize {_, t_size }* &
  1314. [xrc:p="o"] element ratio {_, t_size }* &
  1315. # TODO: cell{pos,span} are wxGridBagSizer-only and required in it, this is too lax
  1316. [xrc:p="o"] element cellpos {_, t_position }* &
  1317. [xrc:p="o"] element cellspan {_, t_size }* &
  1318. [xrc:p="o"] element flag {_,
  1319. xsd:string {
  1320. pattern = "(wxLEFT|wxRIGHT|wxTOP|wxBOTTOM|wxNORTH|wxSOUTH|wxEAST|wxWEST|wxALL|wxGROW|wxEXPAND|wxSHAPED|wxSTRETCH_NOT|wxALIGN_CENTER|wxALIGN_CENTRE|wxALIGN_LEFT|wxALIGN_RIGHT|wxALIGN_TOP|wxALIGN_BOTTOM|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTRE_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTRE_VERTICAL)( *\| *(wxLEFT|wxRIGHT|wxTOP|wxBOTTOM|wxNORTH|wxSOUTH|wxEAST|wxWEST|wxALL|wxGROW|wxEXPAND|wxSHAPED|wxSTRETCH_NOT|wxALIGN_CENTER|wxALIGN_CENTRE|wxALIGN_LEFT|wxALIGN_RIGHT|wxALIGN_TOP|wxALIGN_BOTTOM|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTRE_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTRE_VERTICAL))*"
  1321. }
  1322. }*
  1323. }
  1324. wxBoxSizer =
  1325. element object {
  1326. attribute class { "wxBoxSizer" } &
  1327. stdObjectNodeAttributes &
  1328. [xrc:p="o"] element minsize {_, t_size }* &
  1329. [xrc:p="o"] element orient {_, ("wxHORIZONTAL" | "wxVERTICAL") }* &
  1330. (wxSizer_item | objectRef)*
  1331. }
  1332. wxStaticBoxSizer =
  1333. element object {
  1334. attribute class { "wxStaticBoxSizer" } &
  1335. stdObjectNodeAttributes &
  1336. [xrc:p="o"] element minsize {_, t_size }* &
  1337. [xrc:p="important"] element label {_, t_text }* &
  1338. [xrc:p="o"] element orient {_, ("wxHORIZONTAL" | "wxVERTICAL") }* &
  1339. (wxSizer_item | objectRef)*
  1340. }
  1341. wxGridSizer =
  1342. element object {
  1343. attribute class { "wxGridSizer" } &
  1344. stdObjectNodeAttributes &
  1345. [xrc:p="o"] element minsize {_, t_size }* &
  1346. [xrc:p="o"] element rows {_, t_unsigned }* &
  1347. [xrc:p="o"] element cols {_, t_unsigned }* &
  1348. [xrc:p="o"] element vgap {_, t_dimension }* &
  1349. [xrc:p="o"] element hgap {_, t_dimension }* &
  1350. (wxSizer_item | objectRef)*
  1351. }
  1352. wxFlexGridSizer =
  1353. element object {
  1354. attribute class { "wxFlexGridSizer" } &
  1355. stdObjectNodeAttributes &
  1356. [xrc:p="o"] element minsize {_, t_size }* &
  1357. [xrc:p="o"] element rows {_, t_unsigned }* &
  1358. [xrc:p="o"] element cols {_, t_unsigned }* &
  1359. [xrc:p="o"] element vgap {_, t_dimension }* &
  1360. [xrc:p="o"] element hgap {_, t_dimension }* &
  1361. [xrc:p="o"] element flexibledirection {_, ("wxVERTICAL" | "wxHORIZONTAL" | "wxBOTH") }* &
  1362. [xrc:p="o"] element nonflexiblegrowmode {_, ("wxFLEX_GROWMODE_NONE" |
  1363. "wxFLEX_GROWMODE_SPECIFIED" |
  1364. "wxFLEX_GROWMODE_ALL") }* &
  1365. [xrc:p="o"] element growablerows {_, t_list_of_numbers }* &
  1366. [xrc:p="o"] element growablecols {_, t_list_of_numbers }* &
  1367. (wxSizer_item | objectRef)*
  1368. }
  1369. wxGridBagSizer =
  1370. element object {
  1371. attribute class { "wxGridBagSizer" } &
  1372. stdObjectNodeAttributes &
  1373. [xrc:p="o"] element minsize {_, t_size }* &
  1374. [xrc:p="o"] element vgap {_, t_dimension }* &
  1375. [xrc:p="o"] element hgap {_, t_dimension }* &
  1376. [xrc:p="o"] element flexibledirection {_, ("wxVERTICAL" | "wxHORIZONTAL" | "wxBOTH") }* &
  1377. [xrc:p="o"] element nonflexiblegrowmode {_, ("wxFLEX_GROWMODE_NONE" |
  1378. "wxFLEX_GROWMODE_SPECIFIED" |
  1379. "wxFLEX_GROWMODE_ALL") }* &
  1380. [xrc:p="o"] element growablerows {_, t_list_of_numbers }* &
  1381. [xrc:p="o"] element growablecols {_, t_list_of_numbers }* &
  1382. (wxSizer_item | objectRef)*
  1383. }
  1384. wxWrapSizer =
  1385. element object {
  1386. attribute class { "wxWrapSizer" } &
  1387. stdObjectNodeAttributes &
  1388. [xrc:p="o"] element minsize {_, t_size }* &
  1389. [xrc:p="important"] element orient {_, ("wxHORIZONTAL" | "wxVERTICAL") }* &
  1390. [xrc:p="o"] element flag {_, t_style }* &
  1391. (wxSizer_item | objectRef)*
  1392. }
  1393. wxStdDialogButtonSizer =
  1394. element object {
  1395. attribute class { "wxStdDialogButtonSizer" } &
  1396. stdObjectNodeAttributes &
  1397. element object {
  1398. attribute class { "button" },
  1399. platform,
  1400. (wxButton | customClasses | objectRef)
  1401. }+
  1402. }