xrc_schema.rnc 48 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632
  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. | wxSimplebook
  197. | wxSlider
  198. | wxSpinButton
  199. | wxSpinCtrl
  200. | wxSplitterWindow
  201. | wxSearchCtrl
  202. | wxStatusBar
  203. | wxStaticBitmap
  204. | wxStaticBox
  205. | wxStaticLine
  206. | wxStaticText
  207. | wxTextCtrl
  208. | wxTimePickerCtrl
  209. | wxToggleButton
  210. | wxToolBar
  211. | wxToolbook
  212. | wxTreeCtrl
  213. | wxTreebook
  214. | wxWizard
  215. )
  216. builtinSizerClasses =
  217. ( wxBoxSizer
  218. | wxStaticBoxSizer
  219. | wxGridSizer
  220. | wxFlexGridSizer
  221. | wxGridBagSizer
  222. | wxWrapSizer
  223. | wxStdDialogButtonSizer
  224. )
  225. builtinClassesNames =
  226. ( "wxBitmap"
  227. | "wxIcon"
  228. | "wxMenuBar"
  229. | "wxMenu"
  230. | "unknown"
  231. | "wxAnimationCtrl"
  232. | "wxAuiNotebook"
  233. | "wxBannerWindow"
  234. | "wxBitmapButton"
  235. | "wxBitmapComboBox"
  236. | "wxBitmapToggleButton"
  237. | "wxButton"
  238. | "wxCalendarCtrl"
  239. | "wxCheckBox"
  240. | "wxCheckListBox"
  241. | "wxChoice"
  242. | "wxChoicebook"
  243. | "wxCommandLinkButton"
  244. | "wxCollapsiblePane"
  245. | "wxColourPickerCtrl"
  246. | "wxComboBox"
  247. | "wxComboCtrl"
  248. | "wxDatePickerCtrl"
  249. | "wxDialog"
  250. | "wxDirPickerCtrl"
  251. | "wxEditableListBox"
  252. | "wxFileCtrl"
  253. | "wxFilePickerCtrl"
  254. | "wxFontPickerCtrl"
  255. | "wxFrame"
  256. | "wxGauge"
  257. | "wxGenericDirCtrl"
  258. | "wxGrid"
  259. | "wxHtmlWindow"
  260. | "wxHyperlinkCtrl"
  261. | "wxListBox"
  262. | "wxListbook"
  263. | "wxListCtrl"
  264. | "wxMDIParentFrame"
  265. | "wxNotebook"
  266. | "wxOwnerDrawnComboBox"
  267. | "wxPanel"
  268. | "wxPropertySheetDialog"
  269. | "wxRadioButton"
  270. | "wxRadioBox"
  271. | "wxRibbonBar"
  272. | "wxRibbonButtonBar"
  273. | "wxRibbonControl"
  274. | "wxRibbonGallery"
  275. | "wxRibbonPage"
  276. | "wxRibbonPanel"
  277. | "wxRichTextCtrl"
  278. | "wxScrollBar"
  279. | "wxScrolledWindow"
  280. | "wxSimpleHtmlListBox"
  281. | "wxSimplebook"
  282. | "wxSlider"
  283. | "wxSpinButton"
  284. | "wxSpinCtrl"
  285. | "wxSplitterWindow"
  286. | "wxSearchCtrl"
  287. | "wxStatusBar"
  288. | "wxStaticBitmap"
  289. | "wxStaticBox"
  290. | "wxStaticLine"
  291. | "wxStaticText"
  292. | "wxTextCtrl"
  293. | "wxTimePickerCtrl"
  294. | "wxToggleButton"
  295. | "wxToolBar"
  296. | "wxToolbook"
  297. | "wxTreeCtrl"
  298. | "wxTreebook"
  299. | "wxWizard"
  300. | "wxBoxSizer"
  301. | "wxStaticBoxSizer"
  302. | "wxGridSizer"
  303. | "wxFlexGridSizer"
  304. | "wxGridBagSizer"
  305. | "wxWrapSizer"
  306. | "wxStdDialogButtonSizer"
  307. )
  308. # class names not used at toplevel, only within something else
  309. builtinNestedClassesNames =
  310. ( "wxMenuItem"
  311. | "separator"
  312. | "break"
  313. | "space"
  314. | "tool"
  315. | "panewindow"
  316. | "notebookpage"
  317. | "choicebookpage"
  318. | "listbookpage"
  319. | "simplebookpage"
  320. | "treebookpage"
  321. | "propertysheetpage"
  322. | "ownerdrawnitem"
  323. | "listcol"
  324. | "listitem"
  325. | "wxMDIChildFrame"
  326. | "page" | "panel" | "button" | "item" # wxRibbon classes
  327. | "wxWizardPage"
  328. | "wxWizardPageSimple"
  329. )
  330. allPossibleBuiltinClassNames = (builtinClassesNames | builtinNestedClassesNames)
  331. # This grammar rule can be used to plug in any extensions used in an
  332. # application. By default, it allows any content under custom <object>
  333. # nodes.
  334. customClasses =
  335. element object {
  336. attribute class { string - allPossibleBuiltinClassNames } &
  337. stdObjectNodeAttributes &
  338. anyXMLContent*
  339. }
  340. # Helper for specifying arbitrary content.
  341. anyXMLContent =
  342. element * {
  343. (attribute * { text }
  344. | text
  345. | anyXMLContent)*
  346. }
  347. # Annotations used to mark special kinds of content:
  348. #
  349. # [xrc:p] marks properties, with two possible values:
  350. #
  351. # [xrc:p="o"] for normal/optional properties
  352. # [xrc:p="important"] for important properties that
  353. # should almost always be set
  354. #
  355. # All <object> nodes (except the pseudo-classes) have these attributes.
  356. stdObjectNodeAttributes =
  357. attribute subclass { t_identifier }? &
  358. attribute name { t_identifier }? &
  359. platform
  360. # All (almost) wxWindow-derived objects have these properties.
  361. stdWindowProperties =
  362. [xrc:p="o"] element pos {_, t_position }* &
  363. [xrc:p="o"] element size {_, t_size }* &
  364. [xrc:p="o"] element style {_, t_style }* &
  365. [xrc:p="o"] element exstyle {_, t_style }* &
  366. [xrc:p="o"] element fg {_, t_colour }* &
  367. [xrc:p="o"] element ownfg {_, t_colour }* &
  368. [xrc:p="o"] element bg {_, t_colour }* &
  369. [xrc:p="o"] element ownbg {_, t_colour }* &
  370. [xrc:p="o"] element enabled {_, t_bool }* &
  371. [xrc:p="o"] element focused {_, t_bool }* &
  372. [xrc:p="o"] element hidden {_, t_bool }* &
  373. [xrc:p="o"] element tooltip {_, t_text }* &
  374. [xrc:p="o"] element variant {_, t_variant }* &
  375. [xrc:p="o"] element font {_, t_font }* &
  376. [xrc:p="o"] element ownfont {_, t_font }* &
  377. [xrc:p="o"] element help {_, t_text }*
  378. platform =
  379. attribute platform {
  380. xsd:string { pattern = "(win|mac|unix|os2)( *\| *(win|mac|unix|os2))*" }
  381. }?
  382. # shorthand alias for 'platform' for use in properties definitions and
  383. # elsewhere where 'platform' would be too verbose
  384. _ = platform
  385. # Basic data types.
  386. t_identifier = string
  387. t_text = string
  388. t_string = string
  389. t_bool = "1" | "0"
  390. t_integer = xsd:integer
  391. t_unsigned = xsd:nonNegativeInteger
  392. t_float = xsd:float
  393. t_direction = "wxLEFT" | "wxRIGHT" | "wxTOP" | "wxBOTTOM"
  394. t_style = xsd:string { pattern = "(wx[A-Z0-9_]+)( *\| *(wx[A-Z0-9_]+))*" }
  395. t_url = string
  396. 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]" } |
  397. xsd:string { pattern = "[^#].*" }
  398. t_position = t_size
  399. t_size = xsd:string { pattern = "(-?\d+),(-?\d+)d?" }
  400. t_dimension = xsd:string { pattern = "(-?\d+)d?" }
  401. t_bitmap = t_url?,
  402. (
  403. attribute stock_id { t_identifier},
  404. attribute stock_client { t_identifier}?
  405. )?
  406. t_font = (
  407. [xrc:p="o"] element size {_, t_integer }* &
  408. [xrc:p="o"] element style {_, ("normal" | "italic" | "slant") }* &
  409. [xrc:p="o"] element weight {_, ("normal" | "bold" | "light") }* &
  410. [xrc:p="o"] element family {_, ("roman" | "script" | "decorative" | "swiss" |
  411. "modern" | "teletype") }* &
  412. [xrc:p="o"] element underlined {_, t_bool }* &
  413. [xrc:p="o"] element face {_, t_text }* &
  414. [xrc:p="o"] element encoding {_, t_text }* &
  415. [xrc:p="o"] element sysfont {_, ("wxSYS_OEM_FIXED_FONT" | "wxSYS_ANSI_FIXED_FONT" |
  416. "wxSYS_ANSI_VAR_FONT" | "wxSYS_SYSTEM_FONT" |
  417. "wxSYS_DEVICE_DEFAULT_FONT" | "wxSYS_SYSTEM_FIXED_FONT" |
  418. "wxSYS_DEFAULT_GUI_FONT") }* &
  419. [xrc:p="o"] element inherit {_, t_bool }* &
  420. [xrc:p="o"] element relativesize {_, t_float }*
  421. )
  422. t_variant = "normal" | "small" | "mini" | "large"
  423. t_imagelist = (
  424. [xrc:p="o"] element mask {_, t_bool }* &
  425. [xrc:p="o"] element size {_, t_size }* &
  426. element bitmap {_, t_bitmap }+
  427. )
  428. t_list_of_numbers = xsd:string { pattern = "\d+(,\d+)*" }
  429. #
  430. # Handlers for non-<object> content:
  431. #
  432. idsRange =
  433. element ids-range {
  434. attribute name { t_identifier },
  435. attribute size { t_integer }?,
  436. attribute start { t_integer }?
  437. }
  438. objectRef =
  439. element object_ref {
  440. stdObjectNodeAttributes &
  441. attribute ref { t_identifier } &
  442. anyXMLContent*
  443. }
  444. #
  445. # Handlers for specific <object> classes follow:
  446. #
  447. unknown =
  448. element object {
  449. attribute class { "unknown" } &
  450. attribute name { t_identifier } &
  451. platform &
  452. stdWindowProperties
  453. }
  454. wxBitmap_or_wxIcon =
  455. element object {
  456. attribute class { "wxBitmap" | "wxIcon" } &
  457. stdObjectNodeAttributes &
  458. t_bitmap
  459. }
  460. wxAnimationCtrl =
  461. element object {
  462. attribute class { "wxAnimationCtrl" } &
  463. stdObjectNodeAttributes &
  464. stdWindowProperties &
  465. [xrc:p="o"] element animation {_, t_url }* &
  466. [xrc:p="o"] element inactive-bitmap {_, t_bitmap }*
  467. }
  468. wxAuiNotebook =
  469. element object {
  470. attribute class { "wxAuiNotebook" } &
  471. stdObjectNodeAttributes &
  472. stdWindowProperties &
  473. (wxAuiNotebook_notebookpage | objectRef)*
  474. }
  475. wxAuiNotebook_notebookpage =
  476. element object {
  477. attribute class { "notebookpage" } &
  478. [xrc:p="important"] element label {_, t_text }* &
  479. [xrc:p="o"] element bitmap {_, t_bitmap }* &
  480. [xrc:p="o"] element selected {_, t_bool }* &
  481. windowNode
  482. }
  483. wxBannerWindow =
  484. element object {
  485. attribute class { "wxBannerWindow" } &
  486. stdObjectNodeAttributes &
  487. stdWindowProperties &
  488. [xrc:p="o"] element direction {_, t_direction }* &
  489. [xrc:p="o"](
  490. element bitmap {_, t_bitmap } |
  491. (
  492. element gradient-start {_, t_colour} &
  493. element gradient-end {_, t_colour }
  494. )
  495. )* &
  496. [xrc:p="o"] element title {_, t_text }* &
  497. [xrc:p="o"] element message {_, t_text }*
  498. }
  499. wxBitmapButton =
  500. element object {
  501. attribute class { "wxBitmapButton" } &
  502. stdObjectNodeAttributes &
  503. stdWindowProperties &
  504. [xrc:p="o"] element default {_, t_bool }* &
  505. [xrc:p="important"] element bitmap {_, t_bitmap }* &
  506. [xrc:p="o"] element selected {_, t_bitmap }* &
  507. [xrc:p="o"] element focus {_, t_bitmap }* &
  508. [xrc:p="o"] element disabled {_, t_bitmap }* &
  509. [xrc:p="o"] element hover {_, t_bitmap }*
  510. }
  511. wxBitmapComboBox =
  512. element object {
  513. attribute class { "wxBitmapComboBox" } &
  514. stdObjectNodeAttributes &
  515. stdWindowProperties &
  516. [xrc:p="o"] element selection {_, t_integer }* &
  517. [xrc:p="o"] element value {_, t_text }* &
  518. (wxBitmapComboBox_ownerdrawnitem | objectRef)*
  519. }
  520. wxBitmapComboBox_ownerdrawnitem =
  521. element object {
  522. attribute class { "ownerdrawnitem" } &
  523. platform &
  524. [xrc:p="important"] element text {_, t_text }* &
  525. [xrc:p="o"] element bitmap {_, t_bitmap }*
  526. }
  527. wxBitmapToggleButton =
  528. element object {
  529. attribute class { "wxBitmapToggleButton" } &
  530. stdObjectNodeAttributes &
  531. stdWindowProperties &
  532. [xrc:p="important"] element bitmap {_, t_bitmap }* &
  533. [xrc:p="o"] element checked {_, t_bool }*
  534. }
  535. wxButton =
  536. element object {
  537. attribute class { "wxButton" } &
  538. stdObjectNodeAttributes &
  539. stdWindowProperties &
  540. [xrc:p="o"] element label {_, t_text }* &
  541. [xrc:p="o"] element bitmap {_, t_bitmap }* &
  542. [xrc:p="o"] element bitmapposition {_, t_direction }* &
  543. [xrc:p="o"] element default {_, t_bool }*
  544. }
  545. wxCalendarCtrl =
  546. element object {
  547. attribute class { "wxCalendarCtrl" } &
  548. stdObjectNodeAttributes &
  549. stdWindowProperties
  550. }
  551. wxCheckBox =
  552. element object {
  553. attribute class { "wxCheckBox" } &
  554. stdObjectNodeAttributes &
  555. stdWindowProperties &
  556. [xrc:p="important"] element label {_, t_text }* &
  557. [xrc:p="o"] element checked {_, t_bool }*
  558. }
  559. wxCheckListBox =
  560. element object {
  561. attribute class { "wxCheckListBox" } &
  562. stdObjectNodeAttributes &
  563. stdWindowProperties &
  564. element content {
  565. platform,
  566. element item {
  567. attribute checked { t_bool }?,
  568. t_text
  569. }*
  570. }?
  571. }
  572. wxChoice =
  573. element object {
  574. attribute class { "wxChoice" } &
  575. stdObjectNodeAttributes &
  576. stdWindowProperties &
  577. [xrc:p="o"] element selection {_, t_integer }* &
  578. element content {
  579. platform,
  580. element item {_, t_text }*
  581. }?
  582. }
  583. wxChoicebook =
  584. element object {
  585. attribute class { "wxChoicebook" } &
  586. stdObjectNodeAttributes &
  587. stdWindowProperties &
  588. [xrc:p="o"] element imagelist {_, t_imagelist }* &
  589. (wxChoicebook_choicebookpage | objectRef)*
  590. }
  591. wxChoicebook_choicebookpage =
  592. element object {
  593. attribute class { "choicebookpage" } &
  594. platform &
  595. [xrc:p="important"] element label {_, t_text }* &
  596. [xrc:p="o"](
  597. element bitmap {_, t_bitmap } |
  598. element image {_, t_integer }
  599. )* &
  600. [xrc:p="o"] element selected {_, t_bool }* &
  601. windowNode
  602. }
  603. wxCommandLinkButton =
  604. element object {
  605. attribute class { "wxCommandLinkButton" } &
  606. stdObjectNodeAttributes &
  607. stdWindowProperties &
  608. [xrc:p="important"] element label {_, t_text }* &
  609. [xrc:p="o"] element note {_, t_text }*
  610. }
  611. wxCollapsiblePane =
  612. element object {
  613. attribute class { "wxCollapsiblePane" } &
  614. stdObjectNodeAttributes &
  615. stdWindowProperties &
  616. [xrc:p="important"] element label {_, t_text }* &
  617. [xrc:p="o"] element collapsed {_, t_bool }* &
  618. (wxCollapsiblePane_panewindow | objectRef)?
  619. }
  620. wxCollapsiblePane_panewindow =
  621. element object {
  622. attribute class { "panewindow" } &
  623. platform &
  624. (sizerNode | windowNode)
  625. }
  626. wxColourPickerCtrl =
  627. element object {
  628. attribute class { "wxColourPickerCtrl" } &
  629. stdObjectNodeAttributes &
  630. stdWindowProperties &
  631. [xrc:p="o"] element value {_, t_colour }*
  632. }
  633. wxComboBox =
  634. element object {
  635. attribute class { "wxComboBox" } &
  636. stdObjectNodeAttributes &
  637. stdWindowProperties &
  638. [xrc:p="o"] element selection {_, t_integer }* &
  639. [xrc:p="o"] element value {_, t_string }* &
  640. element content {
  641. platform,
  642. element item {_, t_text }*
  643. }?
  644. }
  645. wxComboCtrl =
  646. element object {
  647. attribute class { "wxComboCtrl" } &
  648. stdObjectNodeAttributes &
  649. stdWindowProperties &
  650. [xrc:p="o"] element value {_, t_string }*
  651. }
  652. wxDatePickerCtrl =
  653. element object {
  654. attribute class { "wxDatePickerCtrl" } &
  655. stdObjectNodeAttributes &
  656. stdWindowProperties
  657. }
  658. wxDialog =
  659. element object {
  660. attribute class { "wxDialog" } &
  661. stdObjectNodeAttributes &
  662. stdWindowProperties &
  663. [xrc:p="o"] element title {_, t_text }* &
  664. [xrc:p="o"] element icon {_, t_bitmap }* &
  665. [xrc:p="o"] element centered {_, t_bool }* &
  666. (sizerNode | windowNode* )?
  667. }
  668. wxDirPickerCtrl =
  669. element object {
  670. attribute class { "wxDirPickerCtrl" } &
  671. stdObjectNodeAttributes &
  672. stdWindowProperties &
  673. [xrc:p="o"] element value {_, t_string }* &
  674. [xrc:p="important"] element message {_, t_text}*
  675. }
  676. wxEditableListBox =
  677. element object {
  678. attribute class { "wxEditableListBox" } &
  679. stdObjectNodeAttributes &
  680. stdWindowProperties &
  681. [xrc:p="o"] element label {_, t_text}* &
  682. element content {
  683. platform,
  684. element item {_, t_text }*
  685. }?
  686. }
  687. wxFileCtrl =
  688. element object {
  689. attribute class { "wxFileCtrl" } &
  690. stdObjectNodeAttributes &
  691. stdWindowProperties &
  692. [xrc:p="o"] element defaultdirectory {_, t_string }* &
  693. [xrc:p="o"] element defaultfilename {_, t_string }* &
  694. [xrc:p="o"] element wildcard {_, t_string }*
  695. }
  696. wxFilePickerCtrl =
  697. element object {
  698. attribute class { "wxFilePickerCtrl" } &
  699. stdObjectNodeAttributes &
  700. stdWindowProperties &
  701. [xrc:p="o"] element value {_, t_string }* &
  702. [xrc:p="important"] element message {_, t_text }* &
  703. [xrc:p="o"] element wildcard {_, t_string }*
  704. }
  705. wxFontPickerCtrl =
  706. element object {
  707. attribute class { "wxFontPickerCtrl" } &
  708. stdObjectNodeAttributes &
  709. stdWindowProperties &
  710. [xrc:p="o"] element value {_, t_font }*
  711. }
  712. wxFrame =
  713. element object {
  714. attribute class { "wxFrame" } &
  715. stdObjectNodeAttributes &
  716. stdWindowProperties &
  717. [xrc:p="o"] element title {_, t_text }* &
  718. [xrc:p="o"] element icon {_, t_bitmap }* &
  719. [xrc:p="o"] element centered {_, t_bool }* &
  720. (sizerNode | windowNode* )?
  721. }
  722. wxGauge =
  723. element object {
  724. attribute class { "wxGauge" } &
  725. stdObjectNodeAttributes &
  726. stdWindowProperties &
  727. [xrc:p="o"] element range {_, t_integer }* &
  728. [xrc:p="o"] element value {_, t_integer }* &
  729. [xrc:p="o"] element shadow {_, t_dimension }* &
  730. [xrc:p="o"] element bezel {_, t_dimension }*
  731. }
  732. wxGenericDirCtrl =
  733. element object {
  734. attribute class { "wxGenericDirCtrl" } &
  735. stdObjectNodeAttributes &
  736. stdWindowProperties &
  737. [xrc:p="o"] element defaultfolder {_, t_string }* &
  738. [xrc:p="o"] element filter {_, t_text }* &
  739. [xrc:p="o"] element defaultfilter {_, t_integer }*
  740. }
  741. wxGrid =
  742. element object {
  743. attribute class { "wxGrid" } &
  744. stdObjectNodeAttributes &
  745. stdWindowProperties
  746. }
  747. wxHtmlWindow =
  748. element object {
  749. attribute class { "wxHtmlWindow" } &
  750. stdObjectNodeAttributes &
  751. stdWindowProperties &
  752. [xrc:p="o"](
  753. element url {_, t_url } |
  754. element htmlcode {_, t_text }
  755. )* &
  756. [xrc:p="o"] element borders {_, t_dimension }*
  757. }
  758. wxHyperlinkCtrl =
  759. element object {
  760. attribute class { "wxHyperlinkCtrl" } &
  761. stdObjectNodeAttributes &
  762. stdWindowProperties &
  763. [xrc:p="important"] element label {_, t_text }* &
  764. [xrc:p="important"] element url {_, t_url }*
  765. }
  766. wxListBox =
  767. element object {
  768. attribute class { "wxListBox" } &
  769. stdObjectNodeAttributes &
  770. stdWindowProperties &
  771. [xrc:p="o"] element selection {_, t_integer }* &
  772. element content {
  773. platform,
  774. element item {_, t_text }*
  775. }?
  776. }
  777. wxListbook =
  778. element object {
  779. attribute class { "wxListbook" } &
  780. stdObjectNodeAttributes &
  781. stdWindowProperties &
  782. [xrc:p="o"] element imagelist {_, t_imagelist }* &
  783. (wxListbook_listbookpage | objectRef)*
  784. }
  785. wxListbook_listbookpage =
  786. element object {
  787. attribute class { "listbookpage" } &
  788. [xrc:p="important"] element label {_, t_text }* &
  789. [xrc:p="o"](
  790. element bitmap {_, t_bitmap } |
  791. element image {_, t_integer }
  792. )* &
  793. [xrc:p="o"] element selected {_, t_bool }* &
  794. windowNode
  795. }
  796. wxListCtrl =
  797. element object {
  798. attribute class { "wxListCtrl" } &
  799. stdObjectNodeAttributes &
  800. stdWindowProperties &
  801. [xrc:p="o"] element imagelist {_, t_imagelist }* &
  802. [xrc:p="o"] element imagelist-small {_, t_imagelist }* &
  803. (wxListCtrl_listcol | wxListCtrl_listitem | objectRef)*
  804. }
  805. wxListCtrl_listcol =
  806. element object {
  807. attribute class { "listcol" } &
  808. platform &
  809. [xrc:p="o"] element align {_, ("wxLIST_FORMAT_LEFT" | "wxLIST_FORMAT_RIGHT" |
  810. "wxLIST_FORMAT_CENTRE") }* &
  811. [xrc:p="o"] element text {_, t_text }* &
  812. [xrc:p="o"] element width {_, t_integer }* &
  813. [xrc:p="o"] element image {_, t_integer }*
  814. }
  815. wxListCtrl_listitem =
  816. element object {
  817. attribute class { "listitem" } &
  818. platform &
  819. [xrc:p="o"] element align {_, ("wxLIST_FORMAT_LEFT" | "wxLIST_FORMAT_RIGHT" |
  820. "wxLIST_FORMAT_CENTRE") }* &
  821. [xrc:p="o"] element bg {_, t_colour }* &
  822. [xrc:p="o"] element col {_, t_integer }* &
  823. [xrc:p="o"] element data {_, t_integer }* &
  824. [xrc:p="o"] element font {_, t_font }* &
  825. [xrc:p="o"] element state {_, ("wxLIST_STATE_FOCUSED" | "wxLIST_STATE_SELECTED") }* &
  826. [xrc:p="o"] element text {_, t_text }* &
  827. [xrc:p="o"] element textcolour {_, t_colour }* &
  828. [xrc:p="o"](
  829. element bitmap {_, t_bitmap } |
  830. element image {_, t_integer }
  831. )* &
  832. [xrc:p="o"](
  833. element bitmap-small {_, t_bitmap } |
  834. element image-small {_, t_integer }
  835. )*
  836. }
  837. wxMDIParentFrame =
  838. element object {
  839. attribute class { "wxMDIParentFrame" } &
  840. stdObjectNodeAttributes &
  841. stdWindowProperties &
  842. [xrc:p="o"] element title {_, t_text }* &
  843. [xrc:p="o"] element icon {_, t_bitmap }* &
  844. [xrc:p="o"] element centered {_, t_bool }* &
  845. (wxMDIChildFrame | objectRef)*
  846. }
  847. wxMDIChildFrame =
  848. element object {
  849. attribute class { "wxMDIChildFrame" } &
  850. stdObjectNodeAttributes &
  851. stdWindowProperties &
  852. [xrc:p="o"] element title {_, t_text }* &
  853. [xrc:p="o"] element icon {_, t_bitmap }* &
  854. [xrc:p="o"] element centered {_, t_bool }* &
  855. (sizerNode | windowNode* )?
  856. }
  857. wxMenuBar =
  858. element object {
  859. attribute class { "wxMenuBar" } &
  860. stdObjectNodeAttributes &
  861. [xrc:p="o"] element style {_, t_style }* &
  862. (wxMenu | objectRef)*
  863. }
  864. wxMenu =
  865. element object {
  866. attribute class { "wxMenu" } &
  867. stdObjectNodeAttributes &
  868. [xrc:p="o"] element label {_, t_text }* &
  869. [xrc:p="o"] element style {_, t_style }* &
  870. [xrc:p="o"] element help {_, t_text }* &
  871. [xrc:p="o"] element enabled {_, t_bool }* &
  872. (
  873. wxMenuItem |
  874. wxMenu |
  875. objectRef |
  876. element object { attribute class { "separator" }, platform } |
  877. element object { attribute class { "break" }, platform }
  878. )*
  879. }
  880. wxMenuItem =
  881. element object {
  882. attribute class { "wxMenuItem" } &
  883. stdObjectNodeAttributes &
  884. [xrc:p="o"] element label {_, t_text }* &
  885. [xrc:p="o"] element accel {_, t_text }* &
  886. [xrc:p="o"] element radio {_, t_bool }* &
  887. [xrc:p="o"] element checkable {_, t_bool }* &
  888. [xrc:p="o"] element bitmap {_, t_bitmap }* &
  889. [xrc:p="o"] element bitmap2 {_, t_bitmap }* &
  890. [xrc:p="o"] element help {_, t_text }* &
  891. [xrc:p="o"] element enabled {_, t_bool }* &
  892. [xrc:p="o"] element checked {_, t_bool }*
  893. }
  894. wxNotebook =
  895. element object {
  896. attribute class { "wxNotebook" } &
  897. stdObjectNodeAttributes &
  898. stdWindowProperties &
  899. [xrc:p="o"] element imagelist {_, t_imagelist }* &
  900. (wxNotebook_notebookpage | objectRef)*
  901. }
  902. wxNotebook_notebookpage =
  903. element object {
  904. attribute class { "notebookpage" } &
  905. platform &
  906. [xrc:p="important"] element label {_, t_text }* &
  907. (
  908. element bitmap {_, t_bitmap } |
  909. element image {_, t_integer }
  910. )? &
  911. [xrc:p="o"] element selected {_, t_bool }* &
  912. windowNode
  913. }
  914. wxOwnerDrawnComboBox =
  915. element object {
  916. attribute class { "wxOwnerDrawnComboBox" } &
  917. stdObjectNodeAttributes &
  918. stdWindowProperties &
  919. [xrc:p="o"] element selection {_, t_integer }* &
  920. [xrc:p="o"] element value {_, t_string }* &
  921. [xrc:p="o"] element buttonsize {_, t_size }* &
  922. element content {
  923. platform,
  924. element item {_, t_text }*
  925. }?
  926. }
  927. wxPanel =
  928. element object {
  929. attribute class { "wxPanel" } &
  930. stdObjectNodeAttributes &
  931. stdWindowProperties &
  932. (sizerNode | windowNode* )?
  933. }
  934. wxPropertySheetDialog =
  935. element object {
  936. attribute class { "wxPropertySheetDialog" } &
  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. [xrc:p="o"] element buttons {_, t_style }* &
  943. (wxNotebook_notebookpage | objectRef)*
  944. }
  945. wxPropertySheetDialog_propertysheetpage =
  946. element object {
  947. attribute class { "propertysheetpage" } &
  948. platform &
  949. [xrc:p="important"] element label {_, t_text }* &
  950. [xrc:p="o"] element bitmap {_, t_bitmap }* &
  951. [xrc:p="o"] element selected {_, t_bool }* &
  952. windowNode
  953. }
  954. wxRadioButton =
  955. element object {
  956. attribute class { "wxRadioButton" } &
  957. stdObjectNodeAttributes &
  958. stdWindowProperties &
  959. [xrc:p="important"] element label {_, t_text }* &
  960. [xrc:p="o"] element value {_, t_bool }*
  961. }
  962. wxRadioBox =
  963. element object {
  964. attribute class { "wxRadioBox" } &
  965. stdObjectNodeAttributes &
  966. stdWindowProperties &
  967. [xrc:p="important"] element label {_, t_text }* &
  968. [xrc:p="o"] element dimension {_, t_integer }* &
  969. [xrc:p="o"] element selection {_, t_integer }* &
  970. element content {
  971. platform,
  972. element item {
  973. platform,
  974. attribute tooltip { t_string }?,
  975. attribute helptext { t_string }?,
  976. attribute enabled { t_bool }?,
  977. attribute hidden { t_bool }?,
  978. t_text
  979. }*
  980. }?
  981. }
  982. wxRibbonBar =
  983. element object {
  984. attribute class { "wxRibbonBar" } &
  985. stdObjectNodeAttributes &
  986. stdWindowProperties &
  987. [xrc:p="o"] element art-provider {_, ("default" | "aui" | "msw") }* &
  988. (wxRibbonPage | objectRef)*
  989. }
  990. wxRibbonButtonBar =
  991. element object {
  992. attribute class { "wxRibbonButtonBar" } &
  993. stdObjectNodeAttributes &
  994. stdWindowProperties &
  995. (wxRibbonButtonBar_button | objectRef)*
  996. }
  997. wxRibbonButtonBar_button =
  998. element object {
  999. attribute class { "button" } &
  1000. stdObjectNodeAttributes &
  1001. [xrc:p="o"] element hybrid {_, t_bool }* &
  1002. [xrc:p="o"] element disabled {_, t_bool }* &
  1003. [xrc:p="important"] element label {_, t_text }* &
  1004. [xrc:p="important"] element bitmap {_, t_bitmap }* &
  1005. [xrc:p="o"] element small-bitmap {_, t_bitmap }* &
  1006. [xrc:p="o"] element disabled-bitmap {_, t_bitmap }* &
  1007. [xrc:p="o"] element small-disabled-bitmap {_, t_bitmap }* &
  1008. [xrc:p="o"] element help {_, t_text }*
  1009. }
  1010. wxRibbonControl =
  1011. element object {
  1012. attribute class { "wxRibbonControl" } &
  1013. attribute subclass { t_identifier } & # must be subclassed
  1014. attribute name { t_identifier }? &
  1015. platform
  1016. }
  1017. wxRibbonGallery =
  1018. element object {
  1019. attribute class { "wxRibbonGallery" } &
  1020. stdObjectNodeAttributes &
  1021. stdWindowProperties &
  1022. (wxRibbonGallery_item | objectRef)*
  1023. }
  1024. wxRibbonGallery_item =
  1025. element object {
  1026. attribute class { "item" } &
  1027. stdObjectNodeAttributes &
  1028. [xrc:p="o"] element bitmap {_, t_bitmap }*
  1029. }
  1030. wxRibbonPage =
  1031. element object {
  1032. # unfortunately, wxRibbonXmlHandler supports "page" alias
  1033. attribute class { "wxRibbonPage" | "page" } &
  1034. stdObjectNodeAttributes &
  1035. stdWindowProperties &
  1036. [xrc:p="o"] element label {_, t_text }* &
  1037. [xrc:p="o"] element icon {_, t_bitmap }* &
  1038. (wxRibbon_anyControl | objectRef)*
  1039. }
  1040. wxRibbonPanel =
  1041. element object {
  1042. # unfortunately, wxRibbonXmlHandler supports "panel" alias
  1043. attribute class { "wxRibbonPanel" | "panel" } &
  1044. stdObjectNodeAttributes &
  1045. stdWindowProperties &
  1046. [xrc:p="o"] element label {_, t_text }* &
  1047. [xrc:p="o"] element icon {_, t_bitmap }* &
  1048. (sizerNode | wxRibbon_anyControl | objectRef)*
  1049. }
  1050. wxRibbon_anyControl = wxRibbonBar | wxRibbonButtonBar | wxRibbonControl |
  1051. wxRibbonGallery | wxRibbonPanel
  1052. wxRichTextCtrl =
  1053. element object {
  1054. attribute class { "wxRichTextCtrl" } &
  1055. stdObjectNodeAttributes &
  1056. stdWindowProperties &
  1057. [xrc:p="o"] element value {_, t_text }* &
  1058. [xrc:p="o"] element maxlength {_, t_integer }*
  1059. }
  1060. wxScrollBar =
  1061. element object {
  1062. attribute class { "wxScrollBar" } &
  1063. stdObjectNodeAttributes &
  1064. stdWindowProperties &
  1065. [xrc:p="o"] element value {_, t_integer }* &
  1066. [xrc:p="o"] element range {_, t_integer }* &
  1067. [xrc:p="o"] element thumbsize {_, t_integer }* &
  1068. [xrc:p="o"] element pagesize {_, t_integer }*
  1069. }
  1070. wxScrolledWindow =
  1071. element object {
  1072. attribute class { "wxScrolledWindow" } &
  1073. stdObjectNodeAttributes &
  1074. stdWindowProperties &
  1075. [xrc:p="o"] element scrollrate {_, t_size }* &
  1076. (sizerNode | windowNode* )?
  1077. }
  1078. wxSimpleHtmlListBox =
  1079. element object {
  1080. attribute class { "wxSimpleHtmlListBox" } &
  1081. stdObjectNodeAttributes &
  1082. stdWindowProperties &
  1083. [xrc:p="o"] element selection {_, t_integer }* &
  1084. element content {
  1085. platform,
  1086. element item {_, t_text }*
  1087. }?
  1088. }
  1089. wxSimplebook =
  1090. element object {
  1091. attribute class { "wxSimplebook" } &
  1092. stdObjectNodeAttributes &
  1093. stdWindowProperties &
  1094. (wxSimplebook_simplebookpage | objectRef)*
  1095. }
  1096. wxSimplebook_simplebookpage =
  1097. element object {
  1098. attribute class { "simplebookpage" } &
  1099. platform &
  1100. element label {_, t_text }* &
  1101. [xrc:p="o"] element selected {_, t_bool }* &
  1102. windowNode
  1103. }
  1104. wxSlider =
  1105. element object {
  1106. attribute class { "wxSlider" } &
  1107. stdObjectNodeAttributes &
  1108. stdWindowProperties &
  1109. [xrc:p="o"] element value {_, t_integer }* &
  1110. [xrc:p="o"] element min {_, t_integer }* &
  1111. [xrc:p="o"] element max {_, t_integer }* &
  1112. [xrc:p="o"] element pagesize {_, t_integer }* &
  1113. [xrc:p="o"] element linesize {_, t_integer }* &
  1114. [xrc:p="o"] element tickfreq {_, t_integer }* &
  1115. [xrc:p="o"] element tick {_, t_integer }* &
  1116. [xrc:p="o"] element thumb {_, t_integer }* &
  1117. [xrc:p="o"] element selmin {_, t_integer }* &
  1118. [xrc:p="o"] element selmax {_, t_integer }*
  1119. }
  1120. wxSpinButton =
  1121. element object {
  1122. attribute class { "wxSpinButton" } &
  1123. stdObjectNodeAttributes &
  1124. stdWindowProperties &
  1125. [xrc:p="o"] element value {_, t_integer }* &
  1126. [xrc:p="o"] element min {_, t_integer }* &
  1127. [xrc:p="o"] element max {_, t_integer }*
  1128. }
  1129. wxSpinCtrl =
  1130. element object {
  1131. attribute class { "wxSpinCtrl" } &
  1132. stdObjectNodeAttributes &
  1133. stdWindowProperties &
  1134. [xrc:p="o"] element value {_, t_integer }* &
  1135. [xrc:p="o"] element min {_, t_integer }* &
  1136. [xrc:p="o"] element max {_, t_integer }* &
  1137. [xrc:p="o"] element base {_, ("10" | "16") }*
  1138. }
  1139. wxSplitterWindow =
  1140. element object {
  1141. attribute class { "wxSplitterWindow" } &
  1142. stdObjectNodeAttributes &
  1143. stdWindowProperties &
  1144. [xrc:p="o"] element orientation {_, ("vertical" | "horizontal") }* &
  1145. [xrc:p="o"] element sashpos {_, t_dimension }* &
  1146. [xrc:p="o"] element minsize {_, t_dimension }* &
  1147. [xrc:p="o"] element gravity {_, t_float }* &
  1148. (windowNode, windowNode?) # 1 or 2 child windows
  1149. }
  1150. wxSearchCtrl =
  1151. element object {
  1152. attribute class { "wxSearchCtrl" } &
  1153. stdObjectNodeAttributes &
  1154. stdWindowProperties &
  1155. [xrc:p="o"] element value {_, t_text }*
  1156. }
  1157. wxStatusBar =
  1158. element object {
  1159. attribute class { "wxStatusBar" } &
  1160. stdObjectNodeAttributes &
  1161. stdWindowProperties &
  1162. [xrc:p="o"] element fields {_, t_integer }* &
  1163. [xrc:p="o"] element widths {_, t_list_of_numbers }* &
  1164. [xrc:p="o"] element styles {_, xsd:string { pattern = "wxSB_(NORMAL|FLAT|RAISED|SUNKEN)(,wxSB_(NORMAL|FLAT|RAISED|SUNKEN))*" } }*
  1165. }
  1166. wxStaticBitmap =
  1167. element object {
  1168. attribute class { "wxStaticBitmap" } &
  1169. stdObjectNodeAttributes &
  1170. stdWindowProperties &
  1171. element bitmap {_, t_bitmap }
  1172. }
  1173. wxStaticBox =
  1174. element object {
  1175. attribute class { "wxStaticBox" } &
  1176. stdObjectNodeAttributes &
  1177. stdWindowProperties &
  1178. [xrc:p="important"] element label {_, t_text }*
  1179. }
  1180. wxStaticLine =
  1181. element object {
  1182. attribute class { "wxStaticLine" } &
  1183. stdObjectNodeAttributes &
  1184. stdWindowProperties
  1185. }
  1186. wxStaticText =
  1187. element object {
  1188. attribute class { "wxStaticText" } &
  1189. stdObjectNodeAttributes &
  1190. stdWindowProperties &
  1191. [xrc:p="important"] element label {_, t_text }* &
  1192. [xrc:p="o"] element wrap {_, t_dimension }*
  1193. }
  1194. wxTextCtrl =
  1195. element object {
  1196. attribute class { "wxTextCtrl" } &
  1197. stdObjectNodeAttributes &
  1198. stdWindowProperties &
  1199. [xrc:p="o"] element value {_, t_text }* &
  1200. [xrc:p="o"] element maxlength {_, t_integer }* &
  1201. [xrc:p="o"] element hint {_, t_text }*
  1202. }
  1203. wxTimePickerCtrl =
  1204. element object {
  1205. attribute class { "wxTimePickerCtrl" } &
  1206. stdObjectNodeAttributes &
  1207. stdWindowProperties
  1208. }
  1209. wxToggleButton =
  1210. element object {
  1211. attribute class { "wxToggleButton" } &
  1212. stdObjectNodeAttributes &
  1213. stdWindowProperties &
  1214. [xrc:p="important"] element label {_, t_text }* &
  1215. [xrc:p="o"] element checked {_, t_bool }*
  1216. }
  1217. wxToolBar =
  1218. element object {
  1219. attribute class { "wxToolBar" } &
  1220. stdObjectNodeAttributes &
  1221. stdWindowProperties &
  1222. [xrc:p="o"] element bitmapsize {_, t_size }* &
  1223. [xrc:p="o"] element margins {_, t_size }* &
  1224. [xrc:p="o"] element packing {_, t_integer }* &
  1225. [xrc:p="o"] element separation {_, t_integer }* &
  1226. [xrc:p="o"] element dontattachtoframe {_, t_bool }* &
  1227. (
  1228. windowNode |
  1229. wxToolBar_tool |
  1230. element object { attribute class { "separator" }, platform } |
  1231. element object { attribute class { "space" }, platform }
  1232. )*
  1233. }
  1234. wxToolBar_tool =
  1235. element object {
  1236. attribute class { "tool" } &
  1237. stdObjectNodeAttributes &
  1238. [xrc:p="important"] element bitmap {_, t_bitmap }* &
  1239. [xrc:p="o"] element bitmap2 {_, t_bitmap }* &
  1240. [xrc:p="o"] element label {_, t_text }* &
  1241. [xrc:p="o"] element tooltip {_, t_text }* &
  1242. [xrc:p="o"] element longhelp {_, t_text }* &
  1243. [xrc:p="o"] element disabled {_, t_bool }* &
  1244. [xrc:p="o"] element checked {_, t_bool }* &
  1245. [xrc:p="o"](
  1246. element radio {_, t_bool } |
  1247. element toggle {_, t_bool } |
  1248. element dropdown {_, wxMenu? }
  1249. )*
  1250. }
  1251. wxToolbook =
  1252. element object {
  1253. attribute class { "wxToolbook" } &
  1254. stdObjectNodeAttributes &
  1255. stdWindowProperties &
  1256. [xrc:p="o"] element imagelist {_, t_imagelist }* &
  1257. (wxToolbook_toolbookpage | objectRef)*
  1258. }
  1259. wxToolbook_toolbookpage =
  1260. element object {
  1261. attribute class { "toolbookpage" } &
  1262. platform &
  1263. [xrc:p="important"] element label {_, t_text }* &
  1264. [xrc:p="o"](
  1265. element bitmap {_, t_bitmap } |
  1266. element image {_, t_integer }
  1267. )* &
  1268. [xrc:p="o"] element selected {_, t_bool }* &
  1269. windowNode
  1270. }
  1271. wxTreeCtrl =
  1272. element object {
  1273. attribute class { "wxTreeCtrl" } &
  1274. stdObjectNodeAttributes &
  1275. stdWindowProperties &
  1276. [xrc:p="o"] element imagelist {_, t_imagelist }*
  1277. }
  1278. wxTreebook =
  1279. element object {
  1280. attribute class { "wxTreebook" } &
  1281. stdObjectNodeAttributes &
  1282. stdWindowProperties &
  1283. [xrc:p="o"] element imagelist {_, t_imagelist }* &
  1284. (wxTreebook_treebookpage | objectRef)*
  1285. }
  1286. wxTreebook_treebookpage =
  1287. element object {
  1288. attribute class { "treebookpage" } &
  1289. platform &
  1290. [xrc:p="important"] element depth {_, t_integer }* &
  1291. [xrc:p="important"] element label {_, t_text }* &
  1292. [xrc:p="o"](
  1293. element bitmap {_, t_bitmap } |
  1294. element image {_, t_integer }
  1295. )* &
  1296. [xrc:p="o"] element selected {_, t_bool }* &
  1297. [xrc:p="o"] element expanded {_, t_bool }* &
  1298. windowNode
  1299. }
  1300. wxWizard =
  1301. element object {
  1302. attribute class { "wxWizard" } &
  1303. stdObjectNodeAttributes &
  1304. stdWindowProperties &
  1305. [xrc:p="o"] element title {_, t_text }* &
  1306. [xrc:p="o"] element bitmap {_, t_bitmap }* &
  1307. (wxWizardPage_any | objectRef)*
  1308. }
  1309. wxWizardPage_any =
  1310. element object {
  1311. attribute class { "wxWizardPage" | "wxWizardPageSimple" } &
  1312. stdObjectNodeAttributes &
  1313. stdWindowProperties &
  1314. [xrc:p="o"] element bitmap {_, t_bitmap }* &
  1315. (sizerNode | windowNode* )?
  1316. }
  1317. wxSizer_item =
  1318. element object {
  1319. (
  1320. (
  1321. attribute class { "spacer" } &
  1322. [xrc:p="o"] element size {_, t_size }*
  1323. )
  1324. |
  1325. (
  1326. attribute class { "sizeritem" } &
  1327. (windowNode | sizerNode)
  1328. )
  1329. ) &
  1330. stdObjectNodeAttributes &
  1331. [xrc:p="o"] element option {_, t_integer }* &
  1332. [xrc:p="o"] element border {_, t_dimension }* &
  1333. [xrc:p="o"] element minsize {_, t_size }* &
  1334. [xrc:p="o"] element ratio {_, t_size }* &
  1335. # TODO: cell{pos,span} are wxGridBagSizer-only and required in it, this is too lax
  1336. [xrc:p="o"] element cellpos {_, t_position }* &
  1337. [xrc:p="o"] element cellspan {_, t_size }* &
  1338. [xrc:p="o"] element flag {_,
  1339. xsd:string {
  1340. 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))*"
  1341. }
  1342. }*
  1343. }
  1344. wxBoxSizer =
  1345. element object {
  1346. attribute class { "wxBoxSizer" } &
  1347. stdObjectNodeAttributes &
  1348. [xrc:p="o"] element minsize {_, t_size }* &
  1349. [xrc:p="o"] element orient {_, ("wxHORIZONTAL" | "wxVERTICAL") }* &
  1350. (wxSizer_item | objectRef)*
  1351. }
  1352. wxStaticBoxSizer =
  1353. element object {
  1354. attribute class { "wxStaticBoxSizer" } &
  1355. stdObjectNodeAttributes &
  1356. [xrc:p="o"] element minsize {_, t_size }* &
  1357. [xrc:p="important"] element label {_, t_text }* &
  1358. [xrc:p="o"] element orient {_, ("wxHORIZONTAL" | "wxVERTICAL") }* &
  1359. (wxSizer_item | objectRef)*
  1360. }
  1361. wxGridSizer =
  1362. element object {
  1363. attribute class { "wxGridSizer" } &
  1364. stdObjectNodeAttributes &
  1365. [xrc:p="o"] element minsize {_, t_size }* &
  1366. [xrc:p="o"] element rows {_, t_unsigned }* &
  1367. [xrc:p="o"] element cols {_, t_unsigned }* &
  1368. [xrc:p="o"] element vgap {_, t_dimension }* &
  1369. [xrc:p="o"] element hgap {_, t_dimension }* &
  1370. (wxSizer_item | objectRef)*
  1371. }
  1372. wxFlexGridSizer =
  1373. element object {
  1374. attribute class { "wxFlexGridSizer" } &
  1375. stdObjectNodeAttributes &
  1376. [xrc:p="o"] element minsize {_, t_size }* &
  1377. [xrc:p="o"] element rows {_, t_unsigned }* &
  1378. [xrc:p="o"] element cols {_, t_unsigned }* &
  1379. [xrc:p="o"] element vgap {_, t_dimension }* &
  1380. [xrc:p="o"] element hgap {_, t_dimension }* &
  1381. [xrc:p="o"] element flexibledirection {_, ("wxVERTICAL" | "wxHORIZONTAL" | "wxBOTH") }* &
  1382. [xrc:p="o"] element nonflexiblegrowmode {_, ("wxFLEX_GROWMODE_NONE" |
  1383. "wxFLEX_GROWMODE_SPECIFIED" |
  1384. "wxFLEX_GROWMODE_ALL") }* &
  1385. [xrc:p="o"] element growablerows {_, t_list_of_numbers }* &
  1386. [xrc:p="o"] element growablecols {_, t_list_of_numbers }* &
  1387. (wxSizer_item | objectRef)*
  1388. }
  1389. wxGridBagSizer =
  1390. element object {
  1391. attribute class { "wxGridBagSizer" } &
  1392. stdObjectNodeAttributes &
  1393. [xrc:p="o"] element minsize {_, t_size }* &
  1394. [xrc:p="o"] element vgap {_, t_dimension }* &
  1395. [xrc:p="o"] element hgap {_, t_dimension }* &
  1396. [xrc:p="o"] element flexibledirection {_, ("wxVERTICAL" | "wxHORIZONTAL" | "wxBOTH") }* &
  1397. [xrc:p="o"] element nonflexiblegrowmode {_, ("wxFLEX_GROWMODE_NONE" |
  1398. "wxFLEX_GROWMODE_SPECIFIED" |
  1399. "wxFLEX_GROWMODE_ALL") }* &
  1400. [xrc:p="o"] element growablerows {_, t_list_of_numbers }* &
  1401. [xrc:p="o"] element growablecols {_, t_list_of_numbers }* &
  1402. (wxSizer_item | objectRef)*
  1403. }
  1404. wxWrapSizer =
  1405. element object {
  1406. attribute class { "wxWrapSizer" } &
  1407. stdObjectNodeAttributes &
  1408. [xrc:p="o"] element minsize {_, t_size }* &
  1409. [xrc:p="important"] element orient {_, ("wxHORIZONTAL" | "wxVERTICAL") }* &
  1410. [xrc:p="o"] element flag {_, t_style }* &
  1411. (wxSizer_item | objectRef)*
  1412. }
  1413. wxStdDialogButtonSizer =
  1414. element object {
  1415. attribute class { "wxStdDialogButtonSizer" } &
  1416. stdObjectNodeAttributes &
  1417. element object {
  1418. attribute class { "button" },
  1419. platform,
  1420. (wxButton | customClasses | objectRef)
  1421. }+
  1422. }