resources/RooUsage.txt
[app.Builder.js] / src / Builder4 / WindowLeftProps.vala
index fffaf2b..6e585e4 100644 (file)
@@ -1,8 +1,8 @@
 static Xcls_LeftProps  _LeftProps;
 
-public class Xcls_LeftProps : Object 
+public class Xcls_LeftProps : Object
 {
-    public Gtk.VBox el;
+    public Gtk.Box el;
     private Xcls_LeftProps  _this;
 
     public static Xcls_LeftProps singleton()
@@ -33,18 +33,19 @@ public class Xcls_LeftProps : Object
     public Xcls_MainWindow main_window;
     public JsRender.Node node;
 
-    // ctor 
+    // ctor
     public Xcls_LeftProps()
     {
         _this = this;
-        this.el = new Gtk.VBox( false   , 0 );
+        this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
 
         // my vars (dec)
         this.allow_edit = false;
         this.main_window = null;
 
         // set gobject values
-        var child_0 = new Xcls_HBox2( _this );
+        this.el.homogeneous = false   ;
+        var child_0 = new Xcls_Box2( _this );
         child_0.ref();
         this.el.pack_start (  child_0.el , false,true,0 );
         var child_1 = new Xcls_EditProps( _this );
@@ -52,7 +53,39 @@ public class Xcls_LeftProps : Object
         this.el.pack_end (  child_1.el , true,true,0 );
     }
 
-    // user defined functions 
+    // user defined functions
+    public void updateKey (string oldkey,  string type, string key ) {
+    
+     
+       
+       _this.model.el.foreach((mod, path,  iter) => {
+                
+            
+                 
+           
+                GLib.Value gvaltype, gval,kvalue;
+                mod.get_value(iter, 1 , out gval); // one is key..
+               
+            mod.get_value(iter,0, out gvaltype);
+            
+            mod.get_value(iter,3, out kvalue);
+            
+             if (oldkey == ((string)gval) && type == ((string)gvaltype)) {
+             
+                         //print("update iter type=%s, key=%s value=%s\n", type, key,(string) kvalue);
+             
+                             this.updateIter(iter, type, key, (string)kvalue);
+                             return true;
+                 }
+            
+    
+               return false;
+       });
+       
+       this.changed();
+    
+    
+    }
     public              void before_edit ()
     {
     
@@ -103,128 +136,103 @@ public class Xcls_LeftProps : Object
     }
     public              bool startEditingValue ( Gtk.TreePath path) {
     
-        // ONLY return true if editing is allowed - eg. combo..
+         // ONLY return true if editing is allowed - eg. combo..
+    
+        print("start editing?\n");
+        if (!this.stop_editor()) {
+            print("stop editor failed\n");
+            return false;
+        }
         
-                print("start editing?\n");
-                if (!this.stop_editor()) {
-                    print("stop editor failed\n");
-                    return false;
-                }
-                
-                Gtk.TreeIter iter;
+        Gtk.TreeIter iter;
     
-                var mod = this.model.el;
-                mod.get_iter (out iter, path);
-                 
-                /*
-                    m.set(iter, 
-                            0, "listener",
-                            1, miter.get_key(),
-                            2, "<b>" + miter.get_key() + "</b>",
-                            3, miter.get_value()
-                        ); 
-                 
-                */
-                GLib.Value gval;
-                mod.get_value(iter, 3 , out gval);
-                var val = (string)gval;
-            
-                mod.get_value(iter, 1 , out gval);
-                var key = (string)gval;
-                var type_ar = key.split(" ");
-                
-                
-                
-                mod.get_value(iter, 0 , out gval);
-                var type = (string)gval;
-                
-               
-                
-                var use_textarea = false;
+        var mod = this.model.el;
+        mod.get_iter (out iter, path);
+         
+        /*
+            m.set(iter, 
+                    0, "listener",
+                    1, miter.get_key(),
+                    2, "<b>" + miter.get_key() + "</b>",
+                    3, miter.get_value()
+                ); 
+         
+        */
+        GLib.Value gval;
+        mod.get_value(iter, 3 , out gval);
+        var val = (string)gval;
     
-                //------------ things that require the text editor...
-                
-                if (type == "listener") {
-                    use_textarea = true;
-                }
-                if (key.length > 0 && key[0] == '|') { // user defined method
-                    use_textarea = true;
-                }
-                if (key.length > 0 && key[0] == '$') { // raw string
-                    use_textarea = true;
-                }
-                if (key.length > 0 && key == "* init") {
-                    use_textarea = true;
-                }
-                if (val.length > 40) { // long value...
-                    use_textarea = true;
-                }
-                
+        mod.get_value(iter, 1 , out gval);
+        var key = (string)gval;
+        
+        
+        string kname, kflag, ktype;
+        this.node.normalize_key(key, out kname, out kflag, out ktype);
+         
+        
+        mod.get_value(iter, 0 , out gval);
+        var type = (string)gval; // listerner or prop..
+        
+       
+        
+        var use_textarea = false;
+    
+        //------------ things that require the text editor...
+        
+        if (type == "listener") {
+            use_textarea = true;
+        }
+        if (key.length > 0 && key[0] == '|') { // user defined method
+            use_textarea = true;
+        }
+        if (key.length > 0 && key[0] == '$') { // raw string
+            use_textarea = true;
+        }
+        if (key.length > 0 && key == "* init") {
+            use_textarea = true;
+        }
+        if (val.length > 40) { // long value...
+            use_textarea = true;
+        }
+        
+        
+        
+        if (use_textarea) {
+            print("Call show editor\n");
+            GLib.Timeout.add_full(GLib.Priority.DEFAULT,10 , () => {
+                this.view.el.get_selection().select_path(path);
                 
+                this.show_editor(file, node, type, key);
                 
-                if (use_textarea) {
-                    print("Call show editor\n");
-                    GLib.Timeout.add_full(GLib.Priority.DEFAULT,10 , () => {
-                        this.view.el.get_selection().select_path(path);
-                        
-                        this.show_editor(file, node, type, key);
-                        
-                        return false;
-                    });
-                   
-                    
-                    return false;
-                }
-                // others... - fill in options for true/false?
-               print("turn on editing %s \n" , mod.get_path(iter).to_string());
-               
-                   print (type_ar[0].up());
-                    if (type_ar.length > 1 && (
-                            type_ar[0].up() == "BOOLEAN"
-                            ||
-                            type_ar[0].up() == "BOOL"                        
-                        )) {
-                            print("start editing try/false)???");
-                            this.valrender.el.has_entry = false;
-                            string[] opts =  { "true", "false" };
-                            this.valrender.setOptions(opts);
-                            
-                            this.valrender.el.has_entry = false;
-                            this.valrender.el.editable = true;
-                             this.allow_edit  = true;
-                             GLib.Timeout.add_full(GLib.Priority.DEFAULT,100 , () => {
-                                 this.view.el.set_cursor_on_cell(
-                                    path,
-                                    this.valcol.el,
-                                    this.valrender.el,
-                                    true
-                                );
-                                return false;
-                            });
-                            return true;
-                    }
-                                          
-                    
-               
-                 string[] opts =  {  };
+                return false;
+            });
+           
+            
+            return false;
+        }
+        
+         var pal = Palete.factory(this.file.project.xtype);
+        
+        string[] opts;
+        var has_opts = pal.typeOptions(this.node.fqn(), kname, ktype, out opts);
+        
+        
+        
+        // others... - fill in options for true/false?
+        print("turn on editing %s \n" , mod.get_path(iter).to_string());
+       
+           print (ktype.up());
+        if (has_opts) {
+                print("start editing try/false)???");
+                this.valrender.el.has_entry = false;
+              
                 this.valrender.setOptions(opts);
-               
-               GLib.Timeout.add_full(GLib.Priority.DEFAULT,10 , () => {
-                    
-                    // at this point - work out the type...
-                    // if its' a combo... then show the options..
-                    this.valrender.el.has_entry = true;
-                    
-                    this.valrender.el.editable = true;            
                 
-                    
-                    this.allow_edit  = true;
-                    
-                    
-                    
-                    
-    
-                    this.view.el.set_cursor_on_cell(
+                this.valrender.el.has_entry = false;
+                this.valrender.el.editable = true;
+                 this.allow_edit  = true;
+                 GLib.Timeout.add_full(GLib.Priority.DEFAULT,100 , () => {
+                     this.view.el.set_cursor_on_cell(
                         path,
                         this.valcol.el,
                         this.valrender.el,
@@ -232,8 +240,43 @@ public class Xcls_LeftProps : Object
                     );
                     return false;
                 });
-                return false;
-            }
+                return true;
+        }
+                                  
+           // see if type is a Enum.
+           
+           
+       
+            
+       
+         opts =  {  };
+        this.valrender.setOptions(opts);
+       
+       GLib.Timeout.add_full(GLib.Priority.DEFAULT,10 , () => {
+            
+            // at this point - work out the type...
+            // if its' a combo... then show the options..
+            this.valrender.el.has_entry = true;
+            
+            this.valrender.el.editable = true;            
+        
+            
+            this.allow_edit  = true;
+            
+            
+            
+            
+    
+            this.view.el.set_cursor_on_cell(
+                path,
+                this.valcol.el,
+                this.valrender.el,
+                true
+            );
+            return false;
+        });
+        return false;
+    }
     public              void load (JsRender.JsRender file, JsRender.Node? node) 
     {
         print("load leftprops\n");
@@ -295,7 +338,7 @@ public class Xcls_LeftProps : Object
        
        this.view.el.get_selection().unselect_all();
        
-           var pane = _this.main_window.editpane.el;
+       var pane = _this.main_window.editpane.el;
         var try_size = (i * 25) + 60; // est. 20px per line + 40px header
         
         // max 80%...
@@ -388,11 +431,11 @@ public class Xcls_LeftProps : Object
             
             switch(type) {
                 case "listener":
-                    this.node.listeners.remove(key);
+                    this.node.listeners.unset(key);
                     break;
                     
                 case "props":
-                    this.node.props.remove(key);
+                    this.node.props.unset(key);
                     break;
             }
             this.load(this.file, this.node);
@@ -446,7 +489,7 @@ public class Xcls_LeftProps : Object
             }
             this.node.props.set(fkey,value);
         }
-               
+                
           
         // add a row???
         this.load(this.file, this.node);
@@ -488,9 +531,9 @@ public class Xcls_LeftProps : Object
         
                   
     }
-    public              void updateIter (Gtk.TreeIter iter,  string type, string key, string value) {
+    public              void updateIter (Gtk.TreeIter iter,  string type, string key, string kvalue) {
     
-        print("update Iter %s, %s\n", key,value);
+        //print("update Iter %s, %s\n", key,kvalue);
         //typeof(string),  // 0 key type
          //typeof(string),  // 1 key
          //typeof(string),  // 2 key (display)
@@ -499,7 +542,7 @@ public class Xcls_LeftProps : Object
          //typeof(string),  // 5 both (tooltip)
          //typeof(string),  // 6 key (sort)
         
-        var dl = value.strip().split("\n");
+        var dl = kvalue.strip().split("\n");
     
         var dis_val = dl.length > 1 ? (dl[0].strip()+ "...") : dl[0];
         
@@ -511,9 +554,9 @@ public class Xcls_LeftProps : Object
                     0, type,
                 1, key,
                 2, this.keyFormat(key ,type),
-                3, value,
+                3, kvalue,
                 4, dis_val,
-                5, "<tt>" +  GLib.Markup.escape_text(key + " " +value) + "</tt>",
+                5, "<tt>" +  GLib.Markup.escape_text(key + " " +kvalue) + "</tt>",
                 6,  "0 " + key
             ); 
             return;
@@ -525,25 +568,25 @@ public class Xcls_LeftProps : Object
                 0, "props",
                 1, key,
                 2,  this.keyFormat(key , "prop"),
-                3, value,
+                3, kvalue,
                 4, dis_val,
-                 5, "<tt>" + GLib.Markup.escape_text(key + " " + value) + "</tt>",
+                 5, "<tt>" + GLib.Markup.escape_text(key + " " + kvalue) + "</tt>",
                  6,  this.keySortFormat(key)
             ); 
     }
