| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!-- Abstract Control Definitions for UI Layout Definition Format -->
- <patterns xmlns="ui-layout-patterns">
-
- <!-- Base abstract control with common attributes -->
- <control name="CommonControl" type="base" category="abstract">
- <description>Base abstract control defining common attributes for all controls</description>
- <constraints>
- <allowed-parents>any</allowed-parents>
- <allowed-children>depends-on-implementation</allowed-children>
- <container>depends-on-implementation</container>
- </constraints>
- <attributes>
- <attribute name="name" type="string" required="true" />
- <attribute name="enabled" type="bool" default="true" />
- <attribute name="text" type="string" default="" />
- <attribute name="visible" type="bool" default="true" />
- <attribute name="data-source" type="string" default="" />
- <attribute name="dock" type="enum" values="none,left,right,top,bottom" default="none" />
- <attribute name="tooltip" type="string" default="" />
- </attributes>
- </control>
-
- <!-- Label Control -->
- <control name="Label" type="display" category="basic" inherits="CommonControl">
- <description>Display text label control</description>
- <constraints>
- <allowed-parents>Panel,SplitPanel,StatusBar,ToolBar,FormField</allowed-parents>
- <allowed-children>none</allowed-children>
- <container>false</container>
- </constraints>
- <attributes>
- <attribute name="font-size" type="int" default="12" min="8" max="72" />
- <attribute name="font-weight" type="enum" values="normal,bold" default="normal" />
- <attribute name="color" type="color" default="#000000" />
- <attribute name="alignment" type="enum" values="left,center,right" default="left" />
- </attributes>
- </control>
-
- <!-- TextBox Control -->
- <control name="TextBox" type="input" category="basic" inherits="CommonControl">
- <description>Text input control for single or multi-line text</description>
- <constraints>
- <allowed-parents>Panel,SplitPanel,FormField</allowed-parents>
- <allowed-children>none</allowed-children>
- <container>false</container>
- </constraints>
- <attributes>
- <attribute name="placeholder" type="string" default="" />
- <attribute name="max-length" type="int" default="255" min="1" max="10000" />
- <attribute name="readonly" type="bool" default="false" />
- <attribute name="multiline" type="bool" default="false" />
- <attribute name="password" type="bool" default="false" />
- </attributes>
- <behavior>
- <event name="text-changed" />
- <event name="focus" />
- <event name="blur" />
- <event name="enter-pressed" />
- </behavior>
- </control>
-
- <!-- ListBoxItem Structure -->
- <structure name="ListBoxItem" type="data-item" category="basic">
- <description>Individual item within list-based controls</description>
- <attributes>
- <attribute name="value" type="string" required="true" />
- <attribute name="text" type="string" required="true" />
- <attribute name="selected" type="bool" default="false" />
- <attribute name="enabled" type="bool" default="true" />
- <attribute name="image" type="string" default="" />
- </attributes>
- </structure>
-
- <!-- ComboBox Control -->
- <control name="ComboBox" type="input" category="basic" inherits="CommonControl">
- <description>Dropdown selection control with editable option</description>
- <constraints>
- <allowed-parents>Panel,SplitPanel,StatusBar,ToolBar,FormField</allowed-parents>
- <allowed-children>items</allowed-children>
- <container>false</container>
- <requires-structure>items</requires-structure>
- </constraints>
- <attributes>
- <attribute name="selected-value" type="string" default="" />
- <attribute name="editable" type="bool" default="false" />
- <attribute name="dropdown-height" type="int" default="200" min="100" max="500" />
- </attributes>
- <behavior>
- <event name="selection-changed" alias="on-select" />
- <event name="text-changed" />
- </behavior>
- <structure>
- <items min-count="0" max-count="unlimited">
- <listbox-item inherits="ListBoxItem" />
- </items>
- <selected-items max-count="1" />
- </structure>
- </control>
-
- <!-- ListBox Control -->
- <control name="ListBox" type="input" category="basic" inherits="CommonControl">
- <description>List selection control with single or multiple selection</description>
- <constraints>
- <allowed-parents>Panel,SplitPanel,FormField</allowed-parents>
- <allowed-children>items,context-menu</allowed-children>
- <container>false</container>
- <requires-structure>items</requires-structure>
- </constraints>
- <attributes>
- <attribute name="multi-select" type="bool" default="false" />
- <attribute name="selection-mode" type="enum" values="single,multiple,extended" default="single" />
- <attribute name="sorted" type="bool" default="false" />
- </attributes>
- <behavior>
- <event name="selection-changed" alias="on-select" />
- <event name="double-click" />
- </behavior>
- <structure>
- <items min-count="0" max-count="unlimited">
- <listbox-item inherits="ListBoxItem" />
- </items>
- <selected-items max-count="depends-on-multi-select" />
- <context-menu max-count="1" />
- </structure>
- </control>
-
- <!-- ColumnItem Structure -->
- <structure name="ColumnItem" type="data-item" category="basic">
- <description>Column definition for ListView control</description>
- <attributes>
- <attribute name="name" type="string" required="true" />
- <attribute name="text" type="string" required="true" />
- <attribute name="width" type="int" default="100" min="20" max="500" />
- <attribute name="sortable" type="bool" default="true" />
- <attribute name="visible" type="bool" default="true" />
- <attribute name="alignment" type="enum" values="left,center,right" default="left" />
- <attribute name="data-type" type="enum" values="text,number,date,boolean" default="text" />
- </attributes>
- </structure>
-
- <!-- ListView Control -->
- <control name="ListView" type="data" category="basic" inherits="CommonControl">
- <description>List view control with columns and detailed item display</description>
- <constraints>
- <allowed-parents>Panel,SplitPanel,FormField</allowed-parents>
- <allowed-children>columns,items,context-menu</allowed-children>
- <container>false</container>
- <requires-structure>columns,items</requires-structure>
- </constraints>
- <attributes>
- <attribute name="view-mode" type="enum" values="list,details,icons,tiles" default="details" />
- <attribute name="multi-select" type="bool" default="false" />
- <attribute name="grid-lines" type="bool" default="true" />
- <attribute name="full-row-select" type="bool" default="true" />
- <attribute name="sort-column" type="string" default="" />
- <attribute name="sort-direction" type="enum" values="asc,desc" default="asc" />
- </attributes>
- <behavior>
- <event name="selection-changed" alias="on-select" />
- <event name="item-double-click" />
- <event name="column-click" />
- </behavior>
- <structure>
- <columns min-count="1" max-count="20">
- <column-item inherits="ColumnItem" />
- </columns>
- <items min-count="0" max-count="unlimited">
- <listview-item>
- <values>
- <value column="" text="" />
- </values>
- </listview-item>
- </items>
- <selected-items max-count="depends-on-multi-select" />
- <context-menu max-count="1" />
- </structure>
- </control>
-
- <!-- TreeViewItem Structure -->
- <structure name="TreeViewItem" type="data-item" category="basic">
- <description>Node item within TreeView control</description>
- <attributes>
- <attribute name="text" type="string" required="true" />
- <attribute name="value" type="string" required="true" />
- <attribute name="expanded" type="bool" default="false" />
- <attribute name="selected" type="bool" default="false" />
- <attribute name="checked" type="bool" default="false" />
- <attribute name="image" type="string" default="" />
- <attribute name="enabled" type="bool" default="true" />
- </attributes>
- <structure>
- <children min-count="0" max-count="unlimited" max-depth="10">
- <tree-view-item inherits="TreeViewItem" />
- </children>
- </structure>
- </structure>
-
- <!-- TreeView Control -->
- <control name="TreeView" type="data" category="basic" inherits="CommonControl">
- <description>Hierarchical tree view control with expandable nodes</description>
- <constraints>
- <allowed-parents>Panel,SplitPanel,FormField</allowed-parents>
- <allowed-children>items</allowed-children>
- <container>false</container>
- <requires-structure>items</requires-structure>
- </constraints>
- <attributes>
- <attribute name="show-lines" type="bool" default="true" />
- <attribute name="show-root-lines" type="bool" default="true" />
- <attribute name="show-plus-minus" type="bool" default="true" />
- <attribute name="checkboxes" type="bool" default="false" />
- <attribute name="full-row-select" type="bool" default="false" />
- <attribute name="hottracking" type="bool" default="false" />
- </attributes>
- <behavior>
- <event name="node-selected" />
- <event name="node-expanded" />
- <event name="node-collapsed" />
- <event name="node-checked" />
- <event name="node-double-click" />
- </behavior>
- <structure>
- <items min-count="0" max-count="unlimited">
- <tree-view-item inherits="TreeViewItem" />
- </items>
- </structure>
- </control>
-
- <!-- Panel Control -->
- <control name="Panel" type="container" category="layout" inherits="CommonControl">
- <description>Container panel for organizing other controls</description>
- <constraints>
- <allowed-parents>Panel,SplitPanel,window,wireframe-instance</allowed-parents>
- <allowed-children>any-control</allowed-children>
- <container>true</container>
- <max-children>unlimited</max-children>
- </constraints>
- <attributes>
- <attribute name="border" type="bool" default="false" />
- <attribute name="border-style" type="enum" values="none,solid,raised,sunken" default="none" />
- <attribute name="background-color" type="color" default="transparent" />
- <attribute name="padding" type="int" default="0" min="0" max="50" />
- <attribute name="margin" type="int" default="0" min="0" max="50" />
- <attribute name="orientation" type="enum" values="horizontal,vertical" default="vertical" />
- <attribute name="alignment" type="enum" values="left,center,right,stretch" default="left" />
- <attribute name="auto-scroll" type="bool" default="false" />
- <attribute name="width" type="int" min="10" max="2000" />
- <attribute name="height" type="int" min="10" max="2000" />
- </attributes>
- <structure>
- <children allow-multiple="true" />
- </structure>
- </control>
-
- <!-- SplitPanel Control -->
- <control name="SplitPanel" type="container" category="layout" inherits="CommonControl">
- <description>Splitter container with two resizable panels</description>
- <constraints>
- <allowed-parents>Panel,SplitPanel,window,wireframe-instance</allowed-parents>
- <allowed-children>panel1,panel2</allowed-children>
- <container>true</container>
- <max-children>2</max-children>
- <requires-structure>panel1,panel2</requires-structure>
- </constraints>
- <attributes>
- <attribute name="orientation" type="enum" values="horizontal,vertical" default="vertical" />
- <attribute name="splitter-distance" type="int" default="50" min="10" max="90" />
- <attribute name="splitter-width" type="int" default="4" min="2" max="10" />
- <attribute name="fixed-panel" type="enum" values="none,panel1,panel2" default="none" />
- <attribute name="border" type="bool" default="true" />
- </attributes>
- <behavior>
- <event name="splitter-moved" />
- </behavior>
- <structure>
- <panel1 required="true">
- <children allow-multiple="true" />
- </panel1>
- <panel2 required="true">
- <children allow-multiple="true" />
- </panel2>
- </structure>
- </control>
-
- <!-- MenuItem Structure -->
- <structure name="MenuItem" type="menu-item" category="navigation">
- <description>Individual menu item within Menu control</description>
- <attributes>
- <attribute name="text" type="string" required="true" />
- <attribute name="value" type="string" default="" />
- <attribute name="enabled" type="bool" default="true" />
- <attribute name="visible" type="bool" default="true" />
- <attribute name="checked" type="bool" default="false" />
- <attribute name="separator" type="bool" default="false" />
- <attribute name="shortcut" type="string" default="" />
- <attribute name="image" type="string" default="" />
- </attributes>
- <behavior>
- <event name="click" alias="on-click" />
- </behavior>
- <structure>
- <sub-items min-count="0" max-count="unlimited" max-depth="5">
- <menu-item inherits="MenuItem" />
- </sub-items>
- </structure>
- </structure>
-
- <!-- Menu Control -->
- <control name="Menu" type="navigation" category="navigation" inherits="CommonControl">
- <description>Menu control with hierarchical menu items</description>
- <constraints>
- <allowed-parents>Panel,SplitPanel,ToolBar,window</allowed-parents>
- <allowed-children>items</allowed-children>
- <container>false</container>
- <requires-structure>items</requires-structure>
- </constraints>
- <attributes>
- <attribute name="orientation" type="enum" values="horizontal,vertical" default="horizontal" />
- <attribute name="show-images" type="bool" default="true" />
- <attribute name="show-shortcuts" type="bool" default="true" />
- </attributes>
- <structure>
- <items min-count="1" max-count="unlimited">
- <menu-item inherits="MenuItem" />
- </items>
- </structure>
- </control>
-
- <!-- Button Control -->
- <control name="Button" type="action" category="basic" inherits="CommonControl">
- <description>Clickable button control with text and/or image</description>
- <constraints>
- <allowed-parents>Panel,SplitPanel,StatusBar,ToolBar,FormField,ButtonBar</allowed-parents>
- <allowed-children>none</allowed-children>
- <container>false</container>
- </constraints>
- <attributes>
- <attribute name="type" type="enum" values="text,image,text-image" default="text" />
- <attribute name="image" type="string" default="" />
- <attribute name="image-position" type="enum" values="left,right,top,bottom" default="left" />
- <attribute name="style" type="enum" values="normal,primary,secondary,danger,borderless" default="normal" />
- <attribute name="auto-size" type="bool" default="false" />
- <attribute name="width" type="int" min="20" max="300" />
- <attribute name="height" type="int" min="20" max="100" />
- </attributes>
- <behavior>
- <event name="click" alias="on-click" required="true" />
- <event name="mouse-enter" />
- <event name="mouse-leave" />
- </behavior>
- </control>
-
- <!-- Image Control -->
- <control name="Image" type="display" category="basic" inherits="CommonControl">
- <description>Image display control</description>
- <constraints>
- <allowed-parents>Panel,SplitPanel,StatusBar,ToolBar,Button</allowed-parents>
- <allowed-children>none</allowed-children>
- <container>false</container>
- </constraints>
- <attributes>
- <attribute name="resource" type="string" required="true" />
- <attribute name="size-mode" type="enum" values="normal,stretch,zoom,center,auto-size" default="normal" />
- <attribute name="border" type="bool" default="false" />
- <attribute name="background-color" type="color" default="transparent" />
- <attribute name="width" type="int" min="10" max="1000" />
- <attribute name="height" type="int" min="10" max="1000" />
- </attributes>
- <behavior>
- <event name="click" />
- <event name="double-click" />
- </behavior>
- </control>
-
- <!-- StatusBar Control -->
- <control name="StatusBar" type="container" category="layout" inherits="CommonControl">
- <description>Status bar container for displaying status information</description>
- <constraints>
- <allowed-parents>Panel,window</allowed-parents>
- <allowed-children>items,context-menu</allowed-children>
- <container>true</container>
- <max-children>unlimited</max-children>
- <requires-structure>items</requires-structure>
- </constraints>
- <attributes>
- <attribute name="show-panels" type="bool" default="true" />
- <attribute name="sizing-grip" type="bool" default="true" />
- <attribute name="height" type="int" default="22" min="16" max="50" />
- </attributes>
- <structure>
- <items min-count="0" max-count="unlimited">
- <status-item>
- <control-ref allowed-types="Label,Image,ComboBox,Button" />
- </status-item>
- </items>
- <context-menu max-count="1" />
- </structure>
- </control>
-
- <!-- ToolBar Control -->
- <control name="ToolBar" type="container" category="layout" inherits="CommonControl">
- <description>Toolbar container for quick access to commands</description>
- <constraints>
- <allowed-parents>Panel,window</allowed-parents>
- <allowed-children>items,context-menu</allowed-children>
- <container>true</container>
- <max-children>unlimited</max-children>
- <requires-structure>items</requires-structure>
- </constraints>
- <attributes>
- <attribute name="orientation" type="enum" values="horizontal,vertical" default="horizontal" />
- <attribute name="appearance" type="enum" values="normal,flat,system" default="normal" />
- <attribute name="show-tooltips" type="bool" default="true" />
- <attribute name="divider" type="bool" default="true" />
- <attribute name="wrappable" type="bool" default="false" />
- <attribute name="button-size" type="enum" values="small,medium,large" default="medium" />
- </attributes>
- <structure>
- <items min-count="0" max-count="unlimited">
- <toolbar-item>
- <control-ref allowed-types="Label,Image,ComboBox,Button,Menu" />
- </toolbar-item>
- </items>
- <context-menu max-count="1" />
- </structure>
- </control>
-
- </patterns>
|