abstract-controls.xml 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!-- Abstract Control Definitions for UI Layout Definition Format -->
  3. <!-- Version: 1.0 -->
  4. <patterns xmlns="ui-layout-patterns">
  5. <!-- Base Abstract Control -->
  6. <control name="CommonControl" type="base" category="abstract">
  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>depends-on-implementation</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. <control name="Separator" type="visual" category="basic" inherits="CommonControl">
  67. <description>Visual separator control for dividing interface sections</description>
  68. <constraints>
  69. <allowed-parents>Panel,SplitPanel,StatusBar,ToolBar,Menu</allowed-parents>
  70. <allowed-children>none</allowed-children>
  71. <container>false</container>
  72. </constraints>
  73. <attributes>
  74. <attribute name="orientation" type="enum" values="horizontal,vertical" default="horizontal" />
  75. <attribute name="line-style" type="enum" values="solid,dashed,dotted,double,groove,ridge,inset,outset" default="solid" />
  76. <attribute name="line-width" type="int" min="1" max="10" default="1" />
  77. <attribute name="line-color" type="string" default="gray" />
  78. <attribute name="auto-size" type="bool" default="true" />
  79. <attribute name="margin-start" type="int" min="0" max="50" default="0" />
  80. <attribute name="margin-end" type="int" min="0" max="50" default="0" />
  81. </attributes>
  82. <behavior>
  83. <event name="paint" />
  84. </behavior>
  85. </control>
  86. <control name="Image" type="display" category="basic" inherits="CommonControl">
  87. <description>Image display control for showing pictures and graphics</description>
  88. <constraints>
  89. <allowed-parents>Panel,SplitPanel,StatusBar,ToolBar,FormField,Button</allowed-parents>
  90. <allowed-children>none</allowed-children>
  91. <container>false</container>
  92. </constraints>
  93. <attributes>
  94. <attribute name="source" type="string" required="true" />
  95. <attribute name="source-type" type="enum" values="file,url,resource,base64,stream" default="file" />
  96. <attribute name="size-mode" type="enum" values="normal,stretch-image,auto-size,center-image,zoom" default="normal" />
  97. <attribute name="aspect-ratio" type="enum" values="ignore,keep,keep-by-expanding" default="keep" />
  98. <attribute name="interpolation-mode" type="enum" values="default,low,high,bilinear,bicubic,nearest-neighbor" default="default" />
  99. <attribute name="error-image" type="string" default="" />
  100. <attribute name="loading-image" type="string" default="" />
  101. <attribute name="border-style" type="enum" values="none,single,raised,sunken" default="none" />
  102. <attribute name="cursor-hand" type="bool" default="false" />
  103. <attribute name="allow-drop" type="bool" default="false" />
  104. <attribute name="cache-image" type="bool" default="true" />
  105. <attribute name="async-load" type="bool" default="false" />
  106. <attribute name="rotation" type="enum" values="none,rotate90,rotate180,rotate270" default="none" />
  107. <attribute name="flip" type="enum" values="none,horizontal,vertical,both" default="none" />
  108. <attribute name="opacity" type="double" min="0.0" max="1.0" default="1.0" />
  109. <attribute name="grayscale" type="bool" default="false" />
  110. <attribute name="alt-text" type="string" default="" />
  111. </attributes>
  112. <behavior>
  113. <event name="image-loaded" />
  114. <event name="image-load-error" />
  115. <event name="image-load-progress" />
  116. <event name="size-changed" />
  117. </behavior>
  118. </control>
  119. <!-- INPUT CONTROLS -->
  120. <control name="TextBox" type="input" category="basic" inherits="CommonControl">
  121. <description>Single-line text input control for user text entry</description>
  122. <constraints>
  123. <allowed-parents>Panel,SplitPanel,StatusBar,ToolBar,FormField</allowed-parents>
  124. <allowed-children>none</allowed-children>
  125. <container>false</container>
  126. </constraints>
  127. <attributes>
  128. <attribute name="max-length" type="int" min="0" max="32767" default="32767" />
  129. <attribute name="read-only" type="bool" default="false" />
  130. <attribute name="multiline" type="bool" default="false" />
  131. <attribute name="password-char" type="string" default="" />
  132. <attribute name="placeholder-text" type="string" default="" />
  133. <attribute name="text-align" type="enum" values="left,center,right" default="left" />
  134. <attribute name="accepts-return" type="bool" default="false" />
  135. <attribute name="accepts-tab" type="bool" default="false" />
  136. <attribute name="word-wrap" type="bool" default="true" />
  137. <attribute name="scroll-bars" type="enum" values="none,horizontal,vertical,both" default="none" />
  138. <attribute name="auto-complete-mode" type="enum" values="none,suggest,append,suggest-append" default="none" />
  139. <attribute name="auto-complete-source" type="string" default="" />
  140. </attributes>
  141. <behavior>
  142. <event name="text-changed" />
  143. <event name="enter-pressed" />
  144. <event name="selection-changed" />
  145. <event name="validated" />
  146. <event name="validating" />
  147. </behavior>
  148. </control>
  149. <control name="ComboBox" type="input" category="basic" inherits="CommonControl">
  150. <description>Dropdown selection control with editable or read-only options</description>
  151. <constraints>
  152. <allowed-parents>Panel,SplitPanel,StatusBar,ToolBar,FormField</allowed-parents>
  153. <allowed-children>ListBoxItem</allowed-children>
  154. <container>true</container>
  155. <requires-structure>dropdown-items</requires-structure>
  156. </constraints>
  157. <attributes>
  158. <attribute name="dropdown-style" type="enum" values="dropdown,simple,dropdown-list" default="dropdown" />
  159. <attribute name="max-dropdown-items" type="int" min="1" max="30" default="8" />
  160. <attribute name="selected-index" type="int" default="-1" />
  161. <attribute name="selected-value" type="string" default="" />
  162. <attribute name="auto-complete-mode" type="enum" values="none,suggest,append,suggest-append" default="none" />
  163. <attribute name="auto-complete-source" type="string" default="" />
  164. <attribute name="sorted" type="bool" default="false" />
  165. </attributes>
  166. <behavior>
  167. <event name="selection-changed" />
  168. <event name="dropdown-opened" />
  169. <event name="dropdown-closed" />
  170. <event name="text-changed" />
  171. </behavior>
  172. <structure>
  173. <dropdown-items max-count="unbounded" />
  174. </structure>
  175. </control>
  176. <!-- ACTION CONTROLS -->
  177. <control name="Button" type="action" category="basic" inherits="CommonControl">
  178. <description>Clickable button control for user actions</description>
  179. <constraints>
  180. <allowed-parents>Panel,SplitPanel,StatusBar,ToolBar,FormField,ButtonBar</allowed-parents>
  181. <allowed-children>none</allowed-children>
  182. <container>false</container>
  183. </constraints>
  184. <attributes>
  185. <attribute name="type" type="enum" values="text,image,text-image" default="text" />
  186. <attribute name="image" type="string" default="" />
  187. <attribute name="image-position" type="enum" values="left,right,top,bottom" default="left" />
  188. <attribute name="style" type="enum" values="normal,primary,secondary,danger,success,warning,info" default="normal" />
  189. <attribute name="size" type="enum" values="small,medium,large" default="medium" />
  190. <attribute name="auto-size" type="bool" default="false" />
  191. <attribute name="is-default" type="bool" default="false" />
  192. <attribute name="is-cancel" type="bool" default="false" />
  193. <attribute name="flat-style" type="bool" default="false" />
  194. </attributes>
  195. <behavior>
  196. <event name="click" required="true" />
  197. <event name="mouse-down" />
  198. <event name="mouse-up" />
  199. </behavior>
  200. </control>
  201. <!-- CONTAINER CONTROLS -->
  202. <control name="Panel" type="container" category="basic" inherits="CommonControl">
  203. <description>Generic container control for grouping other controls</description>
  204. <constraints>
  205. <allowed-parents>window,Panel,SplitPanel,PopupPanel,TabPage</allowed-parents>
  206. <allowed-children>any-control</allowed-children>
  207. <container>true</container>
  208. </constraints>
  209. <attributes>
  210. <attribute name="border-style" type="enum" values="none,single,raised,sunken,double" default="none" />
  211. <attribute name="border-width" type="int" min="0" max="10" default="0" />
  212. <attribute name="border-color" type="string" default="black" />
  213. <attribute name="auto-scroll" type="bool" default="false" />
  214. <attribute name="layout-type" type="enum" values="absolute,flow,stack,grid" default="absolute" />
  215. <attribute name="flow-direction" type="enum" values="left-to-right,right-to-left,top-to-bottom,bottom-to-top" default="left-to-right" />
  216. </attributes>
  217. <behavior>
  218. <event name="paint" />
  219. <event name="resize" />
  220. <event name="scroll" />
  221. </behavior>
  222. </control>
  223. <control name="PopupPanel" type="container" category="basic" inherits="Panel">
  224. <description>Popup container that displays above other controls</description>
  225. <constraints>
  226. <allowed-parents>window,Panel</allowed-parents>
  227. <allowed-children>any-control</allowed-children>
  228. <container>true</container>
  229. </constraints>
  230. <attributes>
  231. <attribute name="popup-mode" type="enum" values="modal,modeless,tooltip" default="modeless" />
  232. <attribute name="auto-close" type="bool" default="true" />
  233. <attribute name="close-on-escape" type="bool" default="true" />
  234. <attribute name="close-on-click-outside" type="bool" default="true" />
  235. <attribute name="show-close-button" type="bool" default="false" />
  236. <attribute name="resizable" type="bool" default="false" />
  237. <attribute name="movable" type="bool" default="false" />
  238. <attribute name="fade-in" type="bool" default="false" />
  239. <attribute name="fade-out" type="bool" default="false" />
  240. <attribute name="animation-duration" type="int" min="0" max="2000" default="200" />
  241. </attributes>
  242. <behavior>
  243. <event name="popup-opened" />
  244. <event name="popup-closed" />
  245. <event name="popup-opening" />
  246. <event name="popup-closing" />
  247. </behavior>
  248. </control>
  249. <!-- NAVIGATION CONTROLS -->
  250. <control name="Menu" type="navigation" category="basic" inherits="CommonControl">
  251. <description>Menu control for application navigation and commands</description>
  252. <constraints>
  253. <allowed-parents>window,Panel,ToolBar</allowed-parents>
  254. <allowed-children>MenuItem</allowed-children>
  255. <container>true</container>
  256. <requires-structure>menu-items</requires-structure>
  257. </constraints>
  258. <attributes>
  259. <attribute name="orientation" type="enum" values="horizontal,vertical" default="horizontal" />
  260. <attribute name="show-check-margin" type="bool" default="true" />
  261. <attribute name="show-image-margin" type="bool" default="true" />
  262. <attribute name="right-to-left" type="bool" default="false" />
  263. </attributes>
  264. <behavior>
  265. <event name="menu-activate" />
  266. <event name="menu-deactivate" />
  267. <event name="menu-collapse" />
  268. </behavior>
  269. <structure>
  270. <menu-items max-count="unbounded" />
  271. </structure>
  272. </control>
  273. <!-- LIST CONTROLS -->
  274. <control name="ListView" type="list" category="basic" inherits="CommonControl">
  275. <description>List view control for displaying data in various view modes</description>
  276. <constraints>
  277. <allowed-parents>Panel,SplitPanel,PopupPanel,TabPage</allowed-parents>
  278. <allowed-children>ListViewItem,ColumnItem</allowed-children>
  279. <container>true</container>
  280. <requires-structure>list-items,columns</requires-structure>
  281. </constraints>
  282. <attributes>
  283. <attribute name="view-mode" type="enum" values="details,list,large-icons,small-icons,tiles" default="details" />
  284. <attribute name="multi-select" type="bool" default="false" />
  285. <attribute name="full-row-select" type="bool" default="false" />
  286. <attribute name="grid-lines" type="bool" default="false" />
  287. <attribute name="header-style" type="enum" values="none,clickable,non-clickable" default="clickable" />
  288. <attribute name="sorting" type="enum" values="none,ascending,descending" default="none" />
  289. <attribute name="allow-column-reorder" type="bool" default="false" />
  290. <attribute name="hover-selection" type="bool" default="false" />
  291. <attribute name="hot-tracking" type="bool" default="false" />
  292. <attribute name="virtual-mode" type="bool" default="false" />
  293. <attribute name="virtual-list-size" type="int" min="0" default="0" />
  294. </attributes>
  295. <behavior>
  296. <event name="selected-index-changed" />
  297. <event name="item-activate" />
  298. <event name="column-click" />
  299. <event name="before-label-edit" />
  300. <event name="after-label-edit" />
  301. <event name="item-check" />
  302. <event name="virtual-items-selection-range-changed" />
  303. </behavior>
  304. <structure>
  305. <list-items max-count="unbounded" />
  306. <columns max-count="50" />
  307. </structure>
  308. </control>
  309. <control name="TreeView" type="list" category="basic" inherits="CommonControl">
  310. <description>Hierarchical tree view control for displaying nested data</description>
  311. <constraints>
  312. <allowed-parents>Panel,SplitPanel,PopupPanel,TabPage</allowed-parents>
  313. <allowed-children>TreeNode</allowed-children>
  314. <container>true</container>
  315. <requires-structure>tree-nodes</requires-structure>
  316. </constraints>
  317. <attributes>
  318. <attribute name="show-lines" type="bool" default="true" />
  319. <attribute name="show-plus-minus" type="bool" default="true" />
  320. <attribute name="show-root-lines" type="bool" default="true" />
  321. <attribute name="has-check-boxes" type="bool" default="false" />
  322. <attribute name="full-row-select" type="bool" default="false" />
  323. <attribute name="hot-tracking" type="bool" default="false" />
  324. <attribute name="hide-selection" type="bool" default="true" />
  325. <attribute name="label-edit" type="bool" default="false" />
  326. <attribute name="scrollable" type="bool" default="true" />
  327. <attribute name="sorted" type="bool" default="false" />
  328. <attribute name="path-separator" type="string" default="\" />
  329. <attribute name="indent" type="int" min="10" max="50" default="19" />
  330. <attribute name="item-height" type="int" min="10" max="50" default="16" />
  331. </attributes>
  332. <behavior>
  333. <event name="after-check" />
  334. <event name="after-collapse" />
  335. <event name="after-expand" />
  336. <event name="after-label-edit" />
  337. <event name="after-select" />
  338. <event name="before-check" />
  339. <event name="before-collapse" />
  340. <event name="before-expand" />
  341. <event name="before-label-edit" />
  342. <event name="before-select" />
  343. <event name="node-mouse-click" />
  344. <event name="node-mouse-double-click" />
  345. </behavior>
  346. <structure>
  347. <tree-nodes max-count="unbounded" />
  348. </structure>
  349. </control>
  350. <!-- STRUCTURAL DEFINITIONS -->
  351. <structure name="ListBoxItem" type="data-item" category="basic">
  352. <description>Individual item within list-based controls</description>
  353. <attributes>
  354. <attribute name="value" type="string" required="true" />
  355. <attribute name="text" type="string" required="true" />
  356. <attribute name="selected" type="bool" default="false" />
  357. <attribute name="enabled" type="bool" default="true" />
  358. <attribute name="image" type="string" default="" />
  359. <attribute name="tooltip" type="string" default="" />
  360. <attribute name="tag" type="object" default="null" />
  361. </attributes>
  362. </structure>
  363. <structure name="ListViewItem" type="data-item" category="basic">
  364. <description>Individual item within ListView control</description>
  365. <attributes>
  366. <attribute name="text" type="string" required="true" />
  367. <attribute name="value" type="string" default="" />
  368. <attribute name="selected" type="bool" default="false" />
  369. <attribute name="checked" type="bool" default="false" />
  370. <attribute name="focused" type="bool" default="false" />
  371. <attribute name="image-index" type="int" default="-1" />
  372. <attribute name="image-key" type="string" default="" />
  373. <attribute name="state-image-index" type="int" default="-1" />
  374. <attribute name="group" type="string" default="" />
  375. <attribute name="use-item-style-for-sub-items" type="bool" default="true" />
  376. <attribute name="tag" type="object" default="null" />
  377. </attributes>
  378. <structure>
  379. <sub-items max-count="unbounded" />
  380. </structure>
  381. </structure>
  382. <structure name="ColumnItem" type="data-item" category="basic">
  383. <description>Column definition for ListView control</description>
  384. <attributes>
  385. <attribute name="name" type="string" required="true" />
  386. <attribute name="text" type="string" required="true" />
  387. <attribute name="width" type="int" default="100" min="20" max="500" />
  388. <attribute name="sortable" type="bool" default="true" />
  389. <attribute name="visible" type="bool" default="true" />
  390. <attribute name="alignment" type="enum" values="left,center,right" default="left" />
  391. <attribute name="data-type" type="enum" values="text,number,date,boolean,image" default="text" />
  392. <attribute name="format-string" type="string" default="" />
  393. <attribute name="image-index" type="int" default="-1" />
  394. <attribute name="tag" type="object" default="null" />
  395. </attributes>
  396. </structure>
  397. <structure name="TreeNode" type="data-item" category="basic">
  398. <description>Individual node within TreeView control</description>
  399. <attributes>
  400. <attribute name="text" type="string" required="true" />
  401. <attribute name="value" type="string" default="" />
  402. <attribute name="expanded" type="bool" default="false" />
  403. <attribute name="selected" type="bool" default="false" />
  404. <attribute name="checked" type="bool" default="false" />
  405. <attribute name="image-index" type="int" default="-1" />
  406. <attribute name="image-key" type="string" default="" />
  407. <attribute name="selected-image-index" type="int" default="-1" />
  408. <attribute name="selected-image-key" type="string" default="" />
  409. <attribute name="state-image-index" type="int" default="-1" />
  410. <attribute name="state-image-key" type="string" default="" />
  411. <attribute name="tool-tip-text" type="string" default="" />
  412. <attribute name="context-menu" type="string" default="" />
  413. <attribute name="tag" type="object" default="null" />
  414. </attributes>
  415. <structure>
  416. <child-nodes max-count="unbounded" />
  417. </structure>
  418. </structure>
  419. <structure name="MenuItem" type="data-item" category="basic">
  420. <description>Individual menu item within Menu control</description>
  421. <attributes>
  422. <attribute name="text" type="string" required="true" />
  423. <attribute name="value" type="string" default="" />
  424. <attribute name="enabled" type="bool" default="true" />
  425. <attribute name="visible" type="bool" default="true" />
  426. <attribute name="checked" type="bool" default="false" />
  427. <attribute name="checkable" type="bool" default="false" />
  428. <attribute name="radio-check" type="bool" default="false" />
  429. <attribute name="image" type="string" default="" />
  430. <attribute name="shortcut-keys" type="string" default="" />
  431. <attribute name="show-shortcut" type="bool" default="true" />
  432. <attribute name="merge-type" type="enum" values="add,merge-items,remove,replace" default="add" />
  433. <attribute name="merge-order" type="int" default="0" />
  434. <attribute name="separator" type="bool" default="false" />
  435. <attribute name="tag" type="object" default="null" />
  436. </attributes>
  437. <structure>
  438. <sub-items max-count="unbounded" />
  439. </structure>
  440. </structure>
  441. </patterns>