Rename GuiXml to Layout data type
This commit is contained in:
parent
98b0dad424
commit
91a877e78c
|
|
@ -19,11 +19,11 @@ Layout is controlled using predefined attributes, such as `width`, `height`, `x-
|
||||||
|
|
||||||
The children of a component are passed to it as a `content` attribute. For example, looking at the row component:
|
The children of a component are passed to it as a `content` attribute. For example, looking at the row component:
|
||||||
```xml
|
```xml
|
||||||
<row content="INNER_XML: (GuiXml | None) = none">
|
<row content="INNER_XML: (Layout | None) = none">
|
||||||
{{INNER_XML}}
|
{{INNER_XML}}
|
||||||
</row>
|
</row>
|
||||||
```
|
```
|
||||||
The `content` attribute defines a new variable `INNER_XML` of type either `GuiXml` or `None`, which can contain more XML or nothing at all. It has a default value of `none` (of type `None`).
|
The `content` attribute defines a new variable `INNER_XML` of type either `Layout` or `None`, which can contain more XML or nothing at all. It has a default value of `none` (of type `None`).
|
||||||
This is then expanded in the body of the row: `{{INNER_XML}}`.
|
This is then expanded in the body of the row: `{{INNER_XML}}`.
|
||||||
|
|
||||||
## Defining new components
|
## Defining new components
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ pub enum TypeValueOrArgument {
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub enum TypeName {
|
pub enum TypeName {
|
||||||
// GuiXml, // TODO
|
// Layout, // TODO
|
||||||
Integer,
|
Integer,
|
||||||
Decimal,
|
Decimal,
|
||||||
AbsolutePx,
|
AbsolutePx,
|
||||||
|
|
@ -53,7 +53,7 @@ pub enum TypeName {
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub enum TypeValue {
|
pub enum TypeValue {
|
||||||
// GuiXml(()), // TODO
|
// Layout(()), // TODO
|
||||||
Integer(i64),
|
Integer(i64),
|
||||||
Decimal(f64),
|
Decimal(f64),
|
||||||
AbsolutePx(f32),
|
AbsolutePx(f32),
|
||||||
|
|
|
||||||
|
|
@ -224,7 +224,7 @@ impl AttributeParser {
|
||||||
|
|
||||||
// Return the case-insensitive TypeName enum for the individual type
|
// Return the case-insensitive TypeName enum for the individual type
|
||||||
match &individual_type.to_ascii_lowercase()[..] {
|
match &individual_type.to_ascii_lowercase()[..] {
|
||||||
// "xml" => TypeName::Xml, // TODO
|
// "layout" => TypeName::Layout, // TODO
|
||||||
"integer" => TypeName::Integer,
|
"integer" => TypeName::Integer,
|
||||||
"decimal" => TypeName::Decimal,
|
"decimal" => TypeName::Decimal,
|
||||||
"absolutepx" => TypeName::AbsolutePx,
|
"absolutepx" => TypeName::AbsolutePx,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue