Skip to content

Commit

Permalink
Update Layout.xsd
Browse files Browse the repository at this point in the history
  • Loading branch information
ESLyric committed Dec 13, 2024
1 parent 248bba3 commit d23824a
Showing 1 changed file with 64 additions and 44 deletions.
108 changes: 64 additions & 44 deletions layout/Layout.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -20,42 +20,6 @@
</xs:complexType>
</xs:element>

<!--custom value type-->
<xs:simpleType name="layout-element-type">
<xs:restriction base="xs:string">
<xs:enumeration value="container">
<xs:annotation>
<xs:documentation xml:lang="zh">容器布局元素, 用于容纳任意布局元素类型</xs:documentation>
<xs:documentation xml:lang="en"></xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="label">
<xs:annotation>
<xs:documentation xml:lang="zh">文本布局元素, 支持格式化标题字段</xs:documentation>
<xs:documentation xml:lang="en"></xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="albumart">
<xs:annotation>
<xs:documentation xml:lang="zh">专辑封面布局元素, 用于显示专辑封面, 仅支持添加单个专辑封面类型的布局元素</xs:documentation>
<xs:documentation xml:lang="en"></xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="lyric">
<xs:annotation>
<xs:documentation xml:lang="zh">歌词布局元素</xs:documentation>
<xs:documentation xml:lang="en"></xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="button">
<xs:annotation>
<xs:documentation xml:lang="zh">按钮布局元素</xs:documentation>
<xs:documentation xml:lang="en"></xs:documentation>
</xs:annotation>
</xs:enumeration>
</xs:restriction>
</xs:simpleType>

<xs:simpleType name="layout-anchor-type">
<xs:restriction base="xs:string">
<xs:pattern value="(left|top|right|bottom|hfill|vfill|fill|hcenter|vcenter|center)(,(left|top|right|bottom|hfill|vfill|fill|hcenter|vcenter|center))*"></xs:pattern>
Expand Down Expand Up @@ -238,23 +202,16 @@
</xs:complexContent>
</xs:complexType>

<xs:complexType name="layout-element">
<xs:sequence>
<xs:element name="element" minOccurs="0" maxOccurs="unbounded"></xs:element>
</xs:sequence>
<xs:attributeGroup ref="attri-all"></xs:attributeGroup>
</xs:complexType>

<xs:complexType name="layout-container">
<xs:sequence>
<xs:choice minOccurs="1" maxOccurs="unbounded">
<xs:element name="element" type="layout-element" minOccurs="0" maxOccurs="unbounded"></xs:element>
<xs:element name="container" type="layout-container" minOccurs="0" maxOccurs="unbounded"></xs:element>
<xs:element name="label" type="layout-label" minOccurs="0" maxOccurs="unbounded"></xs:element>
<xs:element name="albumart" type="layout-albumart" minOccurs="0" maxOccurs="unbounded"></xs:element>
<xs:element name="lyric" type="layout-lyric" minOccurs="1" maxOccurs="1"></xs:element>
<xs:element name="button" type="layout-button" minOccurs="0" maxOccurs="unbounded"></xs:element>
<xs:element name="seekbar" type="layout-seekbar" minOccurs="0" maxOccurs="unbounded"></xs:element>
<xs:element name="volume" type="layout-volume" minOccurs="0" maxOccurs="unbounded"></xs:element>
</xs:choice>
</xs:sequence>
<xs:attributeGroup ref="attri-common"></xs:attributeGroup>
Expand Down Expand Up @@ -314,6 +271,15 @@
<xs:attributeGroup ref="attri-progress-bar"></xs:attributeGroup>
</xs:complexType>

<xs:complexType name="layout-volume">
<xs:annotation>
<xs:documentation xml:lang="zh">音量布局元素</xs:documentation>
<xs:documentation xml:lang="en"></xs:documentation>
</xs:annotation>
<xs:attributeGroup ref="attri-common"></xs:attributeGroup>
<xs:attributeGroup ref="attri-progress-bar"></xs:attributeGroup>
</xs:complexType>

<!--element attributes-->
<xs:attributeGroup name="attri-common">
<xs:attribute name="name" type="xs:string">
Expand Down Expand Up @@ -464,6 +430,12 @@
<xs:documentation xml:lang="en"></xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="tooltip" type="xs:string">
<xs:annotation>
<xs:documentation xml:lang="zh">提示信息</xs:documentation>
<xs:documentation xml:lang="en"></xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:attributeGroup>

<xs:attributeGroup name="attri-container">
Expand Down Expand Up @@ -673,12 +645,60 @@
<xs:documentation xml:lang="en"></xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="thumb-color" type="layout-color-type">
<xs:annotation>
<xs:documentation xml:lang="zh">滑块颜色</xs:documentation>
<xs:documentation xml:lang="en"></xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="radius" type="xs:integer">
<xs:annotation>
<xs:documentation xml:lang="zh">圆角半径</xs:documentation>
<xs:documentation xml:lang="en"></xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="thumb-width" type="xs:integer">
<xs:annotation>
<xs:documentation xml:lang="zh">滑块宽度</xs:documentation>
<xs:documentation xml:lang="en"></xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="thumb-height" type="xs:integer">
<xs:annotation>
<xs:documentation xml:lang="zh">滑块高度</xs:documentation>
<xs:documentation xml:lang="en"></xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="thumb-radius" type="xs:integer">
<xs:annotation>
<xs:documentation xml:lang="zh">滑块半径</xs:documentation>
<xs:documentation xml:lang="en"></xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="track-width" type="xs:integer">
<xs:annotation>
<xs:documentation xml:lang="zh">滑块半径</xs:documentation>
<xs:documentation xml:lang="en"></xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="track-height" type="xs:integer">
<xs:annotation>
<xs:documentation xml:lang="zh">滑块半径</xs:documentation>
<xs:documentation xml:lang="en"></xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="always-show-thumb" type="xs:boolean">
<xs:annotation>
<xs:documentation xml:lang="zh">是否总是显示滑块, false时仅鼠标悬浮时显示. 默认为true</xs:documentation>
<xs:documentation xml:lang="en"></xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="vertical" type="xs:boolean">
<xs:annotation>
<xs:documentation xml:lang="zh">垂直显示</xs:documentation>
<xs:documentation xml:lang="en"></xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:attributeGroup>

<xs:attributeGroup name="attri-all">
Expand Down

0 comments on commit d23824a

Please sign in to comment.