grid/
grid.rs

1use fluid_parser::lexer::Lexer;
2use fluid_parser::parser::Parser;
3
4const TEST: &str = r#"# data file for the Fltk User Interface Designer (fluid)
5version 1.0400
6header_name {.h}
7code_name {.cxx}
8Function {make_window()} {open
9} {
10  Fl_Window {} {open
11    xywh {732 434 480 320} type Double visible
12  } {
13    Fl_Grid {} {open selected
14      xywh {25 25 240 160}
15      dimensions {3 3} margin {1 0 0 0} gap {1 1}
16    } {
17      Fl_Button {} {
18        label Button
19        xywh {26 25 85 60}
20        parent_properties {
21          location {0 0}
22        }
23      }
24      Fl_Button {} {
25        label Button
26        xywh {179 126 86 59}
27        parent_properties {
28          location {2 2}
29        }
30      }
31    }
32  }
33}"#;
34
35fn main() {
36    let l = Lexer::new(TEST);
37    let mut p = Parser::new(l);
38    let a = p.parse();
39    println!("{:#?}", a);
40}