-    public class Xcls_HBox2 : Object 
+    public class Xcls_Box2 : Object
     {
-        public Gtk.HBox el;
+        public Gtk.Box el;
         private Xcls_LeftProps  _this;
 
 
             // my vars (def)
 
-        // ctor 
-        public Xcls_HBox2(Xcls_LeftProps _owner )
+        // ctor
+        public Xcls_Box2(Xcls_LeftProps _owner )
         {
             _this = _owner;
-            this.el = new Gtk.HBox( true, 0 );
+            this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
 
             // my vars (dec)
 
@@ -553,9 +596,9 @@ public class Xcls_LeftProps : Object
             this.el.add (  child_0.el  );
         }
 
-        // user defined functions 
+        // user defined functions
     }
-    public class Xcls_Button3 : Object 
+    public class Xcls_Button3 : Object
     {
         public Gtk.Button el;
         private Xcls_LeftProps  _this;
@@ -563,7 +606,7 @@ public class Xcls_LeftProps : Object
 
             // my vars (def)
 
-        // ctor 
+        // ctor
         public Xcls_Button3(Xcls_LeftProps _owner )
         {
             _this = _owner;
@@ -572,13 +615,14 @@ public class Xcls_LeftProps : Object
             // my vars (dec)
 
             // set gobject values
-            var child_0 = new Xcls_HBox4( _this );
+            this.el.hexpand = true;
+            var child_0 = new Xcls_Box4( _this );
             child_0.ref();
             this.el.add (  child_0.el  );
             var child_1 = new Xcls_AddPropertyPopup( _this );
             child_1.ref();
 
-            // listeners 
+            //listeners
             this.el.button_press_event.connect( (self, ev) => {
                 _this.before_edit();
                 
@@ -591,21 +635,21 @@ public class Xcls_LeftProps : Object
             });
         }
 
-        // user defined functions 
+        // user defined functions
     }
