abstract-controls.xml 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!-- Abstract Control Definitions for UI Layout Definition Format -->
  3. <!-- Version: 1.3 - Updated with Gallery Control -->
  4. <patterns xmlns="http://quadarax.com/ui-layout-patterns">
  5. <!-- Base Abstract Control -->
  6. <control name="CommonControl" type="composite" category="basic">
  7. <description>Base abstract control defining common attributes for all UI controls</description>
  8. <constraints>
  9. <allowed-parents>any</allowed-parents>
  10. <allowed-children>depends-on-implementation</allowed-children>
  11. <container>true</container>
  12. </constraints>
  13. <attributes>
  14. <attribute name="name" type="string" required="true" />
  15. <attribute name="enabled" type="bool" default="true" />
  16. <attribute name="text" type="string" default="" />
  17. <attribute name="visible" type="bool" default="true" />
  18. <attribute name="data-source" type="string" default="" />
  19. <attribute name="dock" type="enum" values="none,left,right,top,bottom" default="none" />
  20. <attribute name="tooltip" type="string" default="" />
  21. <attribute name="width" type="int" min="0" max="2000" />
  22. <attribute name="height" type="int" min="0" max="2000" />
  23. <attribute name="x" type="int" />
  24. <attribute name="y" type="int" />
  25. <attribute name="anchor" type="enum" values="none,left,right,top,bottom,all" default="none" />
  26. <attribute name="margin" type="string" default="0,0,0,0" />
  27. <attribute name="padding" type="string" default="0,0,0,0" />
  28. <attribute name="background-color" type="string" default="transparent" />
  29. <attribute name="foreground-color" type="string" default="black" />
  30. <attribute name="font-family" type="string" default="system" />
  31. <attribute name="font-size" type="int" min="6" max="72" default="12" />
  32. <attribute name="font-style" type="enum" values="normal,italic,bold,bold-italic" default="normal" />
  33. <attribute name="tab-index" type="int" default="0" />
  34. <attribute name="access-key" type="string" default="" />
  35. </attributes>
  36. <behavior>
  37. <event name="click" />
  38. <event name="double-click" />
  39. <event name="mouse-enter" />
  40. <event name="mouse-leave" />
  41. <event name="key-press" />
  42. <event name="focus" />
  43. <event name="blur" />
  44. </behavior>
  45. </control>
  46. <!-- DISPLAY CONTROLS -->
  47. <control name="Label" type="display" category="basic" inherits="CommonControl">
  48. <description>Text display control for showing read-only text information</description>
  49. <constraints>
  50. <allowed-parents>Panel,SplitPanel,StatusBar,ToolBar,FormField</allowed-parents>
  51. <allowed-children>none</allowed-children>
  52. <container>false</container>
  53. </constraints>
  54. <attributes>
  55. <attribute name="auto-size" type="bool" default="true" />
  56. <attribute name="text-align" type="enum" values="left,center,right,justify" default="left" />
  57. <attribute name="vertical-align" type="enum" values="top,middle,bottom" default="middle" />
  58. <attribute name="word-wrap" type="bool" default="false" />
  59. <attribute name="use-mnemonic" type="bool" default="true" />
  60. <attribute name="associated-control" type="string" default="" />
  61. </attributes>
  62. <behavior>
  63. <event name="text-changed" />
  64. </behavior>
  65. </control>
  66. <!-- INPUT CONTROLS -->
  67. <control name="TextBox" type="input" category="basic" inherits="CommonControl">
  68. <description>Single-line text input control for user data entry</description>
  69. <constraints>
  70. <allowed-parents>Panel,SplitPanel,StatusBar,ToolBar,FormField</allowed-parents>
  71. <allowed-children>none</allowed-children>
  72. <container>false</container>
  73. </constraints>
  74. <attributes>
  75. <attribute name="max-length" type="int" min="0" max="32767" default="32767" />
  76. <attribute name="password-char" type="string" default="" />
  77. <attribute name="read-only" type="bool" default="false" />
  78. <attribute name="multiline" type="bool" default="false" />
  79. <attribute name="word-wrap" type="bool" default="true" />
  80. <attribute name="accept-returns" type="bool" default="false" />
  81. <attribute name="accept-tabs" type="bool" default="false" />
  82. <attribute name="auto-complete-mode" type="enum" values="none,suggest,append,suggest-append" default="none" />
  83. <attribute name="auto-complete-source" type="string" default="" />
  84. </attributes>
  85. <behavior>
  86. <event name="text-changed" />
  87. <event name="enter-pressed" />
  88. <event name="selection-changed" />
  89. <event name="validated" />
  90. <event name="validating" />
  91. </behavior>
  92. </control>
  93. <control name="ComboBox" type="input" category="basic" inherits="CommonControl">
  94. <description>Dropdown selection control with editable or read-only options</description>
  95. <constraints>
  96. <allowed-parents>Panel,SplitPanel,StatusBar,ToolBar,FormField</allowed-parents>
  97. <allowed-children>ListBoxItem</allowed-children>
  98. <container>true</container>
  99. <requires-structure>dropdown-items</requires-structure>
  100. </constraints>
  101. <attributes>
  102. <attribute name="dropdown-style" type="enum" values="dropdown,simple,dropdown-list" default="dropdown" />
  103. <attribute name="max-dropdown-items" type="int" min="1" max="30" default="8" />
  104. <attribute name="selected-index" type="int" default="-1" />
  105. <attribute name="selected-value" type="string" default="" />
  106. <attribute name="auto-complete-mode" type="enum" values="none,suggest,append,suggest-append" default="none" />
  107. <attribute name="auto-complete-source" type="string" default="" />
  108. <attribute name="sorted" type="bool" default="false" />
  109. </attributes>
  110. <behavior>
  111. <event name="selection-changed" />
  112. <event name="dropdown-opened" />
  113. <event name="dropdown-closed" />
  114. <event name="text-changed" />
  115. </behavior>
  116. <structure>
  117. <items max-count="unbounded" />
  118. </structure>
  119. </control>
  120. <!-- ACTION CONTROLS -->
  121. <control name="Button" type="button" category="basic" inherits="CommonControl">
  122. <description>Clickable button control for user actions</description>
  123. <constraints>
  124. <allowed-parents>Panel,SplitPanel,StatusBar,ToolBar,FormField,ButtonBar</allowed-parents>
  125. <allowed-children>none</allowed-children>
  126. <container>false</container>
  127. </constraints>
  128. <attributes>
  129. <attribute name="type" type="enum" values="text,image,text-image" default="text" />
  130. <attribute name="image" type="string" default="" />
  131. <attribute name="image-position" type="enum" values="left,right,top,bottom" default="left" />
  132. <attribute name="style" type="enum" values="normal,primary,secondary,danger,success,warning,info" default="normal" />
  133. <attribute name="size" type="enum" values="small,medium,large" default="medium" />
  134. <attribute name="auto-size" type="bool" default="false" />
  135. <attribute name="is-default" type="bool" default="false" />
  136. <attribute name="is-cancel" type="bool" default="false" />
  137. <attribute name="flat-style" type="bool" default="false" />
  138. </attributes>
  139. <behavior>
  140. <event name="click" />
  141. <event name="mouse-down" />
  142. <event name="mouse-up" />
  143. </behavior>
  144. </control>
  145. <!-- CONTAINER CONTROLS -->
  146. <control name="Panel" type="container" category="basic" inherits="CommonControl">
  147. <description>Generic container control for grouping other controls</description>
  148. <constraints>
  149. <allowed-parents>window,Panel,SplitPanel,PopupPanel,TabPage</allowed-parents>
  150. <allowed-children>any-control</allowed-children>
  151. <container>true</container>
  152. </constraints>
  153. <attributes>
  154. <attribute name="border-style" type="enum" values="none,single,raised,sunken,double" default="none" />
  155. <attribute name="border-width" type="int" min="0" max="10" default="0" />
  156. <attribute name="border-color" type="string" default="black" />
  157. <attribute name="auto-scroll" type="bool" default="false" />
  158. <attribute name="layout-type" type="enum" values="absolute,flow,stack,grid" default="absolute" />
  159. <attribute name="flow-direction" type="enum" values="left-to-right,right-to-left,top-to-bottom,bottom-to-top" default="left-to-right" />
  160. </attributes>
  161. <behavior>
  162. <event name="paint" />
  163. <event name="resize" />
  164. <event name="scroll" />
  165. </behavior>
  166. </control>
  167. <control name="PopupPanel" type="container" category="basic" inherits="Panel">
  168. <description>Popup container that displays above other controls</description>
  169. <constraints>
  170. <allowed-parents>window,Panel</allowed-parents>
  171. <allowed-children>any-control</allowed-children>
  172. <container>true</container>
  173. </constraints>
  174. <attributes>
  175. <attribute name="popup-mode" type="enum" values="modal,modeless,tooltip" default="modeless" />
  176. <attribute name="auto-close" type="bool" default="true" />
  177. <attribute name="close-on-escape" type="bool" default="true" />
  178. <attribute name="close-on-click-outside" type="bool" default="true" />
  179. <attribute name="show-close-button" type="bool" default="false" />
  180. <attribute name="resizable" type="bool" default="false" />
  181. <attribute name="movable" type="bool" default="false" />
  182. <attribute name="fade-in" type="bool" default="false" />
  183. <attribute name="fade-out" type="bool" default="false" />
  184. <attribute name="animation-duration" type="int" min="0" max="2000" default="200" />
  185. </attributes>
  186. <behavior>
  187. <event name="popup-opened" />
  188. <event name="popup-closed" />
  189. <event name="popup-opening" />
  190. <event name="popup-closing" />
  191. </behavior>
  192. </control>
  193. <!-- NAVIGATION CONTROLS -->
  194. <control name="Menu" type="navigation" category="basic" inherits="CommonControl">
  195. <description>Menu control for application navigation and commands</description>
  196. <constraints>
  197. <allowed-parents>window,Panel,ToolBar</allowed-parents>
  198. <allowed-children>MenuItem</allowed-children>
  199. <container>true</container>
  200. <requires-structure>menu-items</requires-structure>
  201. </constraints>
  202. <attributes>
  203. <attribute name="orientation" type="enum" values="horizontal,vertical" default="horizontal" />
  204. <attribute name="show-check-margin" type="bool" default="true" />
  205. <attribute name="show-image-margin" type="bool" default="true" />
  206. <attribute name="right-to-left" type="bool" default="false" />
  207. </attributes>
  208. <behavior>
  209. <event name="menu-activate" />
  210. <event name="menu-deactivate" />
  211. <event name="menu-collapse" />
  212. </behavior>
  213. <structure>
  214. <menu-items max-depth="5" />
  215. </structure>
  216. </control>
  217. <!-- LIST CONTROLS -->
  218. <control name="ListView" type="list" category="basic" inherits="CommonControl">
  219. <description>List view control for displaying data in various view modes</description>
  220. <constraints>
  221. <allowed-parents>Panel,SplitPanel,PopupPanel,TabPage</allowed-parents>
  222. <allowed-children>ListViewItem,ColumnItem</allowed-children>
  223. <container>true</container>
  224. <requires-structure>list-items,columns</requires-structure>
  225. </constraints>
  226. <attributes>
  227. <attribute name="view-mode" type="enum" values="details,list,large-icons,small-icons,tiles" default="details" />
  228. <attribute name="multi-select" type="bool" default="false" />
  229. <attribute name="full-row-select" type="bool" default="false" />
  230. <attribute name="grid-lines" type="bool" default="false" />
  231. <attribute name="header-style" type="enum" values="none,clickable,non-clickable" default="clickable" />
  232. <attribute name="sorting" type="enum" values="none,ascending,descending" default="none" />
  233. <attribute name="allow-column-reorder" type="bool" default="false" />
  234. <attribute name="scrollable" type="bool" default="true" />
  235. <attribute name="border-style" type="enum" values="none,single,raised,sunken,double" default="single" />
  236. <attribute name="auto-arrange" type="bool" default="true" />
  237. <attribute name="label-edit" type="bool" default="false" />
  238. <attribute name="label-wrap" type="bool" default="false" />
  239. <attribute name="hide-selection" type="bool" default="true" />
  240. <attribute name="hover-selection" type="bool" default="false" />
  241. <attribute name="hot-tracking" type="bool" default="false" />
  242. <attribute name="virtual-mode" type="bool" default="false" />
  243. <attribute name="virtual-list-size" type="int" min="0" default="0" />
  244. </attributes>
  245. <behavior>
  246. <event name="selected-index-changed" />
  247. <event name="item-activate" />
  248. <event name="column-click" />
  249. <event name="before-label-edit" />
  250. <event name="after-label-edit" />
  251. <event name="item-check" />
  252. <event name="virtual-items-selection-range-changed" />
  253. </behavior>
  254. <structure>
  255. <items max-count="unbounded" />
  256. <columns resizable="true" />
  257. </structure>
  258. </control>
  259. <!-- NEW: GALLERY CONTROL -->
  260. <control name="Gallery" type="list" category="basic" inherits="CommonControl">
  261. <description>Gallery control for displaying collection of items in customizable boxes with templates</description>
  262. <constraints>
  263. <allowed-parents>Panel,SplitPanel,PopupPanel,TabPage</allowed-parents>
  264. <allowed-children>GalleryItem</allowed-children>
  265. <container>true</container>
  266. <requires-structure>gallery-items,box-template</requires-structure>
  267. </constraints>
  268. <attributes>
  269. <!-- Inherited ListView attributes -->
  270. <attribute name="view-mode" type="enum" values="details,list,large-icons,small-icons,tiles,gallery" default="gallery" />
  271. <attribute name="multi-select" type="bool" default="false" />
  272. <attribute name="full-row-select" type="bool" default="false" />
  273. <attribute name="grid-lines" type="bool" default="false" />
  274. <attribute name="header-style" type="enum" values="none,clickable,non-clickable" default="none" />
  275. <attribute name="sorting" type="enum" values="none,ascending,descending" default="none" />
  276. <attribute name="allow-column-reorder" type="bool" default="false" />
  277. <attribute name="scrollable" type="bool" default="true" />
  278. <attribute name="border-style" type="enum" values="none,single,raised,sunken,double" default="single" />
  279. <attribute name="auto-arrange" type="bool" default="true" />
  280. <attribute name="label-edit" type="bool" default="false" />
  281. <attribute name="label-wrap" type="bool" default="false" />
  282. <attribute name="hide-selection" type="bool" default="true" />
  283. <attribute name="hover-selection" type="bool" default="false" />
  284. <attribute name="hot-tracking" type="bool" default="false" />
  285. <attribute name="virtual-mode" type="bool" default="false" />
  286. <attribute name="virtual-list-size" type="int" min="0" default="0" />
  287. <!-- Gallery-specific attributes -->
  288. <attribute name="image-width" type="int" min="16" max="512" default="64" />
  289. <attribute name="image-height" type="int" min="16" max="512" default="64" />
  290. <attribute name="box-width" type="int" min="32" max="1024" default="120" />
  291. <attribute name="box-height" type="int" min="32" max="1024" default="120" />
  292. <attribute name="paging-enabled" type="bool" default="false" />
  293. <attribute name="paging-page-size" type="int" min="1" max="1000" default="50" />
  294. </attributes>
  295. <behavior>
  296. <!-- Inherited ListView events -->
  297. <event name="selected-index-changed" />
  298. <event name="item-activate" />
  299. <event name="column-click" />
  300. <event name="before-label-edit" />
  301. <event name="after-label-edit" />
  302. <event name="item-check" />
  303. <event name="virtual-items-selection-range-changed" />
  304. <!-- Gallery-specific events -->
  305. <event name="box-click" />
  306. <event name="box-double-click" />
  307. <event name="box-hover" />
  308. <event name="page-changed" />
  309. <event name="template-applied" />
  310. </behavior>
  311. <structure>
  312. <items max-count="unbounded" />
  313. <templates>
  314. <template name="default" type="item" />
  315. </templates>
  316. </structure>
  317. </control>
  318. <control name="TreeView" type="list" category="basic" inherits="CommonControl">
  319. <description>Hierarchical tree view control for displaying nested data</description>
  320. <constraints>
  321. <allowed-parents>Panel,SplitPanel,PopupPanel,TabPage</allowed-parents>
  322. <allowed-children>TreeNode</allowed-children>
  323. <container>true</container>
  324. <requires-structure>tree-nodes</requires-structure>
  325. </constraints>
  326. <attributes>
  327. <attribute name="show-lines" type="bool" default="true" />
  328. <attribute name="show-plus-minus" type="bool" default="true" />
  329. <attribute name="show-root-lines" type="bool" default="true" />
  330. <attribute name="has-check-boxes" type="bool" default="false" />
  331. <attribute name="full-row-select" type="bool" default="false" />
  332. <attribute name="hot-tracking" type="bool" default="false" />
  333. <attribute name="hide-selection" type="bool" default="true" />
  334. <attribute name="label-edit" type="bool" default="false" />
  335. <attribute name="scrollable" type="bool" default="true" />
  336. <attribute name="sorted" type="bool" default="false" />
  337. <attribute name="path-separator" type="string" default="\" />
  338. <attribute name="indent" type="int" min="10" max="50" default="19" />
  339. <attribute name="item-height" type="int" min="10" max="50" default="16" />
  340. </attributes>
  341. <behavior>
  342. <event name="after-check" />
  343. <event name="after-collapse" />
  344. <event name="after-expand" />
  345. <event name="after-label-edit" />
  346. <event name="after-select" />
  347. <event name="before-check" />
  348. <event name="before-collapse" />
  349. <event name="before-expand" />
  350. <event name="before-label-edit" />
  351. <event name="before-select" />
  352. <event name="node-mouse-click" />
  353. <event name="node-mouse-double-click" />
  354. </behavior>
  355. <structure>
  356. <items max-count="unbounded" />
  357. </structure>
  358. </control>
  359. <!-- VISUAL CONTROLS -->
  360. <control name="Separator" type="display" category="basic" inherits="CommonControl">
  361. <description>Visual separator control for dividing interface sections</description>
  362. <constraints>
  363. <allowed-parents>Panel,SplitPanel,StatusBar,ToolBar,Menu</allowed-parents>
  364. <allowed-children>none</allowed-children>
  365. <container>false</container>
  366. </constraints>
  367. <attributes>
  368. <attribute name="orientation" type="enum" values="horizontal,vertical" default="horizontal" />
  369. <attribute name="line-style" type="enum" values="solid,dashed,dotted,double,groove,ridge,inset,outset" default="solid" />
  370. <attribute name="line-width" type="int" min="1" max="10" default="1" />
  371. <attribute name="line-color" type="string" default="gray" />
  372. <attribute name="auto-size" type="bool" default="true" />
  373. <attribute name="margin-start" type="int" min="0" max="50" default="0" />
  374. <attribute name="margin-end" type="int" min="0" max="50" default="0" />
  375. </attributes>
  376. <behavior>
  377. <event name="paint" />
  378. </behavior>
  379. </control>
  380. <control name="Image" type="display" category="basic" inherits="CommonControl">
  381. <description>Image display control for showing pictures and graphics</description>
  382. <constraints>
  383. <allowed-parents>Panel,SplitPanel,StatusBar,ToolBar,FormField,Button</allowed-parents>
  384. <allowed-children>none</allowed-children>
  385. <container>false</container>
  386. </constraints>
  387. <attributes>
  388. <attribute name="source" type="string" required="true" />
  389. <attribute name="source-type" type="enum" values="file,url,resource,base64,stream" default="file" />
  390. <attribute name="size-mode" type="enum" values="normal,stretch-image,auto-size,center-image,zoom" default="normal" />
  391. <attribute name="aspect-ratio" type="enum" values="keep,ignore,fit" default="keep" />
  392. <attribute name="interpolation-mode" type="enum" values="default,low,high,bilinear,bicubic,nearest-neighbor" default="default" />
  393. <attribute name="error-image" type="string" default="" />
  394. <attribute name="loading-image" type="string" default="" />
  395. </attributes>
  396. <behavior>
  397. <event name="load-completed" />
  398. <event name="load-progress" />
  399. <event name="load-failed" />
  400. </behavior>
  401. </control>
  402. <!-- STRUCTURAL DEFINITIONS -->
  403. <structure name="ListBoxItem" type="data-item" category="basic">
  404. <description>Individual item within list-based controls</description>
  405. <attributes>
  406. <attribute name="value" type="string" required="true" />
  407. <attribute name="text" type="string" required="true" />
  408. <attribute name="selected" type="bool" default="false" />
  409. <attribute name="enabled" type="bool" default="true" />
  410. <attribute name="image" type="string" default="" />
  411. <attribute name="tooltip" type="string" default="" />
  412. <attribute name="tag" type="object" default="null" />
  413. </attributes>
  414. <template />
  415. </structure>
  416. <structure name="ListViewItem" type="data-item" category="basic">
  417. <description>Individual item within ListView control</description>
  418. <attributes>
  419. <attribute name="text" type="string" required="true" />
  420. <attribute name="value" type="string" default="" />
  421. <attribute name="selected" type="bool" default="false" />
  422. <attribute name="checked" type="bool" default="false" />
  423. <attribute name="focused" type="bool" default="false" />
  424. <attribute name="image-index" type="int" default="-1" />
  425. <attribute name="image-key" type="string" default="" />
  426. <attribute name="state-image-index" type="int" default="-1" />
  427. <attribute name="group" type="string" default="" />
  428. <attribute name="use-item-style-for-sub-items" type="bool" default="true" />
  429. <attribute name="tag" type="object" default="null" />
  430. </attributes>
  431. <template />
  432. </structure>
  433. <!-- NEW: GALLERY STRUCTURES -->
  434. <structure name="GalleryItem" type="data-item" category="basic">
  435. <description>Individual item within Gallery control with custom box template support</description>
  436. <attributes>
  437. <attribute name="text" type="string" required="true" />
  438. <attribute name="value" type="string" default="" />
  439. <attribute name="selected" type="bool" default="false" />
  440. <attribute name="checked" type="bool" default="false" />
  441. <attribute name="focused" type="bool" default="false" />
  442. <attribute name="image" type="string" default="" />
  443. <attribute name="image-index" type="int" default="-1" />
  444. <attribute name="image-key" type="string" default="" />
  445. <attribute name="thumbnail" type="string" default="" />
  446. <attribute name="group" type="string" default="" />
  447. <attribute name="tooltip" type="string" default="" />
  448. <attribute name="tag" type="object" default="null" />
  449. <!-- Gallery-specific attributes -->
  450. <attribute name="box-data" type="object" default="null" />
  451. <attribute name="template-override" type="string" default="" />
  452. </attributes>
  453. <template />
  454. </structure>
  455. <structure name="BoxTemplate" type="template" category="basic">
  456. <description>Custom template definition for Gallery box rendering</description>
  457. <attributes>
  458. <attribute name="name" type="string" required="true" />
  459. <attribute name="width" type="int" min="32" max="1024" default="120" />
  460. <attribute name="height" type="int" min="32" max="1024" default="120" />
  461. <attribute name="background-color" type="string" default="transparent" />
  462. <attribute name="border-color" type="string" default="gray" />
  463. <attribute name="border-style" type="enum" values="none,solid,dashed,dotted" default="solid" />
  464. <attribute name="border-width" type="int" min="0" max="10" default="1" />
  465. <attribute name="padding" type="string" default="4,4,4,4" />
  466. <attribute name="margin" type="string" default="2,2,2,2" />
  467. </attributes>
  468. <template />
  469. </structure>
  470. <structure name="TemplateElement" type="template-item" category="basic">
  471. <description>Individual element within a box template (image, text, custom control)</description>
  472. <attributes>
  473. <attribute name="name" type="string" required="true" />
  474. <attribute name="type" type="enum" values="image,text,label,custom" required="true" />
  475. <attribute name="x" type="int" min="0" default="0" />
  476. <attribute name="y" type="int" min="0" default="0" />
  477. <attribute name="width" type="string" default="auto" />
  478. <attribute name="height" type="string" default="auto" />
  479. <attribute name="data-binding" type="string" default="" />
  480. <attribute name="format-string" type="string" default="" />
  481. <attribute name="font-family" type="string" default="system" />
  482. <attribute name="font-size" type="int" min="6" max="72" default="12" />
  483. <attribute name="font-style" type="enum" values="normal,italic,bold,bold-italic" default="normal" />
  484. <attribute name="foreground-color" type="string" default="black" />
  485. <attribute name="text-align" type="enum" values="left,center,right,justify" default="left" />
  486. <attribute name="vertical-align" type="enum" values="top,middle,bottom" default="top" />
  487. <attribute name="image-size-mode" type="enum" values="normal,stretch,auto-size,center,zoom" default="normal" />
  488. <attribute name="anchor" type="enum" values="none,left,right,top,bottom,all" default="none" />
  489. </attributes>
  490. <template />
  491. </structure>
  492. <structure name="CustomProperty" type="data-item" category="basic">
  493. <description>Custom property for gallery items to store additional data</description>
  494. <attributes>
  495. <attribute name="name" type="string" required="true" />
  496. <attribute name="value" type="string" required="true" />
  497. <attribute name="data-type" type="enum" values="text,number,date,boolean,image,object" default="text" />
  498. </attributes>
  499. <template />
  500. </structure>
  501. <structure name="DataField" type="data-item" category="basic">
  502. <description>Data field definition for binding template elements to data</description>
  503. <attributes>
  504. <attribute name="name" type="string" required="true" />
  505. <attribute name="value" type="string" required="true" />
  506. <attribute name="display-name" type="string" default="" />
  507. <attribute name="format" type="string" default="" />
  508. </attributes>
  509. <template />
  510. </structure>
  511. <!-- REMAINING EXISTING STRUCTURES -->
  512. <structure name="ColumnItem" type="data-item" category="basic">
  513. <description>Column definition for ListView control</description>
  514. <attributes>
  515. <attribute name="name" type="string" required="true" />
  516. <attribute name="text" type="string" required="true" />
  517. <attribute name="width" type="int" default="100" min="20" max="500" />
  518. <attribute name="sortable" type="bool" default="true" />
  519. <attribute name="visible" type="bool" default="true" />
  520. <attribute name="alignment" type="enum" values="left,center,right" default="left" />
  521. <attribute name="data-type" type="enum" values="text,number,date,boolean,image" default="text" />
  522. <attribute name="format-string" type="string" default="" />
  523. <attribute name="image-index" type="int" default="-1" />
  524. <attribute name="tag" type="object" default="null" />
  525. </attributes>
  526. <template />
  527. </structure>
  528. <structure name="TreeNode" type="data-item" category="basic">
  529. <description>Individual node within TreeView control</description>
  530. <attributes>
  531. <attribute name="text" type="string" required="true" />
  532. <attribute name="value" type="string" default="" />
  533. <attribute name="expanded" type="bool" default="false" />
  534. <attribute name="selected" type="bool" default="false" />
  535. <attribute name="checked" type="bool" default="false" />
  536. <attribute name="image-index" type="int" default="-1" />
  537. <attribute name="image-key" type="string" default="" />
  538. <attribute name="selected-image-index" type="int" default="-1" />
  539. <attribute name="selected-image-key" type="string" default="" />
  540. <attribute name="state-image-index" type="int" default="-1" />
  541. <attribute name="state-image-key" type="string" default="" />
  542. <attribute name="tool-tip-text" type="string" default="" />
  543. <attribute name="context-menu" type="string" default="" />
  544. <attribute name="tag" type="object" default="null" />
  545. </attributes>
  546. <template />
  547. </structure>
  548. <structure name="MenuItem" type="data-item" category="basic">
  549. <description>Individual menu item within Menu control</description>
  550. <attributes>
  551. <attribute name="text" type="string" required="true" />
  552. <attribute name="value" type="string" default="" />
  553. <attribute name="enabled" type="bool" default="true" />
  554. <attribute name="visible" type="bool" default="true" />
  555. <attribute name="checked" type="bool" default="false" />
  556. <attribute name="checkable" type="bool" default="false" />
  557. <attribute name="radio-check" type="bool" default="false" />
  558. <attribute name="image" type="string" default="" />
  559. <attribute name="shortcut-keys" type="string" default="" />
  560. <attribute name="show-shortcut" type="bool" default="true" />
  561. <attribute name="merge-type" type="enum" values="add,merge-items,remove,replace" default="add" />
  562. <attribute name="merge-order" type="int" default="0" />
  563. <attribute name="separator" type="bool" default="false" />
  564. <attribute name="tag" type="object" default="null" />
  565. </attributes>
  566. <template />
  567. </structure>
  568. </patterns>