| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!-- ENHANCED Abstract Control Definitions for UI Layout Definition Format -->
- <patterns xmlns="ui-layout-patterns">
-
- <!-- ENHANCEMENT: Base abstract control with data binding and accessibility -->
- <control name="CommonControl" type="base" category="abstract">
- <description>Base abstract control defining common attributes including data binding and accessibility</description>
- <constraints>
- <allowed-parents>any</allowed-parents>
- <allowed-children>depends-on-implementation</allowed-children>
- <container>depends-on-implementation</container>
- </constraints>
- <attributes>
- <!-- Original 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="" />
-
- <!-- ENHANCEMENT: Data Binding Support -->
- <attribute name="data-context" type="string" default="" />
- <attribute name="binding-path" type="string" default="" />
- <attribute name="command-binding" type="string" default="" />
- <attribute name="validation-rule" type="string" default="" />
- <attribute name="converter" type="string" default="" />
- <attribute name="binding-mode" type="enum" values="OneWay,TwoWay,OneTime,OneWayToSource" default="TwoWay" />
-
- <!-- ENHANCEMENT: Accessibility Support -->
- <attribute name="aria-label" type="string" default="" />
- <attribute name="aria-description" type="string" default="" />
- <attribute name="aria-role" type="string" default="" />
- <attribute name="aria-live" type="enum" values="off,polite,assertive" default="off" />
- <attribute name="tab-index" type="int" default="0" />
- <attribute name="access-key" type="string" default="" />
- <attribute name="high-contrast-support" type="bool" default="true" />
- <attribute name="screen-reader-text" type="string" default="" />
-
- <!-- ENHANCEMENT: Version Compatibility -->
- <attribute name="min-version" type="string" default="1.0" />
- <attribute name="max-version" type="string" default="2.0" />
- <attribute name="deprecated-in" type="string" default="" />
- <attribute name="replaced-by" type="string" default="" />
- </attributes>
- </control>
-
- <!-- ENHANCEMENT: StatusBar Control (was missing) -->
- <control name="StatusBar" type="container" category="layout" inherits="CommonControl">
- <description>Status bar container for displaying application 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" />
- <attribute name="dock-position" type="enum" values="bottom,top" default="bottom" />
- <attribute name="auto-size-panels" type="bool" default="true" />
- </attributes>
- <structure>
- <items min-count="0" max-count="unlimited">
- <status-item>
- <control-ref allowed-types="Label,Image,ComboBox,Button,ProgressBar" />
- </status-item>
- </items>
- <context-menu max-count="1" />
- </structure>
- </control>
- <!-- ENHANCEMENT: ProgressBar Control -->
- <control name="ProgressBar" type="display" category="basic" inherits="CommonControl">
- <description>Progress indicator control with enhanced features</description>
- <constraints>
- <allowed-parents>Panel,SplitPanel,StatusBar,FormField</allowed-parents>
- <allowed-children>none</allowed-children>
- <container>false</container>
- </constraints>
- <attributes>
- <attribute name="minimum" type="int" default="0" />
- <attribute name="maximum" type="int" default="100" />
- <attribute name="value" type="int" default="0" />
- <attribute name="step" type="int" default="1" />
- <attribute name="style" type="enum" values="blocks,continuous,marquee" default="continuous" />
- <attribute name="orientation" type="enum" values="horizontal,vertical" default="horizontal" />
- <attribute name="show-text" type="bool" default="false" />
- <attribute name="text-format" type="string" default="{0}%" />
- <attribute name="indeterminate" type="bool" default="false" />
- <attribute name="animation-speed" type="int" default="100" min="0" max="1000" />
- <attribute name="color" type="color" default="#0078d4" />
- <attribute name="background-color" type="color" default="#f0f0f0" />
- </attributes>
- <behavior>
- <event name="value-changed" />
- <event name="progress-completed" />
- </behavior>
- </control>
- <!-- ENHANCEMENT: DatePicker Control -->
- <control name="DatePicker" type="input" category="basic" inherits="CommonControl">
- <description>Date selection control with calendar popup</description>
- <constraints>
- <allowed-parents>Panel,SplitPanel,FormField</allowed-parents>
- <allowed-children>none</allowed-children>
- <container>false</container>
- </constraints>
- <attributes>
- <attribute name="selected-date" type="date" default="null" />
- <attribute name="min-date" type="date" default="1900-01-01" />
- <attribute name="max-date" type="date" default="2100-12-31" />
- <attribute name="format" type="string" default="yyyy-MM-dd" />
- <attribute name="placeholder-text" type="string" default="" />
- <attribute name="show-calendar-button" type="bool" default="true" />
- <attribute name="show-clear-button" type="bool" default="false" />
- <attribute name="first-day-of-week" type="enum" values="sunday,monday,tuesday,wednesday,thursday,friday,saturday" default="sunday" />
- <attribute name="highlight-today" type="bool" default="true" />
- <attribute name="allow-text-input" type="bool" default="true" />
- </attributes>
- <behavior>
- <event name="date-selected" />
- <event name="date-changed" />
- <event name="calendar-opened" />
- <event name="calendar-closed" />
- </behavior>
- </control>
- <!-- ENHANCEMENT: NumericUpDown Control -->
- <control name="NumericUpDown" type="input" category="basic" inherits="CommonControl">
- <description>Numeric input control with up/down buttons</description>
- <constraints>
- <allowed-parents>Panel,SplitPanel,FormField</allowed-parents>
- <allowed-children>none</allowed-children>
- <container>false</container>
- </constraints>
- <attributes>
- <attribute name="value" type="decimal" default="0" />
- <attribute name="minimum" type="decimal" default="0" />
- <attribute name="maximum" type="decimal" default="100" />
- <attribute name="increment" type="decimal" default="1" />
- <attribute name="decimal-places" type="int" default="0" min="0" max="10" />
- <attribute name="thousands-separator" type="bool" default="false" />
- <attribute name="format-string" type="string" default="" />
- <attribute name="show-buttons" type="bool" default="true" />
- <attribute name="button-position" type="enum" values="right,left" default="right" />
- <attribute name="wrap-value" type="bool" default="false" />
- <attribute name="allow-null" type="bool" default="false" />
- </attributes>
- <behavior>
- <event name="value-changed" />
- <event name="increment" />
- <event name="decrement" />
- </behavior>
- </control>
- <!-- ENHANCEMENT: Slider Control -->
- <control name="Slider" type="input" category="basic" inherits="CommonControl">
- <description>Range slider control for selecting numeric values</description>
- <constraints>
- <allowed-parents>Panel,SplitPanel,FormField</allowed-parents>
- <allowed-children>none</allowed-children>
- <container>false</container>
- </constraints>
- <attributes>
- <attribute name="value" type="double" default="0" />
- <attribute name="minimum" type="double" default="0" />
- <attribute name="maximum" type="double" default="100" />
- <attribute name="step" type="double" default="1" />
- <attribute name="orientation" type="enum" values="horizontal,vertical" default="horizontal" />
- <attribute name="show-ticks" type="bool" default="false" />
- <attribute name="tick-frequency" type="double" default="10" />
- <attribute name="tick-placement" type="enum" values="none,top-left,bottom-right,both" default="bottom-right" />
- <attribute name="show-value" type="bool" default="false" />
- <attribute name="value-format" type="string" default="{0}" />
- <attribute name="snap-to-ticks" type="bool" default="false" />
- <attribute name="thumb-style" type="enum" values="round,square,custom" default="round" />
- </attributes>
- <behavior>
- <event name="value-changed" />
- <event name="thumb-drag-started" />
- <event name="thumb-drag-completed" />
- </behavior>
- </control>
- <!-- ENHANCEMENT: Enhanced TextBox Control -->
- <control name="TextBox" type="input" category="basic" inherits="CommonControl">
- <description>Enhanced text input control with validation and data binding</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" />
- <!-- ENHANCEMENT: Additional input types and features -->
- <attribute name="input-type" type="enum" values="text,email,url,tel,number,search" default="text" />
- <attribute name="auto-complete" type="enum" values="off,on,name,email,username,current-password" default="off" />
- <attribute name="spell-check" type="bool" default="true" />
- <attribute name="text-transform" type="enum" values="none,uppercase,lowercase,capitalize" default="none" />
- <attribute name="validation-pattern" type="string" default="" />
- <attribute name="validation-message" type="string" default="" />
- <attribute name="required" type="bool" default="false" />
- <attribute name="auto-focus" type="bool" default="false" />
- </attributes>
- <behavior>
- <event name="text-changed" />
- <event name="focus" />
- <event name="blur" />
- <event name="enter-pressed" />
- <!-- ENHANCEMENT: Validation events -->
- <event name="validation-error" />
- <event name="validation-success" />
- </behavior>
- </control>
- <!-- ENHANCEMENT: Enhanced Button Control -->
- <control name="Button" type="action" category="basic" inherits="CommonControl">
- <description>Enhanced clickable button control with command binding</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,success,warning,info,borderless" default="normal" />
- <!-- ENHANCEMENT: Additional button features -->
- <attribute name="size" type="enum" values="small,medium,large,extra-large" default="medium" />
- <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" />
- <attribute name="is-default" type="bool" default="false" />
- <attribute name="is-cancel" type="bool" default="false" />
- <attribute name="command-parameter" type="string" default="" />
- <attribute name="confirm-message" type="string" default="" />
- <attribute name="loading-text" type="string" default="" />
- <attribute name="disabled-reason" type="string" default="" />
- </attributes>
- <behavior>
- <event name="click" alias="on-click" required="true" />
- <event name="mouse-enter" />
- <event name="mouse-leave" />
- <!-- ENHANCEMENT: Command events -->
- <event name="command-executed" />
- <event name="command-can-execute-changed" />
- </behavior>
- </control>
- <!-- ENHANCEMENT: Enhanced ComboBox Control -->
- <control name="ComboBox" type="input" category="basic" inherits="CommonControl">
- <description>Enhanced dropdown selection control with data binding and filtering</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="selected-index" type="int" default="-1" />
- <attribute name="editable" type="bool" default="false" />
- <attribute name="dropdown-height" type="int" default="200" min="100" max="500" />
- <!-- ENHANCEMENT: Advanced features -->
- <attribute name="auto-complete" type="bool" default="false" />
- <attribute name="auto-complete-mode" type="enum" values="none,suggest,append,suggest-append" default="suggest" />
- <attribute name="filter-mode" type="enum" values="none,starts-with,contains,custom" default="none" />
- <attribute name="placeholder-text" type="string" default="" />
- <attribute name="allow-custom-values" type="bool" default="false" />
- <attribute name="items-source" type="string" default="" />
- <attribute name="display-member-path" type="string" default="" />
- <attribute name="value-member-path" type="string" default="" />
- <attribute name="group-member-path" type="string" default="" />
- </attributes>
- <behavior>
- <event name="selection-changed" alias="on-select" />
- <event name="text-changed" />
- <!-- ENHANCEMENT: Advanced events -->
- <event name="dropdown-opened" />
- <event name="dropdown-closed" />
- <event name="item-filtering" />
- </behavior>
- <structure>
- <items min-count="0" max-count="unlimited">
- <listbox-item inherits="ListBoxItem" />
- </items>
- <selected-items max-count="1" />
- </structure>
- </control>
- <!-- ENHANCEMENT: Enhanced Panel Control -->
- <control name="Panel" type="container" category="layout" inherits="CommonControl">
- <description>Enhanced container panel with advanced layout options</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,dashed,dotted,double,groove,ridge,inset,outset" default="none" />
- <!-- ENHANCEMENT: Advanced styling -->
- <attribute name="border-width" type="int" default="1" min="0" max="10" />
- <attribute name="border-color" type="color" default="#000000" />
- <attribute name="border-radius" type="int" default="0" min="0" max="50" />
- <attribute name="background-color" type="color" default="transparent" />
- <attribute name="background-image" type="string" default="" />
- <attribute name="background-repeat" type="enum" values="no-repeat,repeat,repeat-x,repeat-y" default="no-repeat" />
- <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,space-between,space-around" default="left" />
- <attribute name="vertical-alignment" type="enum" values="top,center,bottom,stretch" default="top" />
- <attribute name="auto-scroll" type="bool" default="false" />
- <attribute name="scroll-bars" type="enum" values="none,horizontal,vertical,both,auto" default="none" />
- <attribute name="width" type="int" min="10" max="2000" />
- <attribute name="height" type="int" min="10" max="2000" />
- <!-- ENHANCEMENT: Size constraints -->
- <attribute name="min-width" type="int" default="0" />
- <attribute name="min-height" type="int" default="0" />
- <attribute name="max-width" type="int" default="0" />
- <attribute name="max-height" type="int" default="0" />
- <attribute name="overflow" type="enum" values="visible,hidden,scroll,auto" default="visible" />
- <attribute name="z-index" type="int" default="0" />
- <attribute name="layout-mode" type="enum" values="flow,grid,flex,absolute" default="flow" />
- </attributes>
- <structure>
- <children allow-multiple="true" />
- </structure>
- </control>
- <!-- ENHANCEMENT: Enhanced ListView Control -->
- <control name="ListView" type="data" category="basic" inherits="CommonControl">
- <description>Enhanced list view control with advanced data binding and virtualization</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,cards" default="details" />
- <attribute name="multi-select" type="bool" default="false" />
- <attribute name="selection-mode" type="enum" values="none,single,multiple,extended" default="single" />
- <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" />
- <!-- ENHANCEMENT: Advanced features -->
- <attribute name="allow-column-reorder" type="bool" default="true" />
- <attribute name="allow-column-resize" type="bool" default="true" />
- <attribute name="virtualization-enabled" type="bool" default="false" />
- <attribute name="items-source" type="string" default="" />
- <attribute name="selected-items-binding" type="string" default="" />
- <attribute name="current-item-binding" type="string" default="" />
- <attribute name="filter-expression" type="string" default="" />
- <attribute name="group-by" type="string" default="" />
- <attribute name="page-size" type="int" default="0" min="0" max="1000" />
- <attribute name="loading-message" type="string" default="Loading..." />
- <attribute name="empty-message" type="string" default="No items to display" />
- </attributes>
- <behavior>
- <event name="selection-changed" alias="on-select" />
- <event name="item-double-click" />
- <event name="column-click" />
- <!-- ENHANCEMENT: Advanced events -->
- <event name="column-header-click" />
- <event name="items-loading" />
- <event name="items-loaded" />
- <event name="filter-changed" />
- <event name="sort-changed" />
- </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>
- <!-- ENHANCEMENT: Enhanced structure definitions -->
- <structure name="ListBoxItem" type="data-item" category="basic">
- <description>Enhanced 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="" />
- <attribute name="tooltip" type="string" default="" />
- <!-- ENHANCEMENT: Data binding and accessibility -->
- <attribute name="data-context" type="string" default="" />
- <attribute name="command" type="string" default="" />
- <attribute name="command-parameter" type="string" default="" />
- <attribute name="aria-label" type="string" default="" />
- <attribute name="group" type="string" default="" />
- </attributes>
- </structure>
- <structure name="ColumnItem" type="data-item" category="basic">
- <description>Enhanced 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,image,custom" default="text" />
- <!-- ENHANCEMENT: Advanced data binding -->
- <attribute name="binding-path" type="string" default="" />
- <attribute name="converter" type="string" default="" />
- <attribute name="format-string" type="string" default="" />
- <attribute name="sort-member-path" type="string" default="" />
- <attribute name="group-member-path" type="string" default="" />
- <attribute name="cell-template" type="string" default="" />
- <attribute name="header-template" type="string" default="" />
- <attribute name="frozen" type="bool" default="false" />
- <attribute name="resizable" type="bool" default="true" />
- <attribute name="aria-label" type="string" default="" />
- </attributes>
- </structure>
- <!-- Keep all other existing controls unchanged (Label, TreeView, Menu, etc.) -->
- <!-- ... (original controls remain the same) ... -->
-
- </patterns>
-
|