src/Builder4/WindowLeftProps.bjs
[app.Builder.js] / src / Builder4 / WindowLeftProps.vala
1 static Xcls_LeftProps  _LeftProps;
2
3 public class Xcls_LeftProps : Object 
4 {
5     public Gtk.VBox el;
6     private Xcls_LeftProps  _this;
7
8     public static Xcls_LeftProps singleton()
9     {
10         if (_LeftProps == null) {
11             _LeftProps= new Xcls_LeftProps();
12         }
13         return _LeftProps;
14     }
15     public Xcls_AddPropertyPopup AddPropertyPopup;
16     public Xcls_EditProps EditProps;
17     public Xcls_view view;
18     public Xcls_model model;
19     public Xcls_keycol keycol;
20     public Xcls_keyrender keyrender;
21     public Xcls_valcol valcol;
22     public Xcls_valrender valrender;
23     public Xcls_valrendermodel valrendermodel;
24     public Xcls_ContextMenu ContextMenu;
25
26         // my vars (def)
27     public bool allow_edit;
28     public JsRender.JsRender file;
29     public signal bool stop_editor ();
30     public signal void show_editor (JsRender.JsRender file, JsRender.Node node, string type, string key);
31     public signal void changed ();
32     public signal void show_add_props (string type);
33     public Xcls_MainWindow main_window;
34     public JsRender.Node node;
35
36     // ctor 
37     public Xcls_LeftProps()
38     {
39         _this = this;
40         this.el = new Gtk.VBox( false   , 0 );
41
42         // my vars (dec)
43         this.allow_edit = false;
44         this.main_window = null;
45
46         // set gobject values
47         var child_0 = new Xcls_HBox2( _this );
48         child_0.ref();
49         this.el.pack_start (  child_0.el , false,true,0 );
50         var child_1 = new Xcls_EditProps( _this );
51         child_1.ref();
52         this.el.pack_end (  child_1.el , true,true,0 );
53     }
54
55     // user defined functions 
56     public              void before_edit ()
57     {
58     
59         print("before edit - stop editing\n");
60         
61       // these do not appear to trigger save...
62         _this.keyrender.el.stop_editing(false);
63         _this.keyrender.el.editable  =false;
64     
65         _this.valrender.el.stop_editing(false);
66         _this.valrender.el.editable  =false;    
67         
68         
69     // technicall stop the popup editor..
70     
71     }
72     public              string keySortFormat (string key) {
73         // listeners first - with 0
74         // specials
75         if (key[0] == '*') {
76             return "1 " + key;
77         }
78         // functions
79         
80         var bits = key.split(" ");
81         
82         if (key[0] == '|') {
83             return "2 " + bits[bits.length -1];
84         }
85         // signals
86         if (key[0] == '@') {
87             return "3 " + bits[bits.length -1];
88         }
89             
90         // props
91         if (key[0] == '#') {
92             return "4 " + bits[bits.length -1];
93         }
94         // the rest..
95         return "5 " + bits[bits.length -1];    
96     
97     
98     
99     }
100     public              void finish_editing () {
101          // 
102         this.before_edit();
103     }
104     public              bool startEditingValue ( Gtk.TreePath path) {
105     
106         // ONLY return true if editing is allowed - eg. combo..
107         
108                 print("start editing?\n");
109                 if (!this.stop_editor()) {
110                     print("stop editor failed\n");
111                     return false;
112                 }
113                 
114                 Gtk.TreeIter iter;
115     
116                 var mod = this.model.el;
117                 mod.get_iter (out iter, path);
118                  
119                 /*
120                     m.set(iter, 
121                             0, "listener",
122                             1, miter.get_key(),
123                             2, "<b>" + miter.get_key() + "</b>",
124                             3, miter.get_value()
125                         ); 
126                  
127                 */
128                 GLib.Value gval;
129                 mod.get_value(iter, 3 , out gval);
130                 var val = (string)gval;
131             
132                 mod.get_value(iter, 1 , out gval);
133                 var key = (string)gval;
134                 var type_ar = key.split(" ");
135                 
136                 string kname, kflag, ktype;
137                 this.node.normalize_key(key, out kname, out kflag, out ktype);
138                  
139                 
140                 mod.get_value(iter, 0 , out gval);
141                 var type = (string)gval; // listerner or prop..
142                 
143                
144                 
145                 var use_textarea = false;
146     
147                 //------------ things that require the text editor...
148                 
149                 if (type == "listener") {
150                     use_textarea = true;
151                 }
152                 if (key.length > 0 && key[0] == '|') { // user defined method
153                     use_textarea = true;
154                 }
155                 if (key.length > 0 && key[0] == '$') { // raw string
156                     use_textarea = true;
157                 }
158                 if (key.length > 0 && key == "* init") {
159                     use_textarea = true;
160                 }
161                 if (val.length > 40) { // long value...
162                     use_textarea = true;
163                 }
164                 
165                 
166                 
167                 if (use_textarea) {
168                     print("Call show editor\n");
169                     GLib.Timeout.add_full(GLib.Priority.DEFAULT,10 , () => {
170                         this.view.el.get_selection().select_path(path);
171                         
172                         this.show_editor(file, node, type, key);
173                         
174                         return false;
175                     });
176                    
177                     
178                     return false;
179                 }
180                 // others... - fill in options for true/false?
181                 print("turn on editing %s \n" , mod.get_path(iter).to_string());
182                
183                    print (ktype.up());
184                     if (ktype.length > 0 && (
185                             ktype.up() == "BOOLEAN"
186                             ||
187                             ktype.up() == "BOOL"                        
188                         )) {
189                             print("start editing try/false)???");
190                             this.valrender.el.has_entry = false;
191                             string[] opts =  { "true", "false" };
192                             this.valrender.setOptions(opts);
193                             
194                             this.valrender.el.has_entry = false;
195                             this.valrender.el.editable = true;
196                              this.allow_edit  = true;
197                              GLib.Timeout.add_full(GLib.Priority.DEFAULT,100 , () => {
198                                  this.view.el.set_cursor_on_cell(
199                                     path,
200                                     this.valcol.el,
201                                     this.valrender.el,
202                                     true
203                                 );
204                                 return false;
205                             });
206                             return true;
207                     }
208                                           
209                    // see if type is a Enum.
210                    
211                    
212                 var pal = Palete.Palete.factory(this.file.project.xtype);
213                 
214                 
215                     
216                
217                  string[] opts =  {  };
218                 this.valrender.setOptions(opts);
219                
220                GLib.Timeout.add_full(GLib.Priority.DEFAULT,10 , () => {
221                     
222                     // at this point - work out the type...
223                     // if its' a combo... then show the options..
224                     this.valrender.el.has_entry = true;
225                     
226                     this.valrender.el.editable = true;            
227                 
228                     
229                     this.allow_edit  = true;
230                     
231                     
232                     
233                     
234     
235                     this.view.el.set_cursor_on_cell(
236                         path,
237                         this.valcol.el,
238                         this.valrender.el,
239                         true
240                     );
241                     return false;
242                 });
243                 return false;
244             }
245     public              void load (JsRender.JsRender file, JsRender.Node? node) 
246     {
247         print("load leftprops\n");
248         this.before_edit();
249         this.node = node;
250         this.file = file;
251         
252      
253         this.model.el.clear();
254                   
255         //this.get('/RightEditor').el.hide();
256         if (node ==null) {
257             return ;
258         }
259          
260         
261     
262         //var provider = this.get('/LeftTree').getPaleteProvider();
263         Gtk.TreeIter iter;
264         
265         //typeof(string),  // 0 key type
266          //typeof(string),  // 1 key
267          //typeof(string),  // 2 key (display)
268          //typeof(string),  // 3 value
269          //typeof(string),  // 4 value (display)
270          //typeof(string),  // 5 both (tooltip)
271         
272         
273         
274         
275         // really need a way to sort the hashmap...
276         var m = this.model.el;
277         
278         var miter = node.listeners.map_iterator();
279         var i = 0;
280         
281         while(miter.next()) {
282             i++;
283             m.append(out iter,null);
284             
285             this.updateIter(iter,  "listener", miter.get_key(), miter.get_value());
286             
287              
288          }
289          
290           
291         miter = node.props.map_iterator();
292         
293         
294        while(miter.next()) {
295                i++;
296             m.append(out iter,null);
297              this.updateIter(iter,  "prop", miter.get_key(), miter.get_value());
298              
299        }
300        print("clear selection\n");
301        // clear selection?
302        this.model.el.set_sort_column_id(6,Gtk.SortType.ASCENDING); // sort by real key..
303        
304        this.view.el.get_selection().unselect_all();
305        
306        var pane = _this.main_window.editpane.el;
307         var try_size = (i * 25) + 60; // est. 20px per line + 40px header
308         
309         // max 80%...
310         pane.set_position( 
311              ((try_size * 1.0f) /  (pane.max_position * 1.0f))  > 0.8f  ? 
312             (int) (pane.max_position * 0.2f) :
313             pane.max_position-try_size);
314         
315        
316     }
317     public              string keyFormat (string val, string type) {
318         
319         // Glib.markup_escape_text(val);
320     
321         if (type == "listener") {
322             return "<span font_weight=\"bold\" color=\"#660000\">" + 
323                 GLib.Markup.escape_text(val) +
324                  "</span>";
325         }
326         // property..
327         if (val.length < 1) {
328             return "<span  color=\"#FF0000\">--empty--</span>";
329         }
330         
331         //@ = signal
332         //$ = property with 
333         //# - object properties
334         //* = special
335         // all of these... - display value is last element..
336         var ar = val.strip().split(" ");
337         
338         
339         var dval = GLib.Markup.escape_text(ar[ar.length-1]);
340         
341         
342         
343         
344         switch(val[0]) {
345             case '@': // signal // just bold balck?
346                 if (dval[0] == '@') {
347                     dval = dval.substring(1);
348                 }
349             
350                 return @"<span  font_weight=\"bold\">@ $dval</span>";        
351             case '#': // object properties?
352                 if (dval[0] == '#') {
353                     dval = dval.substring(1);
354                 }
355                 return @"<span  font_weight=\"bold\">$dval</span>";
356             case '*': // special
357                 if (dval[0] == '*') {
358                     dval = dval.substring(1);
359                 }
360                 return @"<span   color=\"#0000CC\" font_weight=\"bold\">$dval</span>";            
361             case '$':
362                 if (dval[0] == '$') {
363                     dval = dval.substring(1);
364                 }
365                 return @"<span   style=\"italic\">$dval</span>";
366            case '|': // user defined methods
367                 if (dval[0] == '|') {
368                     dval = dval.substring(1);
369                 }
370                 return @"<span color=\"#008000\" font_weight=\"bold\">$dval</span>";
371                 
372                   
373                 
374             default:
375                 return dval;
376         }
377           
378         
379     
380     }
381     public              void deleteSelected () {
382         
383             Gtk.TreeIter iter;
384             Gtk.TreeModel mod;
385             
386             var s = this.view.el.get_selection();
387             s.get_selected(out mod, out iter);
388                  
389                   
390             GLib.Value gval;
391             mod.get_value(iter, 0 , out gval);
392             var type = (string)gval;
393             
394             mod.get_value(iter, 1 , out gval);
395             var key = (string)gval;
396             
397             switch(type) {
398                 case "listener":
399                     this.node.listeners.remove(key);
400                     break;
401                     
402                 case "props":
403                     this.node.props.remove(key);
404                     break;
405             }
406             this.load(this.file, this.node);
407             
408             _this.changed();
409     }
410     public              void startEditingKey ( Gtk.TreePath path) {
411         
412          if (!this.stop_editor()) {
413             return;
414          }
415       
416         // others... - fill in options for true/false?
417         
418            
419         GLib.Timeout.add_full(GLib.Priority.DEFAULT,10 , () => {
420             this.allow_edit  = true;
421             this.keyrender.el.editable = true;
422          
423             this.view.el.set_cursor_on_cell(
424                 path,
425                 this.keycol.el,
426                 this.keyrender.el,
427                 true
428             );
429                    
430             return false;
431         });
432           
433         
434     }
435     public              void addProp (string in_type, string key, string value, string value_type) {
436           // info includes key, val, skel, etype..
437           //console.dump(info);
438             //type = info.type.toLowerCase();
439             //var data = this.toJS();
440               
441         var type = in_type == "signals" ? "listener" : in_type;
442           
443         var fkey = (value_type.length > 0 ? value_type + " " : "") + key;
444                   
445         if (type == "listener") {
446             if (this.node.listeners.has_key(key)) {
447                 return;
448             }
449             this.node.listeners.set(key,value);
450         } else  {
451         
452             if (this.node.props.has_key(fkey)) {
453                 return;
454             }
455             this.node.props.set(fkey,value);
456         }
457                
458           
459         // add a row???
460         this.load(this.file, this.node);
461         
462         
463         
464         /// need to find the row which I've just added..
465         
466         
467         var s = this.view.el.get_selection();
468         s.unselect_all();
469         
470         print("trying to find new iter");
471       
472         this.model.el.foreach((model, path, iter) => {
473             GLib.Value gval;
474         
475             this.model.el.get_value(iter, 0 , out gval);
476             if ((string)gval != type) {
477                 print("not type: %s = %s\n", (string)gval , type);
478                 return false;
479             }
480             this.model.el.get_value(iter, 1 , out gval);
481             if ((string)gval != fkey) {
482                 print("not key: %s = %s\n", (string)gval , fkey);
483                 return false;
484             }
485             // delay this?
486             GLib.Timeout.add_full(GLib.Priority.DEFAULT,40 , () => {
487             
488                 this.startEditingValue(this.model.el.get_path(iter));
489                 return false;
490             });
491             //s.select_iter(iter);
492             return true; 
493         });
494         
495         
496         
497                   
498     }
499     public              void updateIter (Gtk.TreeIter iter,  string type, string key, string value) {
500     
501         print("update Iter %s, %s\n", key,value);
502         //typeof(string),  // 0 key type
503          //typeof(string),  // 1 key
504          //typeof(string),  // 2 key (display)
505          //typeof(string),  // 3 value
506          //typeof(string),  // 4 value (display)
507          //typeof(string),  // 5 both (tooltip)
508          //typeof(string),  // 6 key (sort)
509         
510         var dl = value.strip().split("\n");
511     
512         var dis_val = dl.length > 1 ? (dl[0].strip()+ "...") : dl[0];
513         
514         if (type == "listener") {
515          
516            
517             
518             this.model.el.set(iter, 
519                     0, type,
520                 1, key,
521                 2, this.keyFormat(key ,type),
522                 3, value,
523                 4, dis_val,
524                 5, "<tt>" +  GLib.Markup.escape_text(key + " " +value) + "</tt>",
525                 6,  "0 " + key
526             ); 
527             return;
528         }
529         
530     
531     
532         this.model.el.set(iter, 
533                 0, "props",
534                 1, key,
535                 2,  this.keyFormat(key , "prop"),
536                 3, value,
537                 4, dis_val,
538                  5, "<tt>" + GLib.Markup.escape_text(key + " " + value) + "</tt>",
539                  6,  this.keySortFormat(key)
540             ); 
541     }
542     public class Xcls_HBox2 : Object 
543     {
544         public Gtk.HBox el;
545         private Xcls_LeftProps  _this;
546
547
548             // my vars (def)
549
550         // ctor 
551         public Xcls_HBox2(Xcls_LeftProps _owner )
552         {
553             _this = _owner;
554             this.el = new Gtk.HBox( true, 0 );
555
556             // my vars (dec)
557
558             // set gobject values
559             var child_0 = new Xcls_Button3( _this );
560             child_0.ref();
561             this.el.add (  child_0.el  );
562         }
563
564         // user defined functions 
565     }
566     public class Xcls_Button3 : Object 
567     {
568         public Gtk.Button el;
569         private Xcls_LeftProps  _this;
570
571
572             // my vars (def)
573
574         // ctor 
575         public Xcls_Button3(Xcls_LeftProps _owner )
576         {
577             _this = _owner;
578             this.el = new Gtk.Button();
579
580             // my vars (dec)
581
582             // set gobject values
583             var child_0 = new Xcls_HBox4( _this );
584             child_0.ref();
585             this.el.add (  child_0.el  );
586             var child_1 = new Xcls_AddPropertyPopup( _this );
587             child_1.ref();
588
589             // listeners 
590             this.el.button_press_event.connect( (self, ev) => {
591                 _this.before_edit();
592                 
593                     
594                 var p = _this.AddPropertyPopup;
595                 p.el.set_screen(Gdk.Screen.get_default());
596                 p.el.show_all();
597                  p.el.popup(null, null, null, ev.button, ev.time);
598                  return true;
599             });
600         }
601
602         // user defined functions 
603     }
604     public class Xcls_HBox4 : Object 
605     {
606         public Gtk.HBox el;
607         private Xcls_LeftProps  _this;
608
609
610             // my vars (def)
611
612         // ctor 
613         public Xcls_HBox4(Xcls_LeftProps _owner )
614         {
615             _this = _owner;
616             this.el = new Gtk.HBox( true, 0 );
617
618             // my vars (dec)
619
620             // set gobject values
621             var child_0 = new Xcls_Image5( _this );
622             child_0.ref();
623             this.el.add (  child_0.el  );
624             var child_1 = new Xcls_Label6( _this );
625             child_1.ref();
626             this.el.add (  child_1.el  );
627         }
628
629         // user defined functions 
630     }
631     public class Xcls_Image5 : Object 
632     {
633         public Gtk.Image el;
634         private Xcls_LeftProps  _this;
635
636
637             // my vars (def)
638
639         // ctor 
640         public Xcls_Image5(Xcls_LeftProps _owner )
641         {
642             _this = _owner;
643             this.el = new Gtk.Image();
644
645             // my vars (dec)
646
647             // set gobject values
648             this.el.stock = Gtk.STOCK_ADD;
649             this.el.icon_size = Gtk.IconSize.MENU;
650         }
651
652         // user defined functions 
653     }
654     public class Xcls_Label6 : Object 
655     {
656         public Gtk.Label el;
657         private Xcls_LeftProps  _this;
658
659
660             // my vars (def)
661
662         // ctor 
663         public Xcls_Label6(Xcls_LeftProps _owner )
664         {
665             _this = _owner;
666             this.el = new Gtk.Label( "Other" );
667
668             // my vars (dec)
669
670             // set gobject values
671         }
672
673         // user defined functions 
674     }
675     public class Xcls_AddPropertyPopup : Object 
676     {
677         public Gtk.Menu el;
678         private Xcls_LeftProps  _this;
679
680
681             // my vars (def)
682
683         // ctor 
684         public Xcls_AddPropertyPopup(Xcls_LeftProps _owner )
685         {
686             _this = _owner;
687             _this.AddPropertyPopup = this;
688             this.el = new Gtk.Menu();
689
690             // my vars (dec)
691
692             // set gobject values
693             var child_0 = new Xcls_MenuItem8( _this );
694             child_0.ref();
695             this.el.append (  child_0.el  );
696             var child_1 = new Xcls_MenuItem9( _this );
697             child_1.ref();
698             this.el.append (  child_1.el  );
699             var child_2 = new Xcls_MenuItem10( _this );
700             child_2.ref();
701             this.el.append (  child_2.el  );
702             var child_3 = new Xcls_MenuItem11( _this );
703             child_3.ref();
704             this.el.append (  child_3.el  );
705             var child_4 = new Xcls_SeparatorMenuItem12( _this );
706             child_4.ref();
707             this.el.add (  child_4.el  );
708             var child_5 = new Xcls_MenuItem13( _this );
709             child_5.ref();
710             this.el.append (  child_5.el  );
711             var child_6 = new Xcls_MenuItem14( _this );
712             child_6.ref();
713             this.el.append (  child_6.el  );
714             var child_7 = new Xcls_MenuItem15( _this );
715             child_7.ref();
716             this.el.append (  child_7.el  );
717             var child_8 = new Xcls_SeparatorMenuItem16( _this );
718             child_8.ref();
719             this.el.add (  child_8.el  );
720             var child_9 = new Xcls_MenuItem17( _this );
721             child_9.ref();
722             this.el.append (  child_9.el  );
723             var child_10 = new Xcls_MenuItem18( _this );
724             child_10.ref();
725             this.el.append (  child_10.el  );
726             var child_11 = new Xcls_MenuItem19( _this );
727             child_11.ref();
728             this.el.append (  child_11.el  );
729             var child_12 = new Xcls_SeparatorMenuItem20( _this );
730             child_12.ref();
731             this.el.add (  child_12.el  );
732             var child_13 = new Xcls_MenuItem21( _this );
733             child_13.ref();
734             this.el.append (  child_13.el  );
735             var child_14 = new Xcls_MenuItem22( _this );
736             child_14.ref();
737             this.el.append (  child_14.el  );
738             var child_15 = new Xcls_MenuItem23( _this );
739             child_15.ref();
740             this.el.append (  child_15.el  );
741         }
742
743         // user defined functions 
744     }
745     public class Xcls_MenuItem8 : Object 
746     {
747         public Gtk.MenuItem el;
748         private Xcls_LeftProps  _this;
749
750
751             // my vars (def)
752
753         // ctor 
754         public Xcls_MenuItem8(Xcls_LeftProps _owner )
755         {
756             _this = _owner;
757             this.el = new Gtk.MenuItem();
758
759             // my vars (dec)
760
761             // set gobject values
762             this.el.tooltip_markup = "Using _this.{ID} will map to this element";
763             this.el.label = "id: _this.{ID} (Vala)";
764
765             // listeners 
766             this.el.activate.connect( ()  => {
767                 _this.addProp( "prop", "id", "", "");
768             });
769         }
770
771         // user defined functions 
772     }
773     public class Xcls_MenuItem9 : Object 
774     {
775         public Gtk.MenuItem el;
776         private Xcls_LeftProps  _this;
777
778
779             // my vars (def)
780
781         // ctor 
782         public Xcls_MenuItem9(Xcls_LeftProps _owner )
783         {
784             _this = _owner;
785             this.el = new Gtk.MenuItem();
786
787             // my vars (dec)
788
789             // set gobject values
790             this.el.tooltip_markup = "how to pack this element onto parent, (method, 2nd arg, 3rd arg) .. the 1st argument is filled by the element";
791             this.el.label = "pack: Pack method (Vala)";
792
793             // listeners 
794             this.el.activate.connect( ( ) => {
795             
796                 _this.addProp( "prop", "pack","add", "*");
797             });
798         }
799
800         // user defined functions 
801     }
802     public class Xcls_MenuItem10 : Object 
803     {
804         public Gtk.MenuItem el;
805         private Xcls_LeftProps  _this;
806
807
808             // my vars (def)
809
810         // ctor 
811         public Xcls_MenuItem10(Xcls_LeftProps _owner )
812         {
813             _this = _owner;
814             this.el = new Gtk.MenuItem();
815
816             // my vars (dec)
817
818             // set gobject values
819             this.el.tooltip_markup = "eg. \n\nnew Clutter.Image.from_file(.....)";
820             this.el.label = "ctor: Alterative to default contructor";
821
822             // listeners 
823             this.el.activate.connect( ( ) => {
824             
825                 _this.addProp( "prop", "ctor","", "*");
826             });
827         }
828
829         // user defined functions 
830     }
831     public class Xcls_MenuItem11 : Object 
832     {
833         public Gtk.MenuItem el;
834         private Xcls_LeftProps  _this;
835
836
837             // my vars (def)
838
839         // ctor 
840         public Xcls_MenuItem11(Xcls_LeftProps _owner )
841         {
842             _this = _owner;
843             this.el = new Gtk.MenuItem();
844
845             // my vars (dec)
846
847             // set gobject values
848             this.el.tooltip_markup = "This code is called after the ctor";
849             this.el.label = "init: initialziation code (vala)";
850
851             // listeners 
852             this.el.activate.connect( ( ) => {
853             
854                 _this.addProp( "prop",  "init", "{\n\n}\n", "*" );
855             });
856         }
857
858         // user defined functions 
859     }
860     public class Xcls_SeparatorMenuItem12 : Object 
861     {
862         public Gtk.SeparatorMenuItem el;
863         private Xcls_LeftProps  _this;
864
865
866             // my vars (def)
867
868         // ctor 
869         public Xcls_SeparatorMenuItem12(Xcls_LeftProps _owner )
870         {
871             _this = _owner;
872             this.el = new Gtk.SeparatorMenuItem();
873
874             // my vars (dec)
875
876             // set gobject values
877         }
878
879         // user defined functions 
880     }
881     public class Xcls_MenuItem13 : Object 
882     {
883         public Gtk.MenuItem el;
884         private Xcls_LeftProps  _this;
885
886
887             // my vars (def)
888
889         // ctor 
890         public Xcls_MenuItem13(Xcls_LeftProps _owner )
891         {
892             _this = _owner;
893             this.el = new Gtk.MenuItem();
894
895             // my vars (dec)
896
897             // set gobject values
898             this.el.tooltip_markup = "Add a user defined string property";
899             this.el.label = "String";
900
901             // listeners 
902             this.el.activate.connect( (self) => {
903             
904                 _this.addProp( "prop", "XXXX", "","string");
905             
906             });
907         }
908
909         // user defined functions 
910     }
911     public class Xcls_MenuItem14 : Object 
912     {
913         public Gtk.MenuItem el;
914         private Xcls_LeftProps  _this;
915
916
917             // my vars (def)
918
919         // ctor 
920         public Xcls_MenuItem14(Xcls_LeftProps _owner )
921         {
922             _this = _owner;
923             this.el = new Gtk.MenuItem();
924
925             // my vars (dec)
926
927             // set gobject values
928             this.el.tooltip_markup = "Add a user defined number property";
929             this.el.label = "Number";
930
931             // listeners 
932             this.el.activate.connect( ( ) =>{
933             
934                 _this.addProp("prop",  "XXX", "0", "int");
935             });
936         }
937
938         // user defined functions 
939     }
940     public class Xcls_MenuItem15 : Object 
941     {
942         public Gtk.MenuItem el;
943         private Xcls_LeftProps  _this;
944
945
946             // my vars (def)
947
948         // ctor 
949         public Xcls_MenuItem15(Xcls_LeftProps _owner )
950         {
951             _this = _owner;
952             this.el = new Gtk.MenuItem();
953
954             // my vars (dec)
955
956             // set gobject values
957             this.el.tooltip_markup = "Add a user defined boolean property";
958             this.el.label = "Boolean";
959
960             // listeners 
961             this.el.activate.connect( ( ) =>{
962             
963                 _this.addProp( "prop", "XXX", "true", "bool");
964             });
965         }
966
967         // user defined functions 
968     }
969     public class Xcls_SeparatorMenuItem16 : Object 
970     {
971         public Gtk.SeparatorMenuItem el;
972         private Xcls_LeftProps  _this;
973
974
975             // my vars (def)
976
977         // ctor 
978         public Xcls_SeparatorMenuItem16(Xcls_LeftProps _owner )
979         {
980             _this = _owner;
981             this.el = new Gtk.SeparatorMenuItem();
982
983             // my vars (dec)
984
985             // set gobject values
986         }
987
988         // user defined functions 
989     }
990     public class Xcls_MenuItem17 : Object 
991     {
992         public Gtk.MenuItem el;
993         private Xcls_LeftProps  _this;
994
995
996             // my vars (def)
997
998         // ctor 
999         public Xcls_MenuItem17(Xcls_LeftProps _owner )
1000         {
1001             _this = _owner;
1002             this.el = new Gtk.MenuItem();
1003
1004             // my vars (dec)
1005
1006             // set gobject values
1007             this.el.tooltip_markup = "Add a user function boolean property";
1008             this.el.label = "Javascript Function";
1009
1010             // listeners 
1011             this.el.activate.connect( ( ) =>{
1012             
1013                 _this.addProp("prop",  "XXXX", "function() { }", "| function");
1014             });
1015         }
1016
1017         // user defined functions 
1018     }
1019     public class Xcls_MenuItem18 : Object 
1020     {
1021         public Gtk.MenuItem el;
1022         private Xcls_LeftProps  _this;
1023
1024
1025             // my vars (def)
1026
1027         // ctor 
1028         public Xcls_MenuItem18(Xcls_LeftProps _owner )
1029         {
1030             _this = _owner;
1031             this.el = new Gtk.MenuItem();
1032
1033             // my vars (dec)
1034
1035             // set gobject values
1036             this.el.tooltip_markup = "Add a user function boolean property";
1037             this.el.label = "Vala Method";
1038
1039             // listeners 
1040             this.el.activate.connect( ( ) =>{
1041             
1042                 _this.addProp( "prop", "XXXX", "() {\n\n}\n", "| return_type");
1043             });
1044         }
1045
1046         // user defined functions 
1047     }
1048     public class Xcls_MenuItem19 : Object 
1049     {
1050         public Gtk.MenuItem el;
1051         private Xcls_LeftProps  _this;
1052
1053
1054             // my vars (def)
1055
1056         // ctor 
1057         public Xcls_MenuItem19(Xcls_LeftProps _owner )
1058         {
1059             _this = _owner;
1060             this.el = new Gtk.MenuItem();
1061
1062             // my vars (dec)
1063
1064             // set gobject values
1065             this.el.tooltip_markup = "Add a vala signal";
1066             this.el.label = "Vala Signal";
1067
1068             // listeners 
1069             this.el.activate.connect( ( ) =>{
1070             
1071                 _this.addProp( "prop", "XXXX", "()", "@ void");
1072             });
1073         }
1074
1075         // user defined functions 
1076     }
1077     public class Xcls_SeparatorMenuItem20 : Object 
1078     {
1079         public Gtk.SeparatorMenuItem el;
1080         private Xcls_LeftProps  _this;
1081
1082
1083             // my vars (def)
1084
1085         // ctor 
1086         public Xcls_SeparatorMenuItem20(Xcls_LeftProps _owner )
1087         {
1088             _this = _owner;
1089             this.el = new Gtk.SeparatorMenuItem();
1090
1091             // my vars (dec)
1092
1093             // set gobject values
1094         }
1095
1096         // user defined functions 
1097     }
1098     public class Xcls_MenuItem21 : Object 
1099     {
1100         public Gtk.MenuItem el;
1101         private Xcls_LeftProps  _this;
1102
1103
1104             // my vars (def)
1105
1106         // ctor 
1107         public Xcls_MenuItem21(Xcls_LeftProps _owner )
1108         {
1109             _this = _owner;
1110             this.el = new Gtk.MenuItem();
1111
1112             // my vars (dec)
1113
1114             // set gobject values
1115             this.el.tooltip_markup = "Add a flexy if (for HTML templates)";
1116             this.el.label = "Flexy - If";
1117
1118             // listeners 
1119             this.el.activate.connect( ( ) =>{
1120             
1121                 _this.addProp("prop",  "flexy:if", "value_or_condition", "string");
1122             });
1123         }
1124
1125         // user defined functions 
1126     }
1127     public class Xcls_MenuItem22 : Object 
1128     {
1129         public Gtk.MenuItem el;
1130         private Xcls_LeftProps  _this;
1131
1132
1133             // my vars (def)
1134
1135         // ctor 
1136         public Xcls_MenuItem22(Xcls_LeftProps _owner )
1137         {
1138             _this = _owner;
1139             this.el = new Gtk.MenuItem();
1140
1141             // my vars (dec)
1142
1143             // set gobject values
1144             this.el.tooltip_markup = "Add a flexy include (for HTML templates)";
1145             this.el.label = "Flexy - Include";
1146
1147             // listeners 
1148             this.el.activate.connect( ( ) =>{
1149             
1150                 _this.addProp("prop",  "flexy:include", "name_of_file.html", "string");
1151             });
1152         }
1153
1154         // user defined functions 
1155     }
1156     public class Xcls_MenuItem23 : Object 
1157     {
1158         public Gtk.MenuItem el;
1159         private Xcls_LeftProps  _this;
1160
1161
1162             // my vars (def)
1163
1164         // ctor 
1165         public Xcls_MenuItem23(Xcls_LeftProps _owner )
1166         {
1167             _this = _owner;
1168             this.el = new Gtk.MenuItem();
1169
1170             // my vars (dec)
1171
1172             // set gobject values
1173             this.el.tooltip_markup = "Add a flexy foreach (for HTML templates)";
1174             this.el.label = "Flexy - Foreach";
1175
1176             // listeners 
1177             this.el.activate.connect( ( ) =>{
1178             
1179                 _this.addProp("prop",  "flexy:foreach", "array,key,value", "string");
1180             });
1181         }
1182
1183         // user defined functions 
1184     }
1185     public class Xcls_EditProps : Object 
1186     {
1187         public Gtk.ScrolledWindow el;
1188         private Xcls_LeftProps  _this;
1189
1190
1191             // my vars (def)
1192         public bool editing;
1193
1194         // ctor 
1195         public Xcls_EditProps(Xcls_LeftProps _owner )
1196         {
1197             _this = _owner;
1198             _this.EditProps = this;
1199             this.el = new Gtk.ScrolledWindow( null, null );
1200
1201             // my vars (dec)
1202             this.editing = false;
1203
1204             // set gobject values
1205             this.el.shadow_type = Gtk.ShadowType.IN;
1206             var child_0 = new Xcls_view( _this );
1207             child_0.ref();
1208             this.el.add (  child_0.el  );
1209
1210             // init method 
1211
1212             {
1213               
1214                this.el.set_policy (Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC);
1215             }
1216         }
1217
1218         // user defined functions 
1219     }
1220     public class Xcls_view : Object 
1221     {
1222         public Gtk.TreeView el;
1223         private Xcls_LeftProps  _this;
1224
1225
1226             // my vars (def)
1227
1228         // ctor 
1229         public Xcls_view(Xcls_LeftProps _owner )
1230         {
1231             _this = _owner;
1232             _this.view = this;
1233             this.el = new Gtk.TreeView();
1234
1235             // my vars (dec)
1236
1237             // set gobject values
1238             this.el.tooltip_column = 5;
1239             this.el.enable_tree_lines = true;
1240             this.el.headers_visible = true;
1241             var child_0 = new Xcls_model( _this );
1242             child_0.ref();
1243             this.el.set_model (  child_0.el  );
1244             var child_1 = new Xcls_keycol( _this );
1245             child_1.ref();
1246             this.el.append_column (  child_1.el  );
1247             var child_2 = new Xcls_valcol( _this );
1248             child_2.ref();
1249             this.el.append_column (  child_2.el  );
1250             var child_3 = new Xcls_ContextMenu( _this );
1251             child_3.ref();
1252
1253             // init method 
1254
1255             {
1256                 var selection = this.el.get_selection();
1257                 selection.set_mode( Gtk.SelectionMode.SINGLE);
1258             
1259             
1260                 var description = new Pango.FontDescription();
1261                 description.set_size(10000);
1262                 this.el.modify_font(description);
1263             }
1264
1265             // listeners 
1266             this.el.button_press_event.connect( ( ev)  => {
1267              
1268                 Gtk.TreeViewColumn col;
1269                 int cell_x;
1270                 int cell_y;
1271                 Gtk.TreePath path;
1272                 if (!this.el.get_path_at_pos((int)ev.x, (int) ev.y, out path, out col, out cell_x, out cell_y )) {
1273                     print("nothing selected on click");
1274                     GLib.Timeout.add_full(GLib.Priority.DEFAULT,10 , () => {
1275                         this.el.get_selection().unselect_all();
1276             
1277                         return false;
1278                     });
1279                      _this.before_edit();
1280                     return false; //not on a element.
1281                 }
1282                 
1283                 
1284                  // right click.
1285                  if (ev.type == Gdk.EventType.2BUTTON_PRESS  && ev.button == 1 && col.title == "Name") {    
1286                     // show popup!.   
1287                     
1288              
1289                      _this.before_edit();
1290                      
1291                      _this.keyrender.el.stop_editing(false);
1292                      _this.keyrender.el.editable  =false;
1293                 
1294                      _this.valrender.el.stop_editing(false);
1295                      _this.valrender.el.editable  =false;
1296                        
1297                       _this.startEditingKey(path); 
1298                      
1299                     return false;
1300                 }
1301                 
1302                 
1303                 
1304                 
1305                  // right click.
1306                  if (ev.type == Gdk.EventType.BUTTON_PRESS  && ev.button == 3) {    
1307                     // show popup!.   
1308                     //if (col.title == "Value") {
1309                      //     _this.before_edit();
1310                      //    return false;
1311                      //}
1312             
1313                     var p = _this.ContextMenu;
1314             
1315                     p.el.set_screen(Gdk.Screen.get_default());
1316                     p.el.show_all();
1317                     p.el.popup(null, null, null,  ev.button, ev.time);
1318                     //Seed.print("click:" + res.column.title);
1319                     // select the 
1320                     GLib.Timeout.add_full(GLib.Priority.DEFAULT,10 , () => {
1321               
1322                         this.el.get_selection().select_path(path);
1323                         return false;
1324                     });
1325                      _this.before_edit();
1326                     return false;
1327                 }
1328                 
1329                  
1330                 if (col.title != "Value") {
1331                     print("col title != Value");
1332                     
1333                     GLib.Timeout.add_full(GLib.Priority.DEFAULT,10 , () => {
1334                         this.el.get_selection().select_path(path);
1335                         return false;
1336                     });
1337                     
1338                     _this.before_edit();
1339                       //  XObject.error("column is not value?");
1340                     return false; // ignore.. - key click.. ??? should we do this??
1341                 }
1342                 
1343                 
1344                 // if the cell can be edited with a pulldown
1345                 // then we should return true... - and let the start_editing handle it?
1346                 
1347                 
1348                 
1349                 
1350                 
1351                   
1352                //             _this.before_edit(); <<< we really need to stop the other editor..
1353                  _this.keyrender.el.stop_editing(false);
1354                 _this.keyrender.el.editable  =false;
1355                 
1356                        
1357                 return _this.startEditingValue(path); // assumes selected row..
1358                     
1359                
1360             
1361                           
1362                
1363             });
1364         }
1365
1366         // user defined functions 
1367     }
1368     public class Xcls_model : Object 
1369     {
1370         public Gtk.TreeStore el;
1371         private Xcls_LeftProps  _this;
1372
1373
1374             // my vars (def)
1375
1376         // ctor 
1377         public Xcls_model(Xcls_LeftProps _owner )
1378         {
1379             _this = _owner;
1380             _this.model = this;
1381             this.el = new Gtk.TreeStore( 7,      typeof(string),  // 0 key type
1382      typeof(string),  // 1 key
1383      typeof(string),  // 2 key (display)
1384      typeof(string),  // 3 value
1385      typeof(string),   // 4 value (display)
1386      typeof(string),   // 5 both (tooltip)     
1387      typeof(string)   // 6 key (for sorting)
1388  );
1389
1390             // my vars (dec)
1391
1392             // set gobject values
1393         }
1394
1395         // user defined functions 
1396     }
1397     public class Xcls_keycol : Object 
1398     {
1399         public Gtk.TreeViewColumn el;
1400         private Xcls_LeftProps  _this;
1401
1402
1403             // my vars (def)
1404
1405         // ctor 
1406         public Xcls_keycol(Xcls_LeftProps _owner )
1407         {
1408             _this = _owner;
1409             _this.keycol = this;
1410             this.el = new Gtk.TreeViewColumn();
1411
1412             // my vars (dec)
1413
1414             // set gobject values
1415             this.el.title = "Name";
1416             this.el.resizable = true;
1417             var child_0 = new Xcls_keyrender( _this );
1418             child_0.ref();
1419             this.el.pack_start (  child_0.el , false );
1420
1421             // init method 
1422
1423             this.el.add_attribute(_this.keyrender.el , "markup", 2 );
1424              this.el.add_attribute(_this.keyrender.el , "text", 1 );
1425         }
1426
1427         // user defined functions 
1428     }
1429     public class Xcls_keyrender : Object 
1430     {
1431         public Gtk.CellRendererText el;
1432         private Xcls_LeftProps  _this;
1433
1434
1435             // my vars (def)
1436
1437         // ctor 
1438         public Xcls_keyrender(Xcls_LeftProps _owner )
1439         {
1440             _this = _owner;
1441             _this.keyrender = this;
1442             this.el = new Gtk.CellRendererText();
1443
1444             // my vars (dec)
1445
1446             // set gobject values
1447
1448             // listeners 
1449             this.el.editing_started.connect( (  editable, path) => {
1450             
1451                  Gtk.TreeIter  iter;
1452                 _this.model.el.get_iter(out iter, new Gtk.TreePath.from_string(path));
1453                 GLib.Value gval;
1454                               
1455             
1456             
1457                  //   this.get('/LeftPanel.model').activePath  = path;
1458                 _this.model.el.get_value(iter,1, out gval);
1459                     var val = (string)gval;
1460                              
1461                     ((Gtk.Entry)editable).set_text(val);                 
1462             });
1463             this.el.edited.connect( (path, newtext) => {
1464                     print("Keyrender  - signal:edited\n");
1465                 
1466                 this.el.editable = false;
1467               
1468              
1469             
1470                     Gtk.TreeIter  iter;
1471                     _this.model.el.get_iter(out iter, new Gtk.TreePath.from_string(path));
1472                     GLib.Value gval;
1473                     
1474                      _this.model.el.get_value(iter,1, out gval);
1475                     var oldval = (string)gval;
1476                     
1477                      _this.model.el.get_value(iter,0, out gval);
1478                     var ktype = (string)gval;
1479                    
1480                     _this.model.el.set_value(iter, 1, newtext);
1481                     
1482                     if (oldval == newtext) {
1483                         return;
1484                     }
1485                     
1486                     
1487                     print("ktype: %s\n",ktype);
1488                     switch(ktype) {
1489                         case "listener":
1490                             var ov = _this.node.listeners.get(oldval);
1491                             _this.node.listeners.set(newtext, ov);
1492                             _this.node.listeners.remove(oldval);
1493                             
1494                             _this.updateIter(iter,  ktype, newtext, ov);
1495                             
1496                             break;
1497                         case "props":
1498                             var ov = _this.node.props.get(oldval);
1499                             _this.node.props.set(newtext, ov);
1500                             _this.node.props.remove(oldval);
1501                             _this.updateIter(iter,  ktype, newtext, ov);
1502                             break;
1503                      }
1504                      _this.changed();
1505                       
1506             });
1507         }
1508
1509         // user defined functions 
1510     }
1511     public class Xcls_valcol : Object 
1512     {
1513         public Gtk.TreeViewColumn el;
1514         private Xcls_LeftProps  _this;
1515
1516
1517             // my vars (def)
1518
1519         // ctor 
1520         public Xcls_valcol(Xcls_LeftProps _owner )
1521         {
1522             _this = _owner;
1523             _this.valcol = this;
1524             this.el = new Gtk.TreeViewColumn();
1525
1526             // my vars (dec)
1527
1528             // set gobject values
1529             this.el.title = "Value";
1530             this.el.resizable = true;
1531             var child_0 = new Xcls_valrender( _this );
1532             child_0.ref();
1533             this.el.pack_start (  child_0.el , true );
1534
1535             // init method 
1536
1537             {
1538                 
1539                 //     typeof(string),  // 0 key type
1540                 // typeof(string),  // 1 key
1541                 // typeof(string),  // 2 key (display)
1542                 // typeof(string),  // 3 value
1543                 // typeof(string)   // 4 value (display)
1544             
1545                 
1546                 this.el.add_attribute(_this.valrender.el , "text", 4 );
1547                 //this.el.add_attribute(_this.valrender.el , "sensitive", 4 );
1548                 //this.el.add_attribute(this.items[0].el , 'editable', 3 );
1549                       // this.el.set_cell_data_func(cell, age_cell_data_func, NULL, NULL);
1550             
1551              // this.get('/LeftPanel').editableColumn= this;
1552             }
1553         }
1554
1555         // user defined functions 
1556     }
1557     public class Xcls_valrender : Object 
1558     {
1559         public Gtk.CellRendererCombo el;
1560         private Xcls_LeftProps  _this;
1561
1562
1563             // my vars (def)
1564
1565         // ctor 
1566         public Xcls_valrender(Xcls_LeftProps _owner )
1567         {
1568             _this = _owner;
1569             _this.valrender = this;
1570             this.el = new Gtk.CellRendererCombo();
1571
1572             // my vars (dec)
1573
1574             // set gobject values
1575             this.el.editable = false;
1576             this.el.text_column = 0;
1577             this.el.has_entry = true;
1578             var child_0 = new Xcls_valrendermodel( _this );
1579             child_0.ref();
1580             this.el.model = child_0.el;
1581
1582             // listeners 
1583             this.el.editing_started.connect( ( editable, path) => {
1584                 //_this.editing = true;
1585                 print("editing started called\n");
1586                 if (!_this.allow_edit) {
1587                    
1588                      print("val - editing_Started\n");
1589                     this.el.editable = false; // make sure it's not editor...
1590                
1591                      
1592                     return;
1593                 }
1594                  _this.allow_edit =false;
1595                 
1596                
1597                  if (  this.el.has_entry ) {
1598                
1599                      Gtk.TreeIter  iter;
1600                     _this.model.el.get_iter(out iter, new Gtk.TreePath.from_string(path));
1601                     GLib.Value gval;
1602                                   
1603             
1604                   
1605                      //   this.get('/LeftPanel.model').activePath  = path;
1606                    _this.model.el.get_value(iter,3, out gval);
1607                 
1608             
1609                     var val = (string)gval;
1610                     var combo =        (Gtk.ComboBox)editable;
1611             
1612                     var entry =  (Gtk.Entry) combo.get_child();        
1613                     entry.set_text(val);
1614                 }
1615                
1616             });
1617             this.el.edited.connect( (path, newtext) => {
1618                 print("Valrender  - signal:edited\n");
1619               
1620                     this.el.editable = false;
1621             /*  
1622              m.set(iter, 
1623                             0, "listener",
1624                             1, miter.get_key(),
1625                             2, "<b>" + miter.get_key() + "</b>",
1626                             3, miter.get_value(),
1627                             4, display_value(short);
1628                         ); 
1629             
1630               */      
1631             
1632                     Gtk.TreeIter  iter;
1633                     _this.model.el.get_iter(out iter, new Gtk.TreePath.from_string(path));
1634                     GLib.Value gval;
1635                     
1636                      _this.model.el.get_value(iter,0, out gval);
1637                     var ktype = (string)gval;
1638                     
1639                     
1640                      _this.model.el.get_value(iter,3, out gval);
1641                     var oldval = (string)gval;
1642                     
1643                      _this.model.el.get_value(iter,1, out gval);
1644                     var key = (string)gval;
1645                     
1646                      
1647                     
1648                     switch(ktype) {
1649                         case "listener":
1650                             _this.node.listeners.set(key, newtext);
1651                             _this.updateIter(iter,ktype,key,newtext);
1652                             break;
1653                         case "props":
1654                             _this.node.props.set(key,newtext);
1655                             _this.updateIter(iter,ktype, key,newtext);                
1656                             break;
1657                      }
1658             //         _this.load(_this.file,_this.node);
1659                      _this.changed();
1660                       
1661             });
1662         }
1663
1664         // user defined functions 
1665         public              void setOptions (string[] ar) {
1666               var m = _this.valrendermodel.el;
1667                 m.clear();
1668              Gtk.TreeIter iret;
1669             for (var i =0; i < ar.length; i++) {
1670                     m.append(out iret);
1671                     m.set_value(iret, 0, ar[i]);
1672             }
1673         
1674         }
1675     }
1676     public class Xcls_valrendermodel : Object 
1677     {
1678         public Gtk.ListStore el;
1679         private Xcls_LeftProps  _this;
1680
1681
1682             // my vars (def)
1683
1684         // ctor 
1685         public Xcls_valrendermodel(Xcls_LeftProps _owner )
1686         {
1687             _this = _owner;
1688             _this.valrendermodel = this;
1689             this.el = new Gtk.ListStore( 1, typeof(string) );
1690
1691             // my vars (dec)
1692
1693             // set gobject values
1694         }
1695
1696         // user defined functions 
1697     }
1698     public class Xcls_ContextMenu : Object 
1699     {
1700         public Gtk.Menu el;
1701         private Xcls_LeftProps  _this;
1702
1703
1704             // my vars (def)
1705
1706         // ctor 
1707         public Xcls_ContextMenu(Xcls_LeftProps _owner )
1708         {
1709             _this = _owner;
1710             _this.ContextMenu = this;
1711             this.el = new Gtk.Menu();
1712
1713             // my vars (dec)
1714
1715             // set gobject values
1716             var child_0 = new Xcls_MenuItem33( _this );
1717             child_0.ref();
1718             this.el.append (  child_0.el  );
1719             var child_1 = new Xcls_SeparatorMenuItem34( _this );
1720             child_1.ref();
1721             this.el.append (  child_1.el  );
1722             var child_2 = new Xcls_MenuItem35( _this );
1723             child_2.ref();
1724             this.el.append (  child_2.el  );
1725         }
1726
1727         // user defined functions 
1728     }
1729     public class Xcls_MenuItem33 : Object 
1730     {
1731         public Gtk.MenuItem el;
1732         private Xcls_LeftProps  _this;
1733
1734
1735             // my vars (def)
1736
1737         // ctor 
1738         public Xcls_MenuItem33(Xcls_LeftProps _owner )
1739         {
1740             _this = _owner;
1741             this.el = new Gtk.MenuItem();
1742
1743             // my vars (dec)
1744
1745             // set gobject values
1746             this.el.label = "Edit";
1747
1748             // listeners 
1749             this.el.activate.connect( ( )  =>{
1750               
1751                 var s = _this.view.el.get_selection();
1752                 Gtk.TreeIter iter;
1753                 Gtk.TreeModel model;
1754                 s.get_selected (out  model, out  iter);
1755                 _this.startEditingKey(model.get_path(iter));
1756             });
1757         }
1758
1759         // user defined functions 
1760     }
1761     public class Xcls_SeparatorMenuItem34 : Object 
1762     {
1763         public Gtk.SeparatorMenuItem el;
1764         private Xcls_LeftProps  _this;
1765
1766
1767             // my vars (def)
1768
1769         // ctor 
1770         public Xcls_SeparatorMenuItem34(Xcls_LeftProps _owner )
1771         {
1772             _this = _owner;
1773             this.el = new Gtk.SeparatorMenuItem();
1774
1775             // my vars (dec)
1776
1777             // set gobject values
1778         }
1779
1780         // user defined functions 
1781     }
1782     public class Xcls_MenuItem35 : Object 
1783     {
1784         public Gtk.MenuItem el;
1785         private Xcls_LeftProps  _this;
1786
1787
1788             // my vars (def)
1789
1790         // ctor 
1791         public Xcls_MenuItem35(Xcls_LeftProps _owner )
1792         {
1793             _this = _owner;
1794             this.el = new Gtk.MenuItem();
1795
1796             // my vars (dec)
1797
1798             // set gobject values
1799             this.el.label = "Delete";
1800
1801             // listeners 
1802             this.el.activate.connect( ( )  =>{
1803                 _this.deleteSelected();
1804             });
1805         }
1806
1807         // user defined functions 
1808     }
1809 }