-    public class Xcls_HBox4 : Object 
+    public class Xcls_Box4 : Object
     {
-        public Gtk.HBox el;
+        public Gtk.Box el;
         private Xcls_LeftProps  _this;
 
 
             // my vars (def)
 
-        // ctor 
-        public Xcls_HBox4(Xcls_LeftProps _owner )
+        // ctor
+        public Xcls_Box4(Xcls_LeftProps _owner )
         {
             _this = _owner;
-            this.el = new Gtk.HBox( true, 0 );
+            this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
 
             // my vars (dec)
 
@@ -618,9 +662,9 @@ public class Xcls_LeftProps : Object
             this.el.add (  child_1.el  );
         }
 
-        // user defined functions 
+        // user defined functions
     }
-    public class Xcls_Image5 : Object 
+    public class Xcls_Image5 : Object
     {
         public Gtk.Image el;
         private Xcls_LeftProps  _this;
@@ -628,7 +672,7 @@ public class Xcls_LeftProps : Object
 
             // my vars (def)
 
-        // ctor 
+        // ctor
         public Xcls_Image5(Xcls_LeftProps _owner )
         {
             _this = _owner;
@@ -637,13 +681,14 @@ public class Xcls_LeftProps : Object
             // my vars (dec)
 
             // set gobject values
-            this.el.stock = Gtk.STOCK_ADD;
+            this.el.stock = Gtk.Stock.ADD;
             this.el.icon_size = Gtk.IconSize.MENU;
         }
 
-        // user defined functions 
+        // user defined functions
     }
-    public class Xcls_Label6 : Object 
+
+    public class Xcls_Label6 : Object
     {
         public Gtk.Label el;
         private Xcls_LeftProps  _this;
@@ -651,7 +696,7 @@ public class Xcls_LeftProps : Object
 
             // my vars (def)
 
-        // ctor 
+        // ctor
         public Xcls_Label6(Xcls_LeftProps _owner )
         {
             _this = _owner;
@@ -662,9 +707,11 @@ public class Xcls_LeftProps : Object
             // set gobject values
         }
 
-        // user defined functions 
+        // user defined functions
     }
-    public class Xcls_AddPropertyPopup : Object 
+
+
+    public class Xcls_AddPropertyPopup : Object
     {
         public Gtk.Menu el;
         private Xcls_LeftProps  _this;
@@ -672,7 +719,7 @@ public class Xcls_LeftProps : Object
 
             // my vars (def)
 
-        // ctor 
+        // ctor
         public Xcls_AddPropertyPopup(Xcls_LeftProps _owner )
         {
             _this = _owner;
@@ -694,44 +741,50 @@ public class Xcls_LeftProps : Object
             var child_3 = new Xcls_MenuItem11( _this );
             child_3.ref();
             this.el.append (  child_3.el  );
-            var child_4 = new Xcls_SeparatorMenuItem12( _this );
+            var child_4 = new Xcls_MenuItem12( _this );
             child_4.ref();
-            this.el.add (  child_4.el  );
-            var child_5 = new Xcls_MenuItem13( _this );
+            this.el.append (  child_4.el  );
+            var child_5 = new Xcls_SeparatorMenuItem13( _this );
             child_5.ref();
-            this.el.append (  child_5.el  );
+            this.el.add (  child_5.el  );
             var child_6 = new Xcls_MenuItem14( _this );
             child_6.ref();
             this.el.append (  child_6.el  );
             var child_7 = new Xcls_MenuItem15( _this );
             child_7.ref();
             this.el.append (  child_7.el  );
-            var child_8 = new Xcls_SeparatorMenuItem16( _this );
+            var child_8 = new Xcls_MenuItem16( _this );
             child_8.ref();
-            this.el.add (  child_8.el  );
-            var child_9 = new Xcls_MenuItem17( _this );
+            this.el.append (  child_8.el  );
+            var child_9 = new Xcls_SeparatorMenuItem17( _this );
             child_9.ref();
-            this.el.append (  child_9.el  );
+            this.el.add (  child_9.el  );
             var child_10 = new Xcls_MenuItem18( _this );
             child_10.ref();
             this.el.append (  child_10.el  );
             var child_11 = new Xcls_MenuItem19( _this );
             child_11.ref();
             this.el.append (  child_11.el  );
-            var child_12 = new Xcls_SeparatorMenuItem20( _this );
+            var child_12 = new Xcls_MenuItem20( _this );
             child_12.ref();
-            this.el.add (  child_12.el  );
-            var child_13 = new Xcls_MenuItem21( _this );
+            this.el.append (  child_12.el  );
+            var child_13 = new Xcls_SeparatorMenuItem21( _this );
             child_13.ref();
-            this.el.append (  child_13.el  );
+            this.el.add (  child_13.el  );
             var child_14 = new Xcls_MenuItem22( _this );
             child_14.ref();
             this.el.append (  child_14.el  );
+            var child_15 = new Xcls_MenuItem23( _this );
+            child_15.ref();
+            this.el.append (  child_15.el  );
+            var child_16 = new Xcls_MenuItem24( _this );
+            child_16.ref();
+            this.el.append (  child_16.el  );
         }
 
-        // user defined functions 
+        // user defined functions
     }
