2 * as state management is a bit too complicated inside the builder
3 * it's better to seperate this into this class
5 * This class has references to all the Class instances that make up the window..
8 public class WindowState : Object
10 public MainWindow win;
21 public Xcls_WindowLeftTree left_tree;
30 public About(MainWindow win)
41 public void leftTreeInit()
44 this.left_tree = new Xcls_WindowLeftTree();
46 this.left_tree.main_window = _this.win;
48 this.win.tree.el.pack_start(this.left_tree.el,true, true,0);
49 this.left_tree.el.show_all();
51 this.left_tree.before_node_change.connect(() => {
52 return this.leftTreeBeforeChange();
56 this.left_tree.node_selected.connect((sel) => {
57 this.leftTreeNodeSelected(sel);
62 public bool leftTreeBeforeChange(JsRender.Node? sel)
64 if (this.state != "codeedit") {
65 this.left_props.finish_editing();
68 if (!this.code_editor.saveContents()) {
74 public void leftTreeNodeSelected(JsRender.Node? sel)
77 print("node_selected called %s\n", (sel == null) ? "NULL" : "a value");
80 this.left_props.el.hide();
82 this.left_props.el.show();
83 this.left_props.load(this.left_tree.getActiveFile(), sel);
88 this.rightpalete.clear();
91 this.rightpalete.load(this.left_tree.getActiveFile().palete(), sel.fqn());
97 this.add_props.clear();
100 this.add_props.show(this.left_tree.getActiveFile().palete(), "props", sel.fqn());
106 this.add_props.clear();
109 this.add_props.show(_this.left_tree.getActiveFile().palete(), "signals", sel.fqn());
121 // ----------- properties
122 // listener uses the properties
123 public void propsInit()
126 this.win.add_props = new Xcls_WindowAddProp();
127 this.add_props.ref(); /// really?
128 ((Gtk.Container)(this.win.addpropsview.el.get_widget())).add(this.win.add_props.el);
129 //this.projectsettings.el.show_all();
131 var stage = _this.win.addpropsview.el.get_stage();
132 stage.set_background_color( Clutter.Color.from_string("#000"));
135 _this.win.add_props.select.connect( (key,type,skel, etype) => {
136 this.win.left_props.addProp(etype, key, skel, type);
140 public void propsShow()
149 // ----------- Add / Edit listener
150 // listener uses the properties
151 public listenerInit()
155 public listenerShow()
159 public listenerHide()