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