-    public class Xcls_MenuItem8 : Object 
+    public class Xcls_MenuItem8 : Object
     {
         public Gtk.MenuItem el;
         private Xcls_LeftProps  _this;
@@ -739,7 +792,7 @@ public class Xcls_LeftProps : Object
 
             // my vars (def)
 
-        // ctor 
+        // ctor
         public Xcls_MenuItem8(Xcls_LeftProps _owner )
         {
             _this = _owner;
@@ -751,15 +804,16 @@ public class Xcls_LeftProps : Object
             this.el.tooltip_markup = "Using _this.{ID} will map to this element";
             this.el.label = "id: _this.{ID} (Vala)";
 
-            // listeners 
+            //listeners
             this.el.activate.connect( ()  => {
                 _this.addProp( "prop", "id", "", "");
             });
         }
 
-        // user defined functions 
+        // user defined functions
     }
-    public class Xcls_MenuItem9 : Object 
+
+    public class Xcls_MenuItem9 : Object
     {
         public Gtk.MenuItem el;
         private Xcls_LeftProps  _this;
@@ -767,7 +821,7 @@ public class Xcls_LeftProps : Object
 
             // my vars (def)
 
-        // ctor 
+        // ctor
         public Xcls_MenuItem9(Xcls_LeftProps _owner )
         {
             _this = _owner;
@@ -779,16 +833,17 @@ public class Xcls_LeftProps : Object
             this.el.tooltip_markup = "how to pack this element onto parent, (method, 2nd arg, 3rd arg) .. the 1st argument is filled by the element";
             this.el.label = "pack: Pack method (Vala)";
 
-            // listeners 
+            //listeners
             this.el.activate.connect( ( ) => {
             
                 _this.addProp( "prop", "pack","add", "*");
             });
         }
 
-        // user defined functions 
+        // user defined functions
     }
-    public class Xcls_MenuItem10 : Object 
+
+    public class Xcls_MenuItem10 : Object
     {
         public Gtk.MenuItem el;
         private Xcls_LeftProps  _this;
@@ -796,7 +851,7 @@ public class Xcls_LeftProps : Object
 
             // my vars (def)
 
-        // ctor 
+        // ctor
         public Xcls_MenuItem10(Xcls_LeftProps _owner )
         {
             _this = _owner;
@@ -806,18 +861,19 @@ public class Xcls_LeftProps : Object
 
             // set gobject values
             this.el.tooltip_markup = "eg. \n\nnew Clutter.Image.from_file(.....)";
-            this.el.label = "ctor: Alterative to default contructor";
+            this.el.label = "ctor: Alterative to default contructor (Vala)";
 
-            // listeners 
+            //listeners
             this.el.activate.connect( ( ) => {
             
                 _this.addProp( "prop", "ctor","", "*");
             });
         }
 
-        // user defined functions 
+        // user defined functions
     }
-    public class Xcls_MenuItem11 : Object 
+
+    public class Xcls_MenuItem11 : Object
     {
         public Gtk.MenuItem el;
         private Xcls_LeftProps  _this;
@@ -825,7 +881,7 @@ public class Xcls_LeftProps : Object
 
             // my vars (def)
 
-        // ctor 
+        // ctor
         public Xcls_MenuItem11(Xcls_LeftProps _owner )
         {
             _this = _owner;
@@ -837,16 +893,46 @@ public class Xcls_LeftProps : Object
             this.el.tooltip_markup = "This code is called after the ctor";
             this.el.label = "init: initialziation code (vala)";
 
-            // listeners 
+            //listeners
             this.el.activate.connect( ( ) => {
             
                 _this.addProp( "prop",  "init", "{\n\n}\n", "*" );
             });
         }
 
-        // user defined functions 
+        // user defined functions
     }
-    public class Xcls_SeparatorMenuItem12 : Object 
+
+    public class Xcls_MenuItem12 : Object
+    {
+        public Gtk.MenuItem el;
+        private Xcls_LeftProps  _this;
+
+
+            // my vars (def)
+
+        // ctor
+        public Xcls_MenuItem12(Xcls_LeftProps _owner )
+        {
+            _this = _owner;
+            this.el = new Gtk.MenuItem();
+
+            // my vars (dec)
+
+            // set gobject values
+            this.el.tooltip_markup = "set the cms-id for this element, when converted to javascript, the html value will be wrapped with Pman.Cms.content({cms-id},{original-html})\n";
+            this.el.label = "cms-id: (Roo JS/Pman library)";
+
+            //listeners
+            this.el.activate.connect( ()  => {
+                _this.addProp( "prop", "cms-id", "", "string");
+            });
+        }
+
+        // user defined functions
+    }
+
+    public class Xcls_SeparatorMenuItem13 : Object
     {
         public Gtk.SeparatorMenuItem el;
         private Xcls_LeftProps  _this;
@@ -854,8 +940,8 @@ public class Xcls_LeftProps : Object
 
             // my vars (def)
 
-        // ctor 
-        public Xcls_SeparatorMenuItem12(Xcls_LeftProps _owner )
+        // ctor
+        public Xcls_SeparatorMenuItem13(Xcls_LeftProps _owner )
         {
             _this = _owner;
             this.el = new Gtk.SeparatorMenuItem();
@@ -865,9 +951,10 @@ public class Xcls_LeftProps : Object
             // set gobject values
         }
 
-        // user defined functions 
+        // user defined functions
     }
-    public class Xcls_MenuItem13 : Object 
+
+    public class Xcls_MenuItem14 : Object
     {
         public Gtk.MenuItem el;
         private Xcls_LeftProps  _this;
@@ -875,8 +962,8 @@ public class Xcls_LeftProps : Object
 
             // my vars (def)
 
-        // ctor 
-        public Xcls_MenuItem13(Xcls_LeftProps _owner )
+        // ctor
+        public Xcls_MenuItem14(Xcls_LeftProps _owner )
         {
             _this = _owner;
             this.el = new Gtk.MenuItem();
@@ -887,7 +974,7 @@ public class Xcls_LeftProps : Object
             this.el.tooltip_markup = "Add a user defined string property";
             this.el.label = "String";
 
-            // listeners 
+            //listeners
             this.el.activate.connect( (self) => {
             
                 _this.addProp( "prop", "XXXX", "","string");
@@ -895,9 +982,10 @@ public class Xcls_LeftProps : Object
             });
         }
 
-        // user defined functions 
+        // user defined functions
     }
