| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!-- Minimal UI Layout Definition Format Sample -->
- <ui-layout-def xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="ui-layout-definition ui-layout-def.xsd"
- version="1.2">
-
- <!-- Basic pattern definitions (required) -->
- <patterns>
-
- <!-- Basic container control -->
- <control name="Panel" type="container" category="basic">
- <constraints>
- <allowed-parents>Panel,window</allowed-parents>
- <allowed-children>any-control</allowed-children>
- <container>true</container>
- </constraints>
- <attributes>
- <attribute name="width" type="int" default="200" />
- <attribute name="height" type="int" default="100" />
- <attribute name="orientation" type="enum" values="horizontal,vertical" default="vertical" />
- </attributes>
- </control>
-
- <!-- Basic text display -->
- <control name="Label" type="display" category="basic">
- <constraints>
- <allowed-parents>Panel</allowed-parents>
- <allowed-children>none</allowed-children>
- <container>false</container>
- </constraints>
- <attributes>
- <attribute name="text" type="string" default="" required="true" />
- <attribute name="font-size" type="int" default="12" />
- </attributes>
- </control>
-
- <!-- Basic text input -->
- <control name="TextBox" type="input" category="basic">
- <constraints>
- <allowed-parents>Panel</allowed-parents>
- <allowed-children>none</allowed-children>
- <container>false</container>
- </constraints>
- <attributes>
- <attribute name="value" type="string" default="" />
- <attribute name="placeholder" type="string" default="" />
- </attributes>
- </control>
-
- <!-- Basic button -->
- <control name="Button" type="action" category="basic">
- <constraints>
- <allowed-parents>Panel</allowed-parents>
- <allowed-children>none</allowed-children>
- <container>false</container>
- </constraints>
- <attributes>
- <attribute name="text" type="string" default="Button" required="true" />
- <attribute name="enabled" type="bool" default="true" />
- </attributes>
- <behavior>
- <event name="click" required="true" />
- </behavior>
- </control>
-
- </patterns>
-
- <!-- Simple view definition -->
- <views>
- <view name="SimpleView" type="utility" category="core">
- <description>A simple view for demonstration</description>
-
- <data-context>
- <property name="userName" type="string" scope="view" />
- <property name="isLoggedIn" type="bool" scope="view" />
- </data-context>
-
- <windows>
- <window-ref name="MainWindow" role="main" default="true" />
- </windows>
-
- <navigation>
- <action name="show-main" target="MainWindow" />
- </navigation>
- </view>
- </views>
-
- <!-- Single window definition -->
- <window name="MainWindow" title="Simple Application" view="SimpleView">
- <attributes>
- <attribute name="width" value="400" />
- <attribute name="height" value="300" />
- </attributes>
-
- <view-properties>
- <role>main</role>
- <default>true</default>
- <data-context-binding>userName</data-context-binding>
- </view-properties>
-
- <!-- Simple window content -->
- <Panel name="mainPanel" width="400" height="300">
- <Label name="titleLabel" text="Welcome to Simple App" font-size="16" />
-
- <Panel name="inputPanel" orientation="horizontal">
- <Label name="nameLabel" text="Your Name:" />
- <TextBox name="nameInput" placeholder="Enter your name..." />
- </Panel>
-
- <Panel name="buttonPanel" orientation="horizontal">
- <Button name="submitButton" text="Submit" />
- <Button name="clearButton" text="Clear" />
- </Panel>
- </Panel>
- </window>
-
- </ui-layout-def>
|