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