-    public class Xcls_MenuItem14 : Object 
+
+    public class Xcls_MenuItem15 : Object
     {
         public Gtk.MenuItem el;
         private Xcls_LeftProps  _this;
@@ -905,8 +993,8 @@ public class Xcls_LeftProps : Object
 
             // my vars (def)
 
-        // ctor 
-        public Xcls_MenuItem14(Xcls_LeftProps _owner )
+        // ctor
+        public Xcls_MenuItem15(Xcls_LeftProps _owner )
         {
             _this = _owner;
             this.el = new Gtk.MenuItem();
@@ -917,16 +1005,17 @@ public class Xcls_LeftProps : Object
             this.el.tooltip_markup = "Add a user defined number property";
             this.el.label = "Number";
 
-            // listeners 
+            //listeners
             this.el.activate.connect( ( ) =>{
             
                 _this.addProp("prop",  "XXX", "0", "int");
             });
         }
 
-        // user defined functions 
+        // user defined functions
     }
-    public class Xcls_MenuItem15 : Object 
+
+    public class Xcls_MenuItem16 : Object
     {
         public Gtk.MenuItem el;
         private Xcls_LeftProps  _this;
@@ -934,8 +1023,8 @@ public class Xcls_LeftProps : Object
 
             // my vars (def)
 
-        // ctor 
-        public Xcls_MenuItem15(Xcls_LeftProps _owner )
+        // ctor
+        public Xcls_MenuItem16(Xcls_LeftProps _owner )
         {
             _this = _owner;
             this.el = new Gtk.MenuItem();
@@ -946,16 +1035,17 @@ public class Xcls_LeftProps : Object
             this.el.tooltip_markup = "Add a user defined boolean property";
             this.el.label = "Boolean";
 
-            // listeners 
+            //listeners
             this.el.activate.connect( ( ) =>{
             
                 _this.addProp( "prop", "XXX", "true", "bool");
             });
         }
 
-        // user defined functions 
+        // user defined functions
     }
-    public class Xcls_SeparatorMenuItem16 : Object 
+
+    public class Xcls_SeparatorMenuItem17 : Object
     {
         public Gtk.SeparatorMenuItem el;
         private Xcls_LeftProps  _this;
@@ -963,8 +1053,8 @@ public class Xcls_LeftProps : Object
 
             // my vars (def)
 
-        // ctor 
-        public Xcls_SeparatorMenuItem16(Xcls_LeftProps _owner )
+        // ctor
+        public Xcls_SeparatorMenuItem17(Xcls_LeftProps _owner )
         {
             _this = _owner;
             this.el = new Gtk.SeparatorMenuItem();
@@ -974,9 +1064,10 @@ public class Xcls_LeftProps : Object
             // set gobject values
         }
 
-        // user defined functions 
+        // user defined functions
     }
-    public class Xcls_MenuItem17 : Object 
+
+    public class Xcls_MenuItem18 : Object
     {
         public Gtk.MenuItem el;
         private Xcls_LeftProps  _this;
@@ -984,8 +1075,8 @@ public class Xcls_LeftProps : Object
 
             // my vars (def)
 
-        // ctor 
-        public Xcls_MenuItem17(Xcls_LeftProps _owner )
+        // ctor
+        public Xcls_MenuItem18(Xcls_LeftProps _owner )
         {
             _this = _owner;
             this.el = new Gtk.MenuItem();
@@ -996,16 +1087,17 @@ public class Xcls_LeftProps : Object
             this.el.tooltip_markup = "Add a user function boolean property";
             this.el.label = "Javascript Function";
 
-            // listeners 
+            //listeners
             this.el.activate.connect( ( ) =>{
             
                 _this.addProp("prop",  "XXXX", "function() { }", "| function");
             });
         }
 
-        // user defined functions 
+        // user defined functions
     }
-    public class Xcls_MenuItem18 : Object 
+
+    public class Xcls_MenuItem19 : Object
     {
         public Gtk.MenuItem el;
         private Xcls_LeftProps  _this;
@@ -1013,8 +1105,8 @@ public class Xcls_LeftProps : Object
 
             // my vars (def)
 
-        // ctor 
-        public Xcls_MenuItem18(Xcls_LeftProps _owner )
+        // ctor
+        public Xcls_MenuItem19(Xcls_LeftProps _owner )
         {
             _this = _owner;
             this.el = new Gtk.MenuItem();
@@ -1025,16 +1117,17 @@ public class Xcls_LeftProps : Object
             this.el.tooltip_markup = "Add a user function boolean property";
             this.el.label = "Vala Method";
 
-            // listeners 
+            //listeners
             this.el.activate.connect( ( ) =>{
             
                 _this.addProp( "prop", "XXXX", "() {\n\n}\n", "| return_type");
             });
         }
 
-        // user defined functions 
+        // user defined functions
     }
-    public class Xcls_MenuItem19 : Object 
+
+    public class Xcls_MenuItem20 : Object
     {
         public Gtk.MenuItem el;
         private Xcls_LeftProps  _this;
@@ -1042,8 +1135,8 @@ public class Xcls_LeftProps : Object
 
             // my vars (def)
 
-        // ctor 
-        public Xcls_MenuItem19(Xcls_LeftProps _owner )
+        // ctor
+        public Xcls_MenuItem20(Xcls_LeftProps _owner )
         {
             _this = _owner;
             this.el = new Gtk.MenuItem();
@@ -1054,16 +1147,17 @@ public class Xcls_LeftProps : Object
             this.el.tooltip_markup = "Add a vala signal";
             this.el.label = "Vala Signal";
 
-            // listeners 
+            //listeners
             this.el.activate.connect( ( ) =>{
             
                 _this.addProp( "prop", "XXXX", "()", "@ void");
             });
         }
 
-        // user defined functions 
+        // user defined functions
     }
-    public class Xcls_SeparatorMenuItem20 : Object 
+
+    public class Xcls_SeparatorMenuItem21 : Object
     {
         public Gtk.SeparatorMenuItem el;
         private Xcls_LeftProps  _this;
@@ -1071,8 +1165,8 @@ public class Xcls_LeftProps : Object
 
             // my vars (def)
 
-        // ctor 
-        public Xcls_SeparatorMenuItem20(Xcls_LeftProps _owner )
+        // ctor
+        public Xcls_SeparatorMenuItem21(Xcls_LeftProps _owner )
         {
             _this = _owner;
             this.el = new Gtk.SeparatorMenuItem();
@@ -1082,9 +1176,10 @@ public class Xcls_LeftProps : Object
             // set gobject values
         }
 
-        // user defined functions 
+        // user defined functions
     }
-    public class Xcls_MenuItem21 : Object 
+
+    public class Xcls_MenuItem22 : Object
     {
         public Gtk.MenuItem el;
         private Xcls_LeftProps  _this;
@@ -1092,8 +1187,8 @@ public class Xcls_LeftProps : Object
 
             // my vars (def)
 
-        // ctor 
-        public Xcls_MenuItem21(Xcls_LeftProps _owner )
+        // ctor
+        public Xcls_MenuItem22(Xcls_LeftProps _owner )
         {
             _this = _owner;
             this.el = new Gtk.MenuItem();
@@ -1101,19 +1196,20 @@ public class Xcls_LeftProps : Object
             // my vars (dec)
 
             // set gobject values
-            this.el.tooltip_markup = "Add a flexy foreach (for HTML templates)";
-            this.el.label = "Flexy - Foreach";
+            this.el.tooltip_markup = "Add a flexy if (for HTML templates)";
+            this.el.label = "Flexy - If";
 
-            // listeners 
+            //listeners
             this.el.activate.connect( ( ) =>{
             
-                _this.addProp("prop",  "flexy:foreach", "array,key,value", "string");
+                _this.addProp("prop",  "flexy:if", "value_or_condition", "string");
             });
         }
 
-        // user defined functions 
+        // user defined functions
     }
-    public class Xcls_MenuItem22 : Object 
+
+    public class Xcls_MenuItem23 : Object
     {
         public Gtk.MenuItem el;
         private Xcls_LeftProps  _this;
@@ -1121,8 +1217,38 @@ public class Xcls_LeftProps : Object
 
             // my vars (def)
 
-        // ctor 
-        public Xcls_MenuItem22(Xcls_LeftProps _owner )
+        // ctor
+        public Xcls_MenuItem23(Xcls_LeftProps _owner )
+        {
+            _this = _owner;
+            this.el = new Gtk.MenuItem();
+
+            // my vars (dec)
+
+            // set gobject values
+            this.el.tooltip_markup = "Add a flexy include (for HTML templates)";
+            this.el.label = "Flexy - Include";
+
+            //listeners
+            this.el.activate.connect( ( ) =>{
+            
+                _this.addProp("prop",  "flexy:include", "name_of_file.html", "string");
+            });
+        }
+
+        // user defined functions
+    }
+
+    public class Xcls_MenuItem24 : Object
+    {
+        public Gtk.MenuItem el;
+        private Xcls_LeftProps  _this;
+
+
+            // my vars (def)
+
+        // ctor
+        public Xcls_MenuItem24(Xcls_LeftProps _owner )
         {
             _this = _owner;
             this.el = new Gtk.MenuItem();
@@ -1133,16 +1259,20 @@ public class Xcls_LeftProps : Object
             this.el.tooltip_markup = "Add a flexy foreach (for HTML templates)";
             this.el.label = "Flexy - Foreach";
 
-            // listeners 
+            //listeners
             this.el.activate.connect( ( ) =>{
             
                 _this.addProp("prop",  "flexy:foreach", "array,key,value", "string");
             });
         }
 
-        // user defined functions 
+        // user defined functions
     }
-    public class Xcls_EditProps : Object 
+
+
+
+
+    public class Xcls_EditProps : Object
     {
         public Gtk.ScrolledWindow el;
         private Xcls_LeftProps  _this;
@@ -1151,7 +1281,7 @@ public class Xcls_LeftProps : Object
             // my vars (def)
         public bool editing;
 
-        // ctor 
+        // ctor
         public Xcls_EditProps(Xcls_LeftProps _owner )
         {
             _this = _owner;
@@ -1167,7 +1297,7 @@ public class Xcls_LeftProps : Object
             child_0.ref();
             this.el.add (  child_0.el  );
 
-            // init method 
+            // init method
 
             {
               
@@ -1175,17 +1305,18 @@ public class Xcls_LeftProps : Object
             }
         }
 
-        // user defined functions 
+        // user defined functions
     }
-    public class Xcls_view : Object 
+    public class Xcls_view : Object
     {
         public Gtk.TreeView el;
         private Xcls_LeftProps  _this;
 
 
             // my vars (def)
+        public Xcls_PopoverProperty popover;
 
-        // ctor 
+        // ctor
         public Xcls_view(Xcls_LeftProps _owner )
         {
             _this = _owner;
@@ -1193,6 +1324,7 @@ public class Xcls_LeftProps : Object
             this.el = new Gtk.TreeView();
 
             // my vars (dec)
+            this.popover = null;
 
             // set gobject values
             this.el.tooltip_column = 5;
@@ -1210,7 +1342,7 @@ public class Xcls_LeftProps : Object
             var child_3 = new Xcls_ContextMenu( _this );
             child_3.ref();
 
-            // init method 
+            // init method
 
             {
                 var selection = this.el.get_selection();
@@ -1218,11 +1350,11 @@ public class Xcls_LeftProps : Object
             
             
                 var description = new Pango.FontDescription();
-                description.set_size(8000);
-                this.el.modify_font(description);
+                description.set_size(10000);
+                this.el.override_font(description);
             }
 
-            // listeners 
+            //listeners
             this.el.button_press_event.connect( ( ev)  => {
              
                 Gtk.TreeViewColumn col;
@@ -1240,21 +1372,38 @@ public class Xcls_LeftProps : Object
                     return false; //not on a element.
                 }
                 
-                
-                 // right click.
+                 
+                 // double click on name..
                  if (ev.type == Gdk.EventType.2BUTTON_PRESS  && ev.button == 1 && col.title == "Name") {    
                     // show popup!.   
                     
+                     if (this.popover == null) {
+                                  this.popover = new Xcls_PopoverProperty();
+                                  this.popover.mainwindow = _this.main_window;
+                       }
+                       
              
                      _this.before_edit();
-                     
+                      _this.stop_editor();
+                         
                      _this.keyrender.el.stop_editing(false);
                      _this.keyrender.el.editable  =false;
                 
                      _this.valrender.el.stop_editing(false);
                      _this.valrender.el.editable  =false;
+                     Gtk.TreeIter iter;
+                      var mod = this.el.get_model();
+                         mod.get_iter (out iter, path);
+                         
+                   
+                       GLib.Value gvaltype, gval;
+                       mod.get_value(iter, 1 , out gval); // one is key..
+                       
+                    mod.get_value(iter,0, out gvaltype);
+            
+                    this.popover.show(this.el, _this.node, (string)gvaltype, (string)gval);
                        
-                      _this.startEditingKey(path); 
+                    //  _this.startEditingKey(path); 
                      
                     return false;
                 }
@@ -1323,9 +1472,9 @@ public class Xcls_LeftProps : Object
             });
         }
 
-        // user defined functions 
+        // user defined functions
     }
-    public class Xcls_model : Object 
+    public class Xcls_model : Object
     {
         public Gtk.TreeStore el;
         private Xcls_LeftProps  _this;
@@ -1333,7 +1482,7 @@ public class Xcls_LeftProps : Object
 
             // my vars (def)
 
-        // ctor 
+        // ctor
         public Xcls_model(Xcls_LeftProps _owner )
         {
             _this = _owner;
@@ -1352,9 +1501,10 @@ public class Xcls_LeftProps : Object
             // set gobject values
         }
 
-        // user defined functions 
+        // user defined functions
     }
-    public class Xcls_keycol : Object 
+
+    public class Xcls_keycol : Object
     {
         public Gtk.TreeViewColumn el;
         private Xcls_LeftProps  _this;
@@ -1362,7 +1512,7 @@ public class Xcls_LeftProps : Object
 
             // my vars (def)
 
-        // ctor 
+        // ctor
         public Xcls_keycol(Xcls_LeftProps _owner )
         {
             _this = _owner;
@@ -1378,15 +1528,15 @@ public class Xcls_LeftProps : Object
             child_0.ref();
             this.el.pack_start (  child_0.el , false );
 
-            // init method 
+            // init method
 
             this.el.add_attribute(_this.keyrender.el , "markup", 2 );
              this.el.add_attribute(_this.keyrender.el , "text", 1 );
         }
 
-        // user defined functions 
+        // user defined functions
     }
-    public class Xcls_keyrender : Object 
+    public class Xcls_keyrender : Object
     {
         public Gtk.CellRendererText el;
         private Xcls_LeftProps  _this;
@@ -1394,7 +1544,7 @@ public class Xcls_LeftProps : Object
 
             // my vars (def)
 
-        // ctor 
+        // ctor
         public Xcls_keyrender(Xcls_LeftProps _owner )
         {
             _this = _owner;
@@ -1405,7 +1555,7 @@ public class Xcls_LeftProps : Object
 
             // set gobject values
 
-            // listeners 
+            //listeners
             this.el.editing_started.connect( (  editable, path) => {
             
                  Gtk.TreeIter  iter;
@@ -1449,7 +1599,7 @@ public class Xcls_LeftProps : Object
                         case "listener":
                             var ov = _this.node.listeners.get(oldval);
                             _this.node.listeners.set(newtext, ov);
-                            _this.node.listeners.remove(oldval);
+                            _this.node.listeners.unset(oldval);
                             
                             _this.updateIter(iter,  ktype, newtext, ov);
                             
@@ -1457,7 +1607,7 @@ public class Xcls_LeftProps : Object
                         case "props":
                             var ov = _this.node.props.get(oldval);
                             _this.node.props.set(newtext, ov);
-                            _this.node.props.remove(oldval);
+                            _this.node.props.unset(oldval);
                             _this.updateIter(iter,  ktype, newtext, ov);
                             break;
                      }
@@ -1466,9 +1616,11 @@ public class Xcls_LeftProps : Object
             });
         }
 
-        // user defined functions 
+        // user defined functions
     }
-    public class Xcls_valcol : Object 
+
+
+    public class Xcls_valcol : Object
     {
         public Gtk.TreeViewColumn el;
         private Xcls_LeftProps  _this;
@@ -1476,7 +1628,7 @@ public class Xcls_LeftProps : Object
 
             // my vars (def)
 
-        // ctor 
+        // ctor
         public Xcls_valcol(Xcls_LeftProps _owner )
         {
             _this = _owner;
@@ -1492,7 +1644,7 @@ public class Xcls_LeftProps : Object
             child_0.ref();
             this.el.pack_start (  child_0.el , true );
 
-            // init method 
+            // init method
 
             {
                
@@ -1512,9 +1664,9 @@ public class Xcls_LeftProps : Object
             }
         }
 
-        // user defined functions 
+        // user defined functions
     }
-    public class Xcls_valrender : Object 
+    public class Xcls_valrender : Object
     {
         public Gtk.CellRendererCombo el;
         private Xcls_LeftProps  _this;
@@ -1522,7 +1674,7 @@ public class Xcls_LeftProps : Object
 
             // my vars (def)
 
-        // ctor 
+        // ctor
         public Xcls_valrender(Xcls_LeftProps _owner )
         {
             _this = _owner;
@@ -1539,7 +1691,7 @@ public class Xcls_LeftProps : Object
             child_0.ref();
             this.el.model = child_0.el;
 
-            // listeners 
+            //listeners
             this.el.editing_started.connect( ( editable, path) => {
                 //_this.editing = true;
                 print("editing started called\n");
@@ -1554,7 +1706,7 @@ public class Xcls_LeftProps : Object
                  _this.allow_edit =false;
                 
                
-                 if (       this.el.has_entry ) {
+                 if (  this.el.has_entry ) {
                
                      Gtk.TreeIter  iter;
                     _this.model.el.get_iter(out iter, new Gtk.TreePath.from_string(path));
@@ -1569,8 +1721,8 @@ public class Xcls_LeftProps : Object
                     var val = (string)gval;
                     var combo =        (Gtk.ComboBox)editable;
             
-                   var entry =  (Gtk.Entry) combo.get_child();        
-                entry.set_text(val);
+                    var entry =  (Gtk.Entry) combo.get_child();        
+                    entry.set_text(val);
                 }
                
             });
@@ -1621,7 +1773,7 @@ public class Xcls_LeftProps : Object
             });
         }
 
