Implement enum for Layout data type
This commit is contained in:
parent
ec8f9eda54
commit
00cd62d411
|
|
@ -1,4 +1,4 @@
|
||||||
<!-- Called as <window:main width="1920px" height="1080px" /> -->
|
<!-- Instantiated by the window and called with absolute dimensions such as: <window:main width="1920px" height="1080px" /> -->
|
||||||
<window:main>
|
<window:main>
|
||||||
<col width="100%" height="100%">
|
<col width="100%" height="100%">
|
||||||
<!-- Header -->
|
<!-- Header -->
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
use crate::color::Color;
|
use crate::color::Color;
|
||||||
|
use crate::layout_abstract_syntax::*;
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct VariableParameter {
|
pub struct VariableParameter {
|
||||||
|
|
@ -36,7 +37,7 @@ pub enum TypeValueOrArgument {
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub enum TypeName {
|
pub enum TypeName {
|
||||||
// Layout, // TODO
|
Layout,
|
||||||
Integer,
|
Integer,
|
||||||
Decimal,
|
Decimal,
|
||||||
AbsolutePx,
|
AbsolutePx,
|
||||||
|
|
@ -53,7 +54,7 @@ pub enum TypeName {
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub enum TypeValue {
|
pub enum TypeValue {
|
||||||
// Layout(()), // TODO
|
Layout(Vec<rctree::Node<LayoutAbstractNode>>),
|
||||||
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()[..] {
|
||||||
// "layout" => TypeName::Layout, // TODO
|
"layout" => TypeName::Layout,
|
||||||
"integer" => TypeName::Integer,
|
"integer" => TypeName::Integer,
|
||||||
"decimal" => TypeName::Decimal,
|
"decimal" => TypeName::Decimal,
|
||||||
"absolutepx" => TypeName::AbsolutePx,
|
"absolutepx" => TypeName::AbsolutePx,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue