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