-        // user defined functions 
+        // user defined functions
         public              void setOptions (string[] ar) {
               var m = _this.valrendermodel.el;
                 m.clear();
@@ -1633,7 +1785,7 @@ public class Xcls_LeftProps : Object
         
         }
     }
-    public class Xcls_valrendermodel : Object 
+    public class Xcls_valrendermodel : Object
     {
         public Gtk.ListStore el;
         private Xcls_LeftProps  _this;
@@ -1641,7 +1793,7 @@ public class Xcls_LeftProps : Object
 
             // my vars (def)
 
-        // ctor 
+        // ctor
         public Xcls_valrendermodel(Xcls_LeftProps _owner )
         {
             _this = _owner;
@@ -1653,9 +1805,12 @@ public class Xcls_LeftProps : Object
             // set gobject values
         }
 
-        // user defined functions 
+        // user defined functions
     }
-    public class Xcls_ContextMenu : Object 
+
+
+
+    public class Xcls_ContextMenu : Object
     {
         public Gtk.Menu el;
         private Xcls_LeftProps  _this;
@@ -1663,7 +1818,7 @@ public class Xcls_LeftProps : Object
 
             // my vars (def)
 
-        // ctor 
+        // ctor
         public Xcls_ContextMenu(Xcls_LeftProps _owner )
         {
             _this = _owner;
@@ -1673,20 +1828,20 @@ public class Xcls_LeftProps : Object
             // my vars (dec)
 
             // set gobject values
-            var child_0 = new Xcls_MenuItem32( _this );
+            var child_0 = new Xcls_MenuItem34( _this );
             child_0.ref();
             this.el.append (  child_0.el  );
-            var child_1 = new Xcls_SeparatorMenuItem33( _this );
+            var child_1 = new Xcls_SeparatorMenuItem35( _this );
             child_1.ref();
             this.el.append (  child_1.el  );
-            var child_2 = new Xcls_MenuItem34( _this );
+            var child_2 = new Xcls_MenuItem36( _this );
             child_2.ref();
             this.el.append (  child_2.el  );
         }
 
-        // user defined functions 
+        // user defined functions
     }
-    public class Xcls_MenuItem32 : Object 
+    public class Xcls_MenuItem34 : Object
     {
         public Gtk.MenuItem el;
         private Xcls_LeftProps  _this;
@@ -1694,8 +1849,8 @@ public class Xcls_LeftProps : Object
 
             // my vars (def)
 
-        // ctor 
-        public Xcls_MenuItem32(Xcls_LeftProps _owner )
+        // ctor
+        public Xcls_MenuItem34(Xcls_LeftProps _owner )
         {
             _this = _owner;
             this.el = new Gtk.MenuItem();
@@ -1703,22 +1858,49 @@ public class Xcls_LeftProps : Object
             // my vars (dec)
 
             // set gobject values
-            this.el.label = "Edit";
+            this.el.label = "Edit (double click)";
 
-            // listeners 
+            //listeners
             this.el.activate.connect( ( )  =>{
               
                 var s = _this.view.el.get_selection();
                 Gtk.TreeIter iter;
-                Gtk.TreeModel model;
-                s.get_selected (out  model, out  iter);
-                _this.startEditingKey(model.get_path(iter));
+                Gtk.TreeModel mod;
+                s.get_selected (out  mod, out  iter);
+                
+                  if (_this.view.popover == null) {
+                                  _this.view.popover = new Xcls_PopoverProperty();
+                                  _this.view.popover.mainwindow = _this.main_window;
+                       }
+                       
+             
+                  _this.before_edit();
+                  _this.stop_editor();
+                 
+                 _this.keyrender.el.stop_editing(false);
+                 _this.keyrender.el.editable  =false;
+            
+                 _this.valrender.el.stop_editing(false);
+                 _this.valrender.el.editable  =false;
+                 
+                  
+               GLib.Value gvaltype, gval;
+               mod.get_value(iter, 1 , out gval); // one is key..
+               
+                 mod.get_value(iter,0, out gvaltype);
+            
+               _this.view.popover.show(_this.view.el, _this.node, (string)gvaltype, (string)gval);
+                   
+                
+                
+               // _this.startEditingKey(model.get_path(iter));
             });
         }
 
-        // user defined functions 
+        // user defined functions
     }
-    public class Xcls_SeparatorMenuItem33 : Object 
+
+    public class Xcls_SeparatorMenuItem35 : Object
     {
         public Gtk.SeparatorMenuItem el;
         private Xcls_LeftProps  _this;
@@ -1726,8 +1908,8 @@ public class Xcls_LeftProps : Object
 
             // my vars (def)
 
-        // ctor 
-        public Xcls_SeparatorMenuItem33(Xcls_LeftProps _owner )
+        // ctor
+        public Xcls_SeparatorMenuItem35(Xcls_LeftProps _owner )
         {
             _this = _owner;
             this.el = new Gtk.SeparatorMenuItem();
@@ -1737,9 +1919,10 @@ public class Xcls_LeftProps : Object
             // set gobject values
         }
 
-        // user defined functions 
+        // user defined functions
     }
-    public class Xcls_MenuItem34 : Object 
+
+    public class Xcls_MenuItem36 : Object
     {
         public Gtk.MenuItem el;
         private Xcls_LeftProps  _this;
@@ -1747,8 +1930,8 @@ public class Xcls_LeftProps : Object
 
             // my vars (def)
 
-        // ctor 
-        public Xcls_MenuItem34(Xcls_LeftProps _owner )
+        // ctor
+        public Xcls_MenuItem36(Xcls_LeftProps _owner )
         {
             _this = _owner;
             this.el = new Gtk.MenuItem();
@@ -1758,12 +1941,16 @@ public class Xcls_LeftProps : Object
             // set gobject values
             this.el.label = "Delete";
 
-            // listeners 
+            //listeners
             this.el.activate.connect( ( )  =>{
                _this.deleteSelected();
             });
         }
 
-        // user defined functions 
+        // user defined functions
     }
+
+
+
+
 }