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:
|
||||
```xml
|
||||
<row content="INNER_XML: (GuiXml | None) = none">
|
||||
<row content="INNER_XML: (Layout | None) = none">
|
||||
{{INNER_XML}}
|
||||
</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}}`.
|
||||
|
||||
## Defining new components
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ pub enum TypeValueOrArgument {
|
|||
|
||||
#[derive(Debug)]
|
||||
pub enum TypeName {
|
||||
// GuiXml, // TODO
|
||||
// Layout, // TODO
|
||||
Integer,
|
||||
Decimal,
|
||||
AbsolutePx,
|
||||
|
|
@ -53,7 +53,7 @@ pub enum TypeName {
|
|||
|
||||
#[derive(Debug)]
|
||||
pub enum TypeValue {
|
||||
// GuiXml(()), // TODO
|
||||
// Layout(()), // TODO
|
||||
Integer(i64),
|
||||
Decimal(f64),
|
||||
AbsolutePx(f32),
|
||||
|
|
|
|||
|
|
@ -224,7 +224,7 @@ impl AttributeParser {
|
|||
|
||||
// Return the case-insensitive TypeName enum for the individual type
|
||||
match &individual_type.to_ascii_lowercase()[..] {
|
||||
// "xml" => TypeName::Xml, // TODO
|
||||
// "layout" => TypeName::Layout, // TODO
|
||||
"integer" => TypeName::Integer,
|
||||
"decimal" => TypeName::Decimal,
|
||||
"absolutepx" => TypeName::AbsolutePx,
|
||||
|
|
|
|||
Loading…
Reference in New Issue