tidy up add other property menu
[roobuilder] / 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_addpop addpop;
16         public Xcls_EditProps EditProps;
17         public Xcls_view view;
18         public Xcls_deletemenu deletemenu;
19         public Xcls_selmodel selmodel;
20         public Xcls_model model;
21         public Xcls_keycol keycol;
22         public Xcls_valcol valcol;
23         public Xcls_ContextMenu ContextMenu;
24
25                 // my vars (def)
26         public bool loading;
27         public bool allow_edit;
28         public signal void show_add_props (string type);
29         public signal bool stop_editor ();
30         public Xcls_MainWindow main_window;
31         public int last_error_counter;
32         public signal void changed ();
33         public JsRender.JsRender file;
34         public JsRender.Node node;
35         public signal void show_editor (JsRender.JsRender file, JsRender.Node node, JsRender.NodeProp prop);
36
37         // ctor
38         public Xcls_LeftProps()
39         {
40                 _this = this;
41                 this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
42
43                 // my vars (dec)
44                 this.loading = false;
45                 this.allow_edit = false;
46                 this.main_window = null;
47                 this.last_error_counter = -1;
48
49                 // set gobject values
50                 this.el.homogeneous = false   ;
51                 this.el.hexpand = true;
52                 this.el.vexpand = true;
53                 var child_1 = new Xcls_Box2( _this );
54                 child_1.ref();
55                 this.el.append( child_1.el );
56                 new Xcls_EditProps( _this );
57                 this.el.append( _this.EditProps.el );
58         }
59
60         // user defined functions
61         public string keySortFormat (string key) {
62             // listeners first - with 0
63             // specials
64             if (key[0] == '*') {
65                 return "1 " + key;
66             }
67             // functions
68             
69             var bits = key.split(" ");
70             
71             if (key[0] == '|') {
72                 return "2 " + bits[bits.length -1];
73             }
74             // signals
75             if (key[0] == '@') {
76                 return "3 " + bits[bits.length -1];
77             }
78                 
79             // props
80             if (key[0] == '#') {
81                 return "4 " + bits[bits.length -1];
82             }
83             // the rest..
84             return "5 " + bits[bits.length -1];    
85         
86         
87         
88         }
89         public void updateErrors () {
90                 var file = this.file;
91                 var ar = file.getErrors();
92                 if (ar.size < 1) {
93                         this.removeErrors();
94                         this.last_error_counter = file.error_counter ;
95         
96                         return;
97                 }
98                 if (this.last_error_counter == file.error_counter) {
99                         return;
100                 }
101                 this.removeErrors();
102                 
103                 foreach(var diag in ar) { 
104                 
105                          
106         //        print("get inter\n");
107                     var node= file.lineToNode( (int)diag.range.start.line) ;
108                     if (node == null || node.oid != this.node.oid) {
109                         continue;
110                 }
111                 var prop = node.lineToProp( (int)diag.range.start.line) ;
112                 
113                 var row = _this.selmodel.propToRow(prop);
114                 if (row < 0) {
115                         continue;
116                         }
117                 var w = this.view.getWidgetAtRow(row);
118                 if (w == null) {
119                         return;
120                         }
121                                 var ed = diag.category.down();
122                         if (ed != "err" && w.has_css_class("node-err")) {
123                                 continue;
124                         }
125                         if (ed == "err" && w.has_css_class("node-warn")) {
126                                 w.remove_css_class("node-warn");
127                         }
128                         if (ed == "err" && w.has_css_class("node-depr")) {
129                                 w.remove_css_class("node-depr");
130                         }
131                         if (!w.has_css_class("node-"+ ed)) {
132                                 w.add_css_class("node-" + ed);
133                         }
134                         
135                 }
136                 
137         }
138         public string keyFormat (string val, string type) {
139             
140             // Glib.markup_escape_text(val);
141         
142             if (type == "listener") {
143                 return "<span font_weight=\"bold\" color=\"#660000\">" + 
144                     GLib.Markup.escape_text(val) +
145                      "</span>";
146             }
147             // property..
148             if (val.length < 1) {
149                 return "<span  color=\"#FF0000\">--empty--</span>";
150             }
151             
152             //@ = signal
153             //$ = property with 
154             //# - object properties
155             //* = special
156             // all of these... - display value is last element..
157             var ar = val.strip().split(" ");
158             
159             
160             var dval = GLib.Markup.escape_text(ar[ar.length-1]);
161             
162             
163             
164             
165             switch(val[0]) {
166                 case '@': // signal // just bold balck?
167                     if (dval[0] == '@') {
168                         dval = dval.substring(1);
169                     }
170                 
171                     return @"<span  font_weight=\"bold\">@ $dval</span>";        
172                 case '#': // object properties?
173                     if (dval[0] == '#') {
174                         dval = dval.substring(1);
175                     }
176                     return @"<span  font_weight=\"bold\">$dval</span>";
177                 case '*': // special
178                     if (dval[0] == '*') {
179                         dval = dval.substring(1);
180                     }
181                     return @"<span   color=\"#0000CC\" font_weight=\"bold\">$dval</span>";            
182                 case '$':
183                     if (dval[0] == '$') {
184                         dval = dval.substring(1);
185                     }
186                     return @"<span   style=\"italic\">$dval</span>";
187                case '|': // user defined methods
188                     if (dval[0] == '|') {
189                         dval = dval.substring(1);
190                     }
191                     return @"<span color=\"#008000\" font_weight=\"bold\">$dval</span>";
192                     
193                       
194                     
195                 default:
196                     return dval;
197             }
198               
199             
200         
201         }
202         public void deleteSelected () {
203             
204                         return;
205                         /*
206                 
207                 Gtk.TreeIter iter;
208                 Gtk.TreeModel mod;
209                 
210                 var s = this.view.el.get_selection();
211                 s.get_selected(out mod, out iter);
212                      
213                       
214                 GLib.Value gval;
215                 mod.get_value(iter, 0 , out gval);
216                 var prop = (JsRender.NodeProp)gval;
217                 if (prop == null) {
218                         this.load(this.file, this.node);    
219                         return;
220                 }
221                 // stop editor after fetching property - otherwise prop is null.
222                 this.stop_editor();
223                 
224                         
225                 switch(prop.ptype) {
226                     case JsRender.NodePropType.LISTENER:
227                         this.node.listeners.unset(prop.to_index_key());
228                         break;
229                         
230                     default:
231                         this.node.props.unset(prop.to_index_key());
232                         break;
233                 }
234                 this.load(this.file, this.node);
235                 
236                 _this.changed();
237                 */
238         }
239         public void removeErrors () {
240                 var  child = this.view.el.get_first_child(); 
241          
242                 var reading_header = true;
243          
244                 while (child != null) {
245                         GLib.debug("Got %s", child.get_type().name());
246                    
247                    if (reading_header) {
248                                 
249         
250                                 if (child.get_type().name() != "GtkColumnListView") {
251                                    
252                                         child = child.get_next_sibling();
253                                         continue;
254                                 }
255                                 // should be columnlistview
256                                 child = child.get_first_child(); 
257                          
258                          
259                                 
260                                 reading_header = false;
261                                  
262                     }
263                     
264                         if (child.has_css_class("node-err")) {
265                                 child.remove_css_class("node-err");
266                         }
267                         if (child.has_css_class("node-warn")) {
268                                 child.remove_css_class("node-warn");
269                         }
270                         
271                         if (child.has_css_class("node-depr")) {
272                                 child.remove_css_class("node-depr");
273                         }
274                         
275                 child = child.get_next_sibling(); 
276                 }
277                 //GLib.debug("Rturning null");
278              
279         }
280         public void a_addProp (JsRender.NodeProp prop) {
281               // info includes key, val, skel, etype..
282               //console.dump(info);
283                 //type = info.type.toLowerCase();
284                 //var data = this.toJS();
285                   
286                       
287             if (prop.ptype == JsRender.NodePropType.LISTENER) {
288                 if (this.node.listeners.has_key(prop.name)) {
289                     return;
290                 }
291                 this.node.listeners.set(prop.name,prop);
292             } else  {
293                  assert(this.node != null);
294                  assert(this.node.props != null);
295                 if (this.node.props.has_key(prop.to_index_key())) {
296                     return;
297                 }
298                 this.node.props.set(prop.to_index_key(),prop);
299             }
300                     
301               
302             // add a row???
303             this.load(this.file, this.node);
304             
305             
306              
307             
308             GLib.debug("trying to find new iter");
309          
310             
311                       
312         }
313         public void load (JsRender.JsRender file, JsRender.Node? node) 
314         {
315                 // not sure when to initialize this - we should do it on setting main window really.    
316                 
317                 this.loading = true;
318             if (this.view.popover == null) {
319                            this.view.popover = new Xcls_PopoverProperty();
320                            this.view.popover.mainwindow = _this.main_window;
321                 }
322             
323             
324             if (this.node != null) {
325                 this.node.dupeProps(); // ensures removeall will not do somethign silly
326                 
327             }
328             
329             GLib.debug("load leftprops\n");
330         
331             this.node = node;
332             this.file = file;
333             
334          
335             this.model.el.remove_all();
336                       
337             //this.get('/RightEditor').el.hide();
338             if (node ==null) {
339                 return ;
340             }
341             node.loadProps(this.model.el); 
342             
343             
344            //GLib.debug("clear selection\n");
345            
346                 this.loading = false;
347             this.selmodel.el.set_selected(Gtk.INVALID_LIST_POSITION);
348             this.updateErrors();
349            // clear selection?
350           //this.model.el.set_sort_column_id(4,Gtk.SortType.ASCENDING); // sort by real key..
351            
352            // this.view.el.get_selection().unselect_all();
353            
354           // _this.keycol.el.set_max_width(_this.EditProps.el.get_allocated_width()/ 2);
355           // _this.valcol.el.set_max_width(_this.EditProps.el.get_allocated_width()/ 2);
356            
357         }
358         public class Xcls_Box2 : Object
359         {
360                 public Gtk.Box el;
361                 private Xcls_LeftProps  _this;
362
363
364                         // my vars (def)
365
366                 // ctor
367                 public Xcls_Box2(Xcls_LeftProps _owner )
368                 {
369                         _this = _owner;
370                         this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
371
372                         // my vars (dec)
373
374                         // set gobject values
375                         this.el.hexpand = true;
376                         var child_1 = new Xcls_Label3( _this );
377                         child_1.ref();
378                         this.el.append( child_1.el );
379                         var child_2 = new Xcls_Button4( _this );
380                         child_2.ref();
381                         this.el.append( child_2.el );
382                         var child_3 = new Xcls_Button5( _this );
383                         child_3.ref();
384                         this.el.append( child_3.el );
385                         var child_4 = new Xcls_MenuButton6( _this );
386                         child_4.ref();
387                         this.el.append( child_4.el );
388                 }
389
390                 // user defined functions
391         }
392         public class Xcls_Label3 : Object
393         {
394                 public Gtk.Label el;
395                 private Xcls_LeftProps  _this;
396
397
398                         // my vars (def)
399
400                 // ctor
401                 public Xcls_Label3(Xcls_LeftProps _owner )
402                 {
403                         _this = _owner;
404                         this.el = new Gtk.Label( "Add:" );
405
406                         // my vars (dec)
407
408                         // set gobject values
409                         this.el.margin_end = 5;
410                         this.el.margin_start = 5;
411                 }
412
413                 // user defined functions
414         }
415
416         public class Xcls_Button4 : Object
417         {
418                 public Gtk.Button el;
419                 private Xcls_LeftProps  _this;
420
421
422                         // my vars (def)
423                 public bool always_show_image;
424
425                 // ctor
426                 public Xcls_Button4(Xcls_LeftProps _owner )
427                 {
428                         _this = _owner;
429                         this.el = new Gtk.Button();
430
431                         // my vars (dec)
432                         this.always_show_image = true;
433
434                         // set gobject values
435                         this.el.icon_name = "format-justify-left";
436                         this.el.hexpand = true;
437                         this.el.tooltip_text = "Add Property";
438                         this.el.label = "Property";
439
440                         //listeners
441                         this.el.clicked.connect( ( ) => {
442                             
443                              _this.main_window.windowstate.showProps(
444                                 _this.view.el, 
445                                         JsRender.NodePropType.PROP
446                                 );
447                           
448                         });
449                 }
450
451                 // user defined functions
452         }
453
454         public class Xcls_Button5 : Object
455         {
456                 public Gtk.Button el;
457                 private Xcls_LeftProps  _this;
458
459
460                         // my vars (def)
461                 public bool always_show_image;
462
463                 // ctor
464                 public Xcls_Button5(Xcls_LeftProps _owner )
465                 {
466                         _this = _owner;
467                         this.el = new Gtk.Button();
468
469                         // my vars (dec)
470                         this.always_show_image = true;
471
472                         // set gobject values
473                         this.el.icon_name = "appointment-new";
474                         this.el.hexpand = true;
475                         this.el.tooltip_text = "Add Event Code";
476                         this.el.label = "Event";
477
478                         //listeners
479                         this.el.clicked.connect( ( ) => {
480                             
481                          
482                            _this.main_window.windowstate.showProps(
483                                         _this.view.el, 
484                                         JsRender.NodePropType.LISTENER
485                                 );
486                         
487                          
488                         });
489                 }
490
491                 // user defined functions
492         }
493
494         public class Xcls_MenuButton6 : Object
495         {
496                 public Gtk.MenuButton el;
497                 private Xcls_LeftProps  _this;
498
499
500                         // my vars (def)
501
502                 // ctor
503                 public Xcls_MenuButton6(Xcls_LeftProps _owner )
504                 {
505                         _this = _owner;
506                         this.el = new Gtk.MenuButton();
507
508                         // my vars (dec)
509
510                         // set gobject values
511                         this.el.label = "Other";
512                         new Xcls_addpop( _this );
513                         this.el.popover = _this.addpop.el;
514                 }
515
516                 // user defined functions
517         }
518         public class Xcls_addpop : Object
519         {
520                 public Gtk.Popover el;
521                 private Xcls_LeftProps  _this;
522
523
524                         // my vars (def)
525
526                 // ctor
527                 public Xcls_addpop(Xcls_LeftProps _owner )
528                 {
529                         _this = _owner;
530                         _this.addpop = this;
531                         this.el = new Gtk.Popover();
532
533                         // my vars (dec)
534
535                         // set gobject values
536                         var child_1 = new Xcls_Box8( _this );
537                         this.el.child = child_1.el;
538                 }
539
540                 // user defined functions
541         }
542         public class Xcls_Box8 : Object
543         {
544                 public Gtk.Box el;
545                 private Xcls_LeftProps  _this;
546
547
548                         // my vars (def)
549
550                 // ctor
551                 public Xcls_Box8(Xcls_LeftProps _owner )
552                 {
553                         _this = _owner;
554                         this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
555
556                         // my vars (dec)
557
558                         // set gobject values
559                         var child_1 = new Xcls_Button9( _this );
560                         child_1.ref();
561                         this.el.append( child_1.el );
562                         var child_2 = new Xcls_Button11( _this );
563                         child_2.ref();
564                         this.el.append( child_2.el );
565                         var child_3 = new Xcls_Button13( _this );
566                         child_3.ref();
567                         this.el.append( child_3.el );
568                         var child_4 = new Xcls_Button15( _this );
569                         child_4.ref();
570                         this.el.append( child_4.el );
571                         var child_5 = new Xcls_Button17( _this );
572                         child_5.ref();
573                         this.el.append( child_5.el );
574                         var child_6 = new Xcls_Separator19( _this );
575                         child_6.ref();
576                         this.el.append( child_6.el );
577                         var child_7 = new Xcls_Button20( _this );
578                         child_7.ref();
579                         this.el.append( child_7.el );
580                         var child_8 = new Xcls_Button22( _this );
581                         child_8.ref();
582                         this.el.append( child_8.el );
583                         var child_9 = new Xcls_Button24( _this );
584                         child_9.ref();
585                         this.el.append( child_9.el );
586                         var child_10 = new Xcls_Separator26( _this );
587                         child_10.ref();
588                         this.el.append( child_10.el );
589                         var child_11 = new Xcls_Button27( _this );
590                         child_11.ref();
591                         this.el.append( child_11.el );
592                         var child_12 = new Xcls_Button29( _this );
593                         child_12.ref();
594                         this.el.append( child_12.el );
595                         var child_13 = new Xcls_Button31( _this );
596                         child_13.ref();
597                         this.el.append( child_13.el );
598                         var child_14 = new Xcls_Separator33( _this );
599                         child_14.ref();
600                         this.el.append( child_14.el );
601                         var child_15 = new Xcls_Button34( _this );
602                         child_15.ref();
603                         this.el.append( child_15.el );
604                         var child_16 = new Xcls_Button36( _this );
605                         child_16.ref();
606                         this.el.append( child_16.el );
607                         var child_17 = new Xcls_Button38( _this );
608                         child_17.ref();
609                         this.el.append( child_17.el );
610                 }
611
612                 // user defined functions
613         }
614         public class Xcls_Button9 : Object
615         {
616                 public Gtk.Button el;
617                 private Xcls_LeftProps  _this;
618
619
620                         // my vars (def)
621
622                 // ctor
623                 public Xcls_Button9(Xcls_LeftProps _owner )
624                 {
625                         _this = _owner;
626                         this.el = new Gtk.Button();
627
628                         // my vars (dec)
629
630                         // set gobject values
631                         this.el.has_frame = false;
632                         var child_1 = new Xcls_Label10( _this );
633                         this.el.child = child_1.el;
634
635                         //listeners
636                         this.el.clicked.connect( ()  => {
637                                 _this.addpop.el.hide();
638                                 // is this userdef or special??
639                                 var add = new JsRender.NodeProp.prop("id");
640                                 if (_this.node.has_prop_key(add)) {
641                                         return;
642                                 }
643                                 
644                                 _this.node.add_prop( add );
645                                 
646                                 _this.view.editProp( add );
647                                 
648                         });
649                 }
650
651                 // user defined functions
652         }
653         public class Xcls_Label10 : Object
654         {
655                 public Gtk.Label el;
656                 private Xcls_LeftProps  _this;
657
658
659                         // my vars (def)
660
661                 // ctor
662                 public Xcls_Label10(Xcls_LeftProps _owner )
663                 {
664                         _this = _owner;
665                         this.el = new Gtk.Label( "id: _this.{ID} (Vala)" );
666
667                         // my vars (dec)
668
669                         // set gobject values
670                         this.el.halign = Gtk.Align.START;
671                         this.el.tooltip_text = "Using _this.{ID} will map to this element";
672                 }
673
674                 // user defined functions
675         }
676
677
678         public class Xcls_Button11 : Object
679         {
680                 public Gtk.Button el;
681                 private Xcls_LeftProps  _this;
682
683
684                         // my vars (def)
685
686                 // ctor
687                 public Xcls_Button11(Xcls_LeftProps _owner )
688                 {
689                         _this = _owner;
690                         this.el = new Gtk.Button();
691
692                         // my vars (dec)
693
694                         // set gobject values
695                         this.el.has_frame = false;
696                         var child_1 = new Xcls_Label12( _this );
697                         this.el.child = child_1.el;
698
699                         //listeners
700                         this.el.clicked.connect( ( ) => {
701                          
702                         
703                                 _this.addpop.el.hide();
704                                 // is this userdef or special??
705                                 var add = new JsRender.NodeProp.special("pack", "add");
706                                 if (_this.node.has_prop_key(add)) {
707                                         return;
708                                 }
709                                 
710                                 _this.node.add_prop( add );
711                                 
712                                 _this.view.editProp( add );
713                                 
714                         
715                         });
716                 }
717
718                 // user defined functions
719         }
720         public class Xcls_Label12 : Object
721         {
722                 public Gtk.Label el;
723                 private Xcls_LeftProps  _this;
724
725
726                         // my vars (def)
727
728                 // ctor
729                 public Xcls_Label12(Xcls_LeftProps _owner )
730                 {
731                         _this = _owner;
732                         this.el = new Gtk.Label( "pack: Pack method (Vala)" );
733
734                         // my vars (dec)
735
736                         // set gobject values
737                         this.el.halign = Gtk.Align.START;
738                         this.el.tooltip_text = "how to pack this element onto parent, (method, 2nd arg, 3rd arg) .. the 1st argument is filled by the element";
739                 }
740
741                 // user defined functions
742         }
743
744
745         public class Xcls_Button13 : Object
746         {
747                 public Gtk.Button el;
748                 private Xcls_LeftProps  _this;
749
750
751                         // my vars (def)
752
753                 // ctor
754                 public Xcls_Button13(Xcls_LeftProps _owner )
755                 {
756                         _this = _owner;
757                         this.el = new Gtk.Button();
758
759                         // my vars (dec)
760
761                         // set gobject values
762                         this.el.has_frame = false;
763                         var child_1 = new Xcls_Label14( _this );
764                         this.el.child = child_1.el;
765
766                         //listeners
767                         this.el.clicked.connect( ( ) => {
768                            
769                                 _this.addpop.el.hide();
770                                 // is this userdef or special??
771                                 var add = new JsRender.NodeProp.special("ctor");
772                                 if (_this.node.has_prop_key(add)) {
773                                         return;
774                                 }
775                                 
776                                 _this.node.add_prop( add );
777                                 
778                                 _this.view.editProp( add );
779                                 
780                         });
781                 }
782
783                 // user defined functions
784         }
785         public class Xcls_Label14 : Object
786         {
787                 public Gtk.Label el;
788                 private Xcls_LeftProps  _this;
789
790
791                         // my vars (def)
792
793                 // ctor
794                 public Xcls_Label14(Xcls_LeftProps _owner )
795                 {
796                         _this = _owner;
797                         this.el = new Gtk.Label( "ctor: Alterative to default contructor (Vala)" );
798
799                         // my vars (dec)
800
801                         // set gobject values
802                         this.el.halign = Gtk.Align.START;
803                         this.el.tooltip_text = "eg. \n\nnew Clutter.Image.from_file(.....)";
804                 }
805
806                 // user defined functions
807         }
808
809
810         public class Xcls_Button15 : Object
811         {
812                 public Gtk.Button el;
813                 private Xcls_LeftProps  _this;
814
815
816                         // my vars (def)
817
818                 // ctor
819                 public Xcls_Button15(Xcls_LeftProps _owner )
820                 {
821                         _this = _owner;
822                         this.el = new Gtk.Button();
823
824                         // my vars (dec)
825
826                         // set gobject values
827                         this.el.has_frame = false;
828                         var child_1 = new Xcls_Label16( _this );
829                         this.el.child = child_1.el;
830
831                         //listeners
832                         this.el.clicked.connect( ( ) => {
833                             
834                                 _this.addpop.el.hide();
835                                 // is this userdef or special??
836                                 var add =  new JsRender.NodeProp.special("init","{\n\n}\n" ) ;
837                                 if (_this.node.has_prop_key(add)) {
838                                         return;
839                                 }
840                                 
841                                 _this.node.add_prop( add );
842                                 
843                                 _this.view.editProp( add );
844                         });
845                 }
846
847                 // user defined functions
848         }
849         public class Xcls_Label16 : Object
850         {
851                 public Gtk.Label el;
852                 private Xcls_LeftProps  _this;
853
854
855                         // my vars (def)
856
857                 // ctor
858                 public Xcls_Label16(Xcls_LeftProps _owner )
859                 {
860                         _this = _owner;
861                         this.el = new Gtk.Label( "init: initialziation code (vala)" );
862
863                         // my vars (dec)
864
865                         // set gobject values
866                         this.el.halign = Gtk.Align.START;
867                         this.el.tooltip_text = "This code is called after the ctor";
868                 }
869
870                 // user defined functions
871         }
872
873
874         public class Xcls_Button17 : Object
875         {
876                 public Gtk.Button el;
877                 private Xcls_LeftProps  _this;
878
879
880                         // my vars (def)
881
882                 // ctor
883                 public Xcls_Button17(Xcls_LeftProps _owner )
884                 {
885                         _this = _owner;
886                         this.el = new Gtk.Button();
887
888                         // my vars (dec)
889
890                         // set gobject values
891                         this.el.has_frame = false;
892                         var child_1 = new Xcls_Label18( _this );
893                         this.el.child = child_1.el;
894
895                         //listeners
896                         this.el.clicked.connect( ()  => {
897                                 _this.addpop.el.hide();
898                          
899                                 // is this userdef or special??
900                                 var add =   new JsRender.NodeProp.prop("cms-id","string", "" ) ;
901                                 if (_this.node.has_prop_key(add)) {
902                                         return;
903                                 }
904                                 
905                                 _this.node.add_prop( add );
906                                 
907                                 _this.view.editProp( add );
908                             
909                         });
910                 }
911
912                 // user defined functions
913         }
914         public class Xcls_Label18 : Object
915         {
916                 public Gtk.Label el;
917                 private Xcls_LeftProps  _this;
918
919
920                         // my vars (def)
921
922                 // ctor
923                 public Xcls_Label18(Xcls_LeftProps _owner )
924                 {
925                         _this = _owner;
926                         this.el = new Gtk.Label( "cms-id: (Roo JS/Pman library)" );
927
928                         // my vars (dec)
929
930                         // set gobject values
931                         this.el.halign = Gtk.Align.START;
932                         this.el.tooltip_text = "set the cms-id for this element, when converted to javascript, the html value will be wrapped with Pman.Cms.content({cms-id},{original-html})\n";
933                 }
934
935                 // user defined functions
936         }
937
938
939         public class Xcls_Separator19 : Object
940         {
941                 public Gtk.Separator el;
942                 private Xcls_LeftProps  _this;
943
944
945                         // my vars (def)
946
947                 // ctor
948                 public Xcls_Separator19(Xcls_LeftProps _owner )
949                 {
950                         _this = _owner;
951                         this.el = new Gtk.Separator( Gtk.Orientation.HORIZONTAL );
952
953                         // my vars (dec)
954
955                         // set gobject values
956                 }
957
958                 // user defined functions
959         }
960
961         public class Xcls_Button20 : Object
962         {
963                 public Gtk.Button el;
964                 private Xcls_LeftProps  _this;
965
966
967                         // my vars (def)
968
969                 // ctor
970                 public Xcls_Button20(Xcls_LeftProps _owner )
971                 {
972                         _this = _owner;
973                         this.el = new Gtk.Button();
974
975                         // my vars (dec)
976
977                         // set gobject values
978                         this.el.has_frame = false;
979                         var child_1 = new Xcls_Label21( _this );
980                         this.el.child = child_1.el;
981
982                         //listeners
983                         this.el.clicked.connect( (self) => {
984                                 _this.addpop.el.hide();
985                                 _this.view.popover.show(
986                                         _this.view.el, 
987                                         _this.node, 
988                                          new JsRender.NodeProp.prop("", "string", "") ,
989                                         -1,  
990                                         true
991                                 );
992                          
993                         });
994                 }
995
996                 // user defined functions
997         }
998         public class Xcls_Label21 : Object
999         {
1000                 public Gtk.Label el;
1001                 private Xcls_LeftProps  _this;
1002
1003
1004                         // my vars (def)
1005
1006                 // ctor
1007                 public Xcls_Label21(Xcls_LeftProps _owner )
1008                 {
1009                         _this = _owner;
1010                         this.el = new Gtk.Label( "String" );
1011
1012                         // my vars (dec)
1013
1014                         // set gobject values
1015                         this.el.halign = Gtk.Align.START;
1016                         this.el.tooltip_text = "Add a user defined string property";
1017                 }
1018
1019                 // user defined functions
1020         }
1021
1022
1023         public class Xcls_Button22 : Object
1024         {
1025                 public Gtk.Button el;
1026                 private Xcls_LeftProps  _this;
1027
1028
1029                         // my vars (def)
1030
1031                 // ctor
1032                 public Xcls_Button22(Xcls_LeftProps _owner )
1033                 {
1034                         _this = _owner;
1035                         this.el = new Gtk.Button();
1036
1037                         // my vars (dec)
1038
1039                         // set gobject values
1040                         this.el.has_frame = false;
1041                         var child_1 = new Xcls_Label23( _this );
1042                         this.el.child = child_1.el;
1043
1044                         //listeners
1045                         this.el.clicked.connect( ( ) =>{
1046                          
1047                                 _this.addpop.el.hide();
1048                                _this.view.popover.show(
1049                                         _this.view.el, 
1050                                         _this.node, 
1051                                          new JsRender.NodeProp.prop("", "int", "0") ,
1052                                         -1,  
1053                                         true
1054                                 );
1055                          
1056                         });
1057                 }
1058
1059                 // user defined functions
1060         }
1061         public class Xcls_Label23 : Object
1062         {
1063                 public Gtk.Label el;
1064                 private Xcls_LeftProps  _this;
1065
1066
1067                         // my vars (def)
1068
1069                 // ctor
1070                 public Xcls_Label23(Xcls_LeftProps _owner )
1071                 {
1072                         _this = _owner;
1073                         this.el = new Gtk.Label( "Number" );
1074
1075                         // my vars (dec)
1076
1077                         // set gobject values
1078                         this.el.halign = Gtk.Align.START;
1079                         this.el.tooltip_text = "Add a user defined number property";
1080                 }
1081
1082                 // user defined functions
1083         }
1084
1085
1086         public class Xcls_Button24 : Object
1087         {
1088                 public Gtk.Button el;
1089                 private Xcls_LeftProps  _this;
1090
1091
1092                         // my vars (def)
1093
1094                 // ctor
1095                 public Xcls_Button24(Xcls_LeftProps _owner )
1096                 {
1097                         _this = _owner;
1098                         this.el = new Gtk.Button();
1099
1100                         // my vars (dec)
1101
1102                         // set gobject values
1103                         this.el.has_frame = false;
1104                         var child_1 = new Xcls_Label25( _this );
1105                         this.el.child = child_1.el;
1106
1107                         //listeners
1108                         this.el.clicked.connect( ( ) =>{
1109                           
1110                                 _this.addpop.el.hide();
1111                            _this.view.popover.show(
1112                                         _this.view.el, 
1113                                         _this.node, 
1114                                          new JsRender.NodeProp.prop("", "bool", "true") ,
1115                                         -1,  
1116                                         true
1117                                 ); 
1118                          
1119                         });
1120                 }
1121
1122                 // user defined functions
1123         }
1124         public class Xcls_Label25 : Object
1125         {
1126                 public Gtk.Label el;
1127                 private Xcls_LeftProps  _this;
1128
1129
1130                         // my vars (def)
1131
1132                 // ctor
1133                 public Xcls_Label25(Xcls_LeftProps _owner )
1134                 {
1135                         _this = _owner;
1136                         this.el = new Gtk.Label( "Boolean" );
1137
1138                         // my vars (dec)
1139
1140                         // set gobject values
1141                         this.el.halign = Gtk.Align.START;
1142                         this.el.tooltip_text = "Add a user defined boolean property";
1143                 }
1144
1145                 // user defined functions
1146         }
1147
1148
1149         public class Xcls_Separator26 : Object
1150         {
1151                 public Gtk.Separator el;
1152                 private Xcls_LeftProps  _this;
1153
1154
1155                         // my vars (def)
1156
1157                 // ctor
1158                 public Xcls_Separator26(Xcls_LeftProps _owner )
1159                 {
1160                         _this = _owner;
1161                         this.el = new Gtk.Separator( Gtk.Orientation.HORIZONTAL );
1162
1163                         // my vars (dec)
1164
1165                         // set gobject values
1166                 }
1167
1168                 // user defined functions
1169         }
1170
1171         public class Xcls_Button27 : Object
1172         {
1173                 public Gtk.Button el;
1174                 private Xcls_LeftProps  _this;
1175
1176
1177                         // my vars (def)
1178
1179                 // ctor
1180                 public Xcls_Button27(Xcls_LeftProps _owner )
1181                 {
1182                         _this = _owner;
1183                         this.el = new Gtk.Button();
1184
1185                         // my vars (dec)
1186
1187                         // set gobject values
1188                         this.el.has_frame = false;
1189                         var child_1 = new Xcls_Label28( _this );
1190                         this.el.child = child_1.el;
1191
1192                         //listeners
1193                         this.el.clicked.connect( ( ) =>{
1194                                 _this.addpop.el.hide();
1195                            _this.view.popover.show(
1196                                         _this.view.el, 
1197                                         _this.node, 
1198                                          new JsRender.NodeProp.jsmethod("") ,
1199                                         -1,  
1200                                         true
1201                                 );
1202                         
1203                          
1204                         });
1205                 }
1206
1207                 // user defined functions
1208         }
1209         public class Xcls_Label28 : Object
1210         {
1211                 public Gtk.Label el;
1212                 private Xcls_LeftProps  _this;
1213
1214
1215                         // my vars (def)
1216
1217                 // ctor
1218                 public Xcls_Label28(Xcls_LeftProps _owner )
1219                 {
1220                         _this = _owner;
1221                         this.el = new Gtk.Label( "Javascript Function" );
1222
1223                         // my vars (dec)
1224
1225                         // set gobject values
1226                         this.el.halign = Gtk.Align.START;
1227                         this.el.tooltip_text = "Add a javascript  function";
1228                 }
1229
1230                 // user defined functions
1231         }
1232
1233
1234         public class Xcls_Button29 : Object
1235         {
1236                 public Gtk.Button el;
1237                 private Xcls_LeftProps  _this;
1238
1239
1240                         // my vars (def)
1241
1242                 // ctor
1243                 public Xcls_Button29(Xcls_LeftProps _owner )
1244                 {
1245                         _this = _owner;
1246                         this.el = new Gtk.Button();
1247
1248                         // my vars (dec)
1249
1250                         // set gobject values
1251                         this.el.has_frame = false;
1252                         var child_1 = new Xcls_Label30( _this );
1253                         this.el.child = child_1.el;
1254
1255                         //listeners
1256                         this.el.clicked.connect( ( ) =>{
1257                                 _this.addpop.el.hide();
1258                             _this.view.popover.show(
1259                                         _this.view.el, 
1260                                         _this.node, 
1261                                          new JsRender.NodeProp.valamethod("") ,
1262                                         -1,  
1263                                         true
1264                                 ); 
1265                         });
1266                 }
1267
1268                 // user defined functions
1269         }
1270         public class Xcls_Label30 : Object
1271         {
1272                 public Gtk.Label el;
1273                 private Xcls_LeftProps  _this;
1274
1275
1276                         // my vars (def)
1277
1278                 // ctor
1279                 public Xcls_Label30(Xcls_LeftProps _owner )
1280                 {
1281                         _this = _owner;
1282                         this.el = new Gtk.Label( "Vala Method" );
1283
1284                         // my vars (dec)
1285
1286                         // set gobject values
1287                         this.el.halign = Gtk.Align.START;
1288                         this.el.tooltip_text = "Add a user defined method to a object";
1289                 }
1290
1291                 // user defined functions
1292         }
1293
1294
1295         public class Xcls_Button31 : Object
1296         {
1297                 public Gtk.Button el;
1298                 private Xcls_LeftProps  _this;
1299
1300
1301                         // my vars (def)
1302
1303                 // ctor
1304                 public Xcls_Button31(Xcls_LeftProps _owner )
1305                 {
1306                         _this = _owner;
1307                         this.el = new Gtk.Button();
1308
1309                         // my vars (dec)
1310
1311                         // set gobject values
1312                         this.el.has_frame = false;
1313                         var child_1 = new Xcls_Label32( _this );
1314                         this.el.child = child_1.el;
1315
1316                         //listeners
1317                         this.el.clicked.connect( ( ) =>{
1318                                 _this.addpop.el.hide(); 
1319                           _this.view.popover.show(
1320                                         _this.view.el, 
1321                                         _this.node, 
1322                                          new JsRender.NodeProp.sig("" ) ,
1323                                         -1,  
1324                                         true
1325                                 );    
1326                         });
1327                 }
1328
1329                 // user defined functions
1330         }
1331         public class Xcls_Label32 : Object
1332         {
1333                 public Gtk.Label el;
1334                 private Xcls_LeftProps  _this;
1335
1336
1337                         // my vars (def)
1338
1339                 // ctor
1340                 public Xcls_Label32(Xcls_LeftProps _owner )
1341                 {
1342                         _this = _owner;
1343                         this.el = new Gtk.Label( "Vala Signal" );
1344
1345                         // my vars (dec)
1346
1347                         // set gobject values
1348                         this.el.halign = Gtk.Align.START;
1349                         this.el.tooltip_text = "Add a user defined signal to a object";
1350                 }
1351
1352                 // user defined functions
1353         }
1354
1355
1356         public class Xcls_Separator33 : Object
1357         {
1358                 public Gtk.Separator el;
1359                 private Xcls_LeftProps  _this;
1360
1361
1362                         // my vars (def)
1363
1364                 // ctor
1365                 public Xcls_Separator33(Xcls_LeftProps _owner )
1366                 {
1367                         _this = _owner;
1368                         this.el = new Gtk.Separator( Gtk.Orientation.HORIZONTAL );
1369
1370                         // my vars (dec)
1371
1372                         // set gobject values
1373                 }
1374
1375                 // user defined functions
1376         }
1377
1378         public class Xcls_Button34 : Object
1379         {
1380                 public Gtk.Button el;
1381                 private Xcls_LeftProps  _this;
1382
1383
1384                         // my vars (def)
1385
1386                 // ctor
1387                 public Xcls_Button34(Xcls_LeftProps _owner )
1388                 {
1389                         _this = _owner;
1390                         this.el = new Gtk.Button();
1391
1392                         // my vars (dec)
1393
1394                         // set gobject values
1395                         this.el.has_frame = false;
1396                         var child_1 = new Xcls_Label35( _this );
1397                         this.el.child = child_1.el;
1398
1399                         //listeners
1400                         this.el.clicked.connect( ( ) =>{
1401                                 _this.addpop.el.hide();
1402                                 _this.view.popover.show(
1403                                         _this.view.el, 
1404                                         _this.node, 
1405                                          new JsRender.NodeProp.prop("flexy:if", "string", "value_or_condition") ,
1406                                         -1,  
1407                                         true
1408                                 );
1409                         
1410                         
1411                         });
1412                 }
1413
1414                 // user defined functions
1415         }
1416         public class Xcls_Label35 : Object
1417         {
1418                 public Gtk.Label el;
1419                 private Xcls_LeftProps  _this;
1420
1421
1422                         // my vars (def)
1423
1424                 // ctor
1425                 public Xcls_Label35(Xcls_LeftProps _owner )
1426                 {
1427                         _this = _owner;
1428                         this.el = new Gtk.Label( "Flexy - If" );
1429
1430                         // my vars (dec)
1431
1432                         // set gobject values
1433                         this.el.halign = Gtk.Align.START;
1434                         this.el.tooltip_text = "Add a flexy if (for HTML templates)";
1435                 }
1436
1437                 // user defined functions
1438         }
1439
1440
1441         public class Xcls_Button36 : Object
1442         {
1443                 public Gtk.Button el;
1444                 private Xcls_LeftProps  _this;
1445
1446
1447                         // my vars (def)
1448
1449                 // ctor
1450                 public Xcls_Button36(Xcls_LeftProps _owner )
1451                 {
1452                         _this = _owner;
1453                         this.el = new Gtk.Button();
1454
1455                         // my vars (dec)
1456
1457                         // set gobject values
1458                         this.el.has_frame = false;
1459                         var child_1 = new Xcls_Label37( _this );
1460                         this.el.child = child_1.el;
1461
1462                         //listeners
1463                         this.el.clicked.connect( ( ) =>{
1464                                 _this.addpop.el.hide();
1465                                 _this.view.popover.show(
1466                                         _this.view.el, 
1467                                         _this.node, 
1468                                          new JsRender.NodeProp.prop("flexy:include", "string", "name_of_file.html") ,
1469                                         -1,  
1470                                         true
1471                                 );
1472                         
1473                           
1474                         });
1475                 }
1476
1477                 // user defined functions
1478         }
1479         public class Xcls_Label37 : Object
1480         {
1481                 public Gtk.Label el;
1482                 private Xcls_LeftProps  _this;
1483
1484
1485                         // my vars (def)
1486
1487                 // ctor
1488                 public Xcls_Label37(Xcls_LeftProps _owner )
1489                 {
1490                         _this = _owner;
1491                         this.el = new Gtk.Label( "Flexy - Include" );
1492
1493                         // my vars (dec)
1494
1495                         // set gobject values
1496                         this.el.halign = Gtk.Align.START;
1497                         this.el.tooltip_text = "Add a flexy include (for HTML templates)";
1498                 }
1499
1500                 // user defined functions
1501         }
1502
1503
1504         public class Xcls_Button38 : Object
1505         {
1506                 public Gtk.Button el;
1507                 private Xcls_LeftProps  _this;
1508
1509
1510                         // my vars (def)
1511
1512                 // ctor
1513                 public Xcls_Button38(Xcls_LeftProps _owner )
1514                 {
1515                         _this = _owner;
1516                         this.el = new Gtk.Button();
1517
1518                         // my vars (dec)
1519
1520                         // set gobject values
1521                         this.el.has_frame = false;
1522                         this.el.tooltip_markup = "Add a flexy include (for HTML templates)";
1523                         var child_1 = new Xcls_Label39( _this );
1524                         this.el.child = child_1.el;
1525
1526                         //listeners
1527                         this.el.clicked.connect( ( ) =>{
1528                                 _this.addpop.el.hide();
1529                                 _this.view.popover.show(
1530                                         _this.view.el, 
1531                                         _this.node, 
1532                                          new JsRender.NodeProp.prop("flexy:if", "string", "value_or_condition") ,
1533                                         -1,  
1534                                         true
1535                                 );
1536                           
1537                         });
1538                 }
1539
1540                 // user defined functions
1541         }
1542         public class Xcls_Label39 : Object
1543         {
1544                 public Gtk.Label el;
1545                 private Xcls_LeftProps  _this;
1546
1547
1548                         // my vars (def)
1549
1550                 // ctor
1551                 public Xcls_Label39(Xcls_LeftProps _owner )
1552                 {
1553                         _this = _owner;
1554                         this.el = new Gtk.Label( "Flexy - Foreach" );
1555
1556                         // my vars (dec)
1557
1558                         // set gobject values
1559                         this.el.halign = Gtk.Align.START;
1560                         this.el.tooltip_text = "Add a flexy foreach (for HTML templates)";
1561                 }
1562
1563                 // user defined functions
1564         }
1565
1566
1567
1568
1569
1570
1571         public class Xcls_EditProps : Object
1572         {
1573                 public Gtk.ScrolledWindow el;
1574                 private Xcls_LeftProps  _this;
1575
1576
1577                         // my vars (def)
1578                 public bool editing;
1579
1580                 // ctor
1581                 public Xcls_EditProps(Xcls_LeftProps _owner )
1582                 {
1583                         _this = _owner;
1584                         _this.EditProps = this;
1585                         this.el = new Gtk.ScrolledWindow();
1586
1587                         // my vars (dec)
1588                         this.editing = false;
1589
1590                         // set gobject values
1591                         this.el.hexpand = true;
1592                         this.el.vexpand = true;
1593                         new Xcls_view( _this );
1594                         this.el.set_child ( _this.view.el  );
1595
1596                         // init method
1597
1598                         {
1599                           
1600                            this.el.set_policy (Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC);
1601                         }
1602                 }
1603
1604                 // user defined functions
1605         }
1606         public class Xcls_view : Object
1607         {
1608                 public Gtk.ColumnView el;
1609                 private Xcls_LeftProps  _this;
1610
1611
1612                         // my vars (def)
1613                 public Gtk.CssProvider css;
1614                 public Xcls_PopoverProperty popover;
1615
1616                 // ctor
1617                 public Xcls_view(Xcls_LeftProps _owner )
1618                 {
1619                         _this = _owner;
1620                         _this.view = this;
1621                         new Xcls_selmodel( _this );
1622                         this.el = new Gtk.ColumnView( _this.selmodel.el );
1623
1624                         // my vars (dec)
1625                         this.popover = null;
1626
1627                         // set gobject values
1628                         this.el.name = "leftprops-view";
1629                         this.el.single_click_activate = false;
1630                         this.el.hexpand = true;
1631                         this.el.vexpand = true;
1632                         this.el.show_row_separators = true;
1633                         new Xcls_deletemenu( _this );
1634                         var child_3 = new Xcls_GestureClick45( _this );
1635                         child_3.ref();
1636                         this.el.add_controller(  child_3.el );
1637                         var child_4 = new Xcls_GestureClick46( _this );
1638                         child_4.ref();
1639                         this.el.add_controller(  child_4.el );
1640                         new Xcls_keycol( _this );
1641                         this.el.append_column ( _this.keycol.el  );
1642                         new Xcls_valcol( _this );
1643                         this.el.append_column ( _this.valcol.el  );
1644                         new Xcls_ContextMenu( _this );
1645
1646                         // init method
1647
1648                         {
1649                          
1650                                 this.css = new Gtk.CssProvider();
1651                                  
1652                                         this.css.load_from_string("
1653                         #leftprops-view { font-size: 12px;}
1654                                  
1655                         #leftprops-view  dropdown button { 
1656                                                 min-height: 16px;                        
1657                                                 outline-offset : 0;
1658                                         }
1659                         #leftprops-view cell dropdown label  {
1660                                         padding-top:0px;
1661                                         padding-bottom:0px;
1662                         }
1663                         #leftprops-view cell   { 
1664                                         padding-top:2px;
1665                                         padding-bottom:2px;
1666                                         }
1667                         #leftprops-view cell label,  #leftprops-view cell editablelable {
1668                                         padding-top:4px;
1669                                         padding-bottom:4px;
1670                         }");
1671                          
1672                                         Gtk.StyleContext.add_provider_for_display(
1673                                         this.el.get_display(),
1674                                         this.css,
1675                                         Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION
1676                                 );
1677                                         
1678                            
1679                         }
1680                 }
1681
1682                 // user defined functions
1683                 public Gtk.Widget? getWidgetAtRow (uint row) {
1684                 /*
1685                         
1686                 from            https://discourse.gnome.org/t/gtk4-finding-a-row-data-on-gtkcolumnview/8465
1687                         var colview = gesture.widget;
1688                         var line_no = check_list_widget(colview, x,y);
1689                          if (line_no > -1) {
1690                                 var item = colview.model.get_item(line_no);
1691                                  
1692                         }
1693                         */
1694                                 GLib.debug("Get Widget At Row %d", (int)row);
1695                         var  child = this.el.get_first_child(); 
1696                         var line_no = -1; 
1697                         var reading_header = true;
1698                 
1699                         while (child != null) {
1700                                         GLib.debug("Got %s", child.get_type().name());
1701                             if (reading_header) {
1702                                          
1703                                            
1704                                                 if (child.get_type().name() != "GtkColumnListView") {
1705                                                         child = child.get_next_sibling();
1706                                                         continue;
1707                                                 }
1708                                                 child = child.get_first_child(); 
1709                                                 reading_header = false;
1710                                                 continue;
1711                                 }
1712                                     if (child.get_type().name() != "GtkColumnViewRowWidget") {
1713                                     child = child.get_next_sibling();
1714                                     continue;
1715                                     }
1716                                     line_no++;
1717                                         if (line_no == row) {
1718                                                 GLib.debug("Returning widget %s", child.get_type().name());
1719                                             return (Gtk.Widget)child;
1720                                     }
1721                                 child = child.get_next_sibling(); 
1722                         }
1723                                 GLib.debug("Rturning null");
1724                         return null;
1725                 
1726                  }
1727                 public void editProp (JsRender.NodeProp prop) 
1728                 {
1729                         var sm = _this.selmodel.el;
1730                  
1731                                 var sr = -1;
1732                                 GLib.debug("finding node");
1733                                 _this.selmodel.selectProp(prop);
1734                                 
1735                                 for (var i = 0 ; i < sm.n_items; i++) {
1736                                         var r = (JsRender.NodeProp)sm.get_item(i);
1737                                         if (r.equals(prop)) {
1738                                                 sr = i;
1739                                                 break;
1740                                         }
1741                                 }
1742                                 if (sr < 0) {
1743                                         GLib.debug("finding node - cant find it");
1744                                                         
1745                                         return;
1746                                 }
1747                                 var r = this.getWidgetAtRow(sr);
1748                                 GLib.debug("r = %s", r.get_type().name());
1749                                 var ca = r.get_first_child();
1750                                 var ll = (Gtk.Label)ca.get_first_child();
1751                                 var cb = ca.get_next_sibling();
1752                                 var b = cb.get_first_child();
1753                                 var e = (Gtk.EditableLabel) b.get_first_child();
1754                                 var l = (Gtk.Label) e.get_next_sibling();
1755                                 var d = (Gtk.DropDown) l.get_next_sibling();
1756                                 
1757                                 GLib.debug("row key = %s", ll.label);
1758                                 if (e.get_visible()) {
1759                                         _this.stop_editor();
1760                                         e.start_editing();
1761                                         //GLib.Timeout.add_once(500, () => {
1762                                         //      var st = (Gtk.Stack) e.get_first_child();
1763                                         //      var ed = (Gtk.Entry) st.get_visible_child();
1764                                         //      ed.grab_focus_without_selecting();
1765                                         //});
1766                                         return;
1767                                 }
1768                                 if (d.get_visible()) {
1769                                         _this.stop_editor();
1770                                         d.activate();
1771                                         return;
1772                                 }
1773                                 if (l.get_visible()) {
1774                                         _this.stop_editor();
1775                                 _this.show_editor(_this.file, prop.parent, prop);
1776                                 
1777                                 }
1778                                 
1779                                 
1780                                 
1781                                 //gtkcolumnviewrowwidget
1782                                   // cell widet
1783                                   // cell widget
1784                                         // box
1785                                                 // entry / label / dropdown
1786                                                 
1787                                  
1788                 }
1789                 public int getColAt (double x,  double y) {
1790                 /*
1791                         
1792                 from            https://discourse.gnome.org/t/gtk4-finding-a-row-data-on-gtkcolumnview/8465
1793                           
1794                         */
1795                                 //Gtk.Allocation alloc = { 0, 0, 0, 0 };
1796                         var  child = this.el.get_first_child(); 
1797                          
1798                         var col = 0;
1799                         var offx = 0;
1800                         while (child != null) {
1801                                         GLib.debug("Got %s", child.get_type().name());
1802                                         
1803                                         if (child.get_type().name() == "GtkColumnViewRowWidget") {
1804                                                 child = child.get_first_child();
1805                                                 continue;
1806                                         }
1807                                         
1808                                         //child.get_allocation(out alloc);
1809                                         if (x <  (child.get_width() + offx)) {
1810                                                 return col;
1811                                         }
1812                                         offx += child.get_width();
1813                                         col++;
1814                                         child = child.get_next_sibling();
1815                                 }
1816                              
1817                                           
1818                         return -1;
1819                 
1820                  }
1821                 public int getRowAt (double x,  double in_y, out string pos) {
1822                 
1823                 
1824                          
1825                 
1826                 /*
1827                         
1828                 from            https://discourse.gnome.org/t/gtk4-finding-a-row-data-on-gtkcolumnview/8465
1829                         var colview = gesture.widget;
1830                         var line_no = check_list_widget(colview, x,y);
1831                          if (line_no > -1) {
1832                                 var item = colview.model.get_item(line_no);
1833                                  
1834                         }
1835                         */
1836                                  
1837                                 
1838                                 //GLib.debug("offset = %d  y = %d", (int) voff, (int) in_y);
1839                         var y = in_y + _this.EditProps.el.vadjustment.value; 
1840                         var  child = this.el.get_first_child(); 
1841                         //Gtk.Allocation alloc = { 0, 0, 0, 0 };
1842                         var line_no = -1; 
1843                         var reading_header = true;
1844                         var real_y = 0;
1845                         var header_height  = 0;
1846                         pos = "none";
1847                         var h = 0;
1848                         while (child != null) {
1849                                         //GLib.debug("Got %s", child.get_type().name());
1850                             if (reading_header) {
1851                                                 
1852                 
1853                                                 if (child.get_type().name() != "GtkColumnListView") {
1854                                                 h += child.get_height();
1855                                                         child = child.get_next_sibling();
1856                                                         continue;
1857                                                 }
1858                                                 // should be columnlistview
1859                                                 child = child.get_first_child(); 
1860                                             GLib.debug("header height=%d", h);
1861                                                 header_height =  h;
1862                                                 
1863                                                 reading_header = false;
1864                                                 
1865                                 }
1866                                 
1867                                     if (child.get_type().name() != "GtkColumnViewRowWidget") {
1868                                     child = child.get_next_sibling();
1869                                     continue;
1870                                     }
1871                                     
1872                                         if (y < header_height) {
1873                                         return -1;
1874                                 }
1875                                     
1876                                     line_no++;
1877                                         var hh = child.get_height();
1878                                         //child.get_allocation(out alloc);
1879                                         //GLib.debug("got cell xy = %d,%d  w,h= %d,%d", alloc.x, alloc.y, alloc.width, alloc.height);
1880                                         //GLib.debug("row %d y= %d %s", line_no, (int) (header_height + alloc.y),
1881                                         
1882                                         //      child.visible ? "VIS" : "hidden");
1883                 
1884                                     if (y >  (header_height + real_y) && y <= (header_height +  real_y + hh) ) {
1885                                         if (y > ( header_height + real_y + (hh * 0.8))) {
1886                                                 pos = "below";
1887                                         } else if (y > ( header_height + real_y + (hh * 0.2))) {
1888                                                 pos = "over";
1889                                         } else {
1890                                                 pos = "above";
1891                                                 }
1892                                          GLib.debug("getRowAt return : %d, %s", line_no, pos);
1893                                             return line_no;
1894                                     }
1895                  
1896                 
1897                                     if (real_y + hh > y) {
1898                                         return -1;
1899                                 }
1900                                 real_y += hh;
1901                                 child = child.get_next_sibling(); 
1902                         }
1903                         return -1;
1904                 
1905                  }
1906         }
1907         public class Xcls_deletemenu : Object
1908         {
1909                 public Gtk.Popover el;
1910                 private Xcls_LeftProps  _this;
1911
1912
1913                         // my vars (def)
1914
1915                 // ctor
1916                 public Xcls_deletemenu(Xcls_LeftProps _owner )
1917                 {
1918                         _this = _owner;
1919                         _this.deletemenu = this;
1920                         this.el = new Gtk.Popover();
1921
1922                         // my vars (dec)
1923
1924                         // set gobject values
1925                         var child_1 = new Xcls_Box43( _this );
1926                         this.el.child = child_1.el;
1927                 }
1928
1929                 // user defined functions
1930         }
1931         public class Xcls_Box43 : Object
1932         {
1933                 public Gtk.Box el;
1934                 private Xcls_LeftProps  _this;
1935
1936
1937                         // my vars (def)
1938
1939                 // ctor
1940                 public Xcls_Box43(Xcls_LeftProps _owner )
1941                 {
1942                         _this = _owner;
1943                         this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
1944
1945                         // my vars (dec)
1946
1947                         // set gobject values
1948                         var child_1 = new Xcls_Button44( _this );
1949                         child_1.ref();
1950                         this.el.append( child_1.el );
1951                 }
1952
1953                 // user defined functions
1954         }
1955         public class Xcls_Button44 : Object
1956         {
1957                 public Gtk.Button el;
1958                 private Xcls_LeftProps  _this;
1959
1960
1961                         // my vars (def)
1962
1963                 // ctor
1964                 public Xcls_Button44(Xcls_LeftProps _owner )
1965                 {
1966                         _this = _owner;
1967                         this.el = new Gtk.Button();
1968
1969                         // my vars (dec)
1970
1971                         // set gobject values
1972                         this.el.label = "Delete";
1973
1974                         //listeners
1975                         this.el.clicked.connect( ( ) => {
1976                                 
1977                         
1978                                 var n = (JsRender.NodeProp) _this.selmodel.el.selected_item;
1979                         
1980                                 _this.deletemenu.el.hide();
1981                                 _this.node.remove_prop(n);
1982                         });
1983                 }
1984
1985                 // user defined functions
1986         }
1987
1988
1989
1990         public class Xcls_GestureClick45 : Object
1991         {
1992                 public Gtk.GestureClick el;
1993                 private Xcls_LeftProps  _this;
1994
1995
1996                         // my vars (def)
1997
1998                 // ctor
1999                 public Xcls_GestureClick45(Xcls_LeftProps _owner )
2000                 {
2001                         _this = _owner;
2002                         this.el = new Gtk.GestureClick();
2003
2004                         // my vars (dec)
2005
2006                         // set gobject values
2007
2008                         //listeners
2009                         this.el.pressed.connect( (n_press, in_x, in_y) => {
2010                         
2011                                 GLib.debug("Prssed %d", (int)  this.el.get_current_button());
2012                                 
2013                                 var col = _this.view.getColAt(in_x, in_y);
2014                                 if (col != 0) {
2015                                         return;
2016                                 }
2017                                 string pos;
2018                                 var row = _this.view.getRowAt(in_x, in_y, out pos);
2019                                 
2020                                 if (row < 0) {
2021                                         return;
2022                         
2023                                 }
2024                                 GLib.debug("hit row %d", row);
2025                                 var prop = _this.selmodel.getPropAt(row);
2026                                 _this.selmodel.selectProp(prop);
2027                         
2028                                 //var point_at = _this.view.getWidgetAtRow(row);
2029                                 
2030                                         // need to shift down, as ev.y does not inclucde header apparently..
2031                                 // or popover might be trying to do a central?
2032                         //       _this.view.editPropertyDetails(prop, (int) in_y + 12); 
2033                                  _this.stop_editor();
2034                              _this.view.popover.show(
2035                                                 _this.view.el, 
2036                                                 _this.node, prop,  
2037                                          (int)in_y);
2038                             
2039                             
2040                               
2041                         });
2042                 }
2043
2044                 // user defined functions
2045         }
2046
2047         public class Xcls_GestureClick46 : Object
2048         {
2049                 public Gtk.GestureClick el;
2050                 private Xcls_LeftProps  _this;
2051
2052
2053                         // my vars (def)
2054
2055                 // ctor
2056                 public Xcls_GestureClick46(Xcls_LeftProps _owner )
2057                 {
2058                         _this = _owner;
2059                         this.el = new Gtk.GestureClick();
2060
2061                         // my vars (dec)
2062
2063                         // set gobject values
2064                         this.el.button = 3;
2065
2066                         //listeners
2067                         this.el.pressed.connect( (n_press, in_x, in_y) => {
2068                         
2069                                 
2070                                  
2071                                 string pos;
2072                                 var row = _this.view.getRowAt(in_x, in_y, out pos);
2073                                 
2074                                 if (row < 0) {
2075                                         return;
2076                         
2077                                 }
2078                                 
2079                                 _this.stop_editor();
2080                                 GLib.debug("hit row %d", row);
2081                                 var prop = _this.selmodel.getPropAt(row);
2082                                 _this.selmodel.selectProp(prop);
2083                                 
2084                                 
2085                                 
2086                                 GLib.debug("Prssed %d", (int)  this.el.get_current_button());
2087                                 //_this.deletemenu.el.set_parent(_this.view.el);
2088                                 if (_this.deletemenu.el.parent == null) {
2089                                         _this.deletemenu.el.set_parent(_this.main_window.el);
2090                                 }
2091                                 
2092                                 
2093                                  
2094                                 _this.deletemenu.el.set_offset(
2095                                                 (int)in_x  - _this.view.el.get_width() ,
2096                                                 (int)in_y - _this.view.el.get_height()
2097                                         );
2098                                 _this.deletemenu.el.set_position(Gtk.PositionType.BOTTOM); 
2099                             _this.deletemenu.el.popup();
2100                               
2101                         });
2102                 }
2103
2104                 // user defined functions
2105         }
2106
2107         public class Xcls_selmodel : Object
2108         {
2109                 public Gtk.SingleSelection el;
2110                 private Xcls_LeftProps  _this;
2111
2112
2113                         // my vars (def)
2114
2115                 // ctor
2116                 public Xcls_selmodel(Xcls_LeftProps _owner )
2117                 {
2118                         _this = _owner;
2119                         _this.selmodel = this;
2120                         new Xcls_model( _this );
2121                         this.el = new Gtk.SingleSelection( _this.model.el );
2122
2123                         // my vars (dec)
2124
2125                         // set gobject values
2126                         this.el.can_unselect = true;
2127                 }
2128
2129                 // user defined functions
2130                 public int propToRow (JsRender.NodeProp prop) {
2131                         for (var i = 0 ; i < this.el.n_items; i++) {
2132                                 var r = (JsRender.NodeProp)this.el.get_item(i);
2133                                 if (r.equals(prop)) {
2134                                         return i;
2135                                         
2136                                 }
2137                         }
2138                         return -1;
2139                          
2140                 }
2141                 public void startEditing (JsRender.NodeProp prop) {
2142                         // should we call select?? - caller does int (from windowstate)
2143                         
2144                 }
2145                 public void selectProp (JsRender.NodeProp prop) {
2146                         for (var i = 0 ; i < this.el.n_items; i++) {
2147                                 var r = (JsRender.NodeProp)this.el.get_item(i);
2148                                 if (r.equals(prop)) {
2149                                         this.el.selected = i;
2150                                         return;
2151                                 }
2152                         }
2153                          
2154                 }
2155                 public JsRender.NodeProp getPropAt (uint row) {
2156                 
2157                         return   (JsRender.NodeProp) this.el.get_item(row);
2158                 
2159                          
2160                 }
2161         }
2162         public class Xcls_model : Object
2163         {
2164                 public GLib.ListStore el;
2165                 private Xcls_LeftProps  _this;
2166
2167
2168                         // my vars (def)
2169
2170                 // ctor
2171                 public Xcls_model(Xcls_LeftProps _owner )
2172                 {
2173                         _this = _owner;
2174                         _this.model = this;
2175                         this.el = new GLib.ListStore(typeof(JsRender.NodeProp));
2176
2177                         // my vars (dec)
2178
2179                         // set gobject values
2180                 }
2181
2182                 // user defined functions
2183         }
2184
2185
2186         public class Xcls_keycol : Object
2187         {
2188                 public Gtk.ColumnViewColumn el;
2189                 private Xcls_LeftProps  _this;
2190
2191
2192                         // my vars (def)
2193
2194                 // ctor
2195                 public Xcls_keycol(Xcls_LeftProps _owner )
2196                 {
2197                         _this = _owner;
2198                         _this.keycol = this;
2199                         var child_1 = new Xcls_SignalListItemFactory50( _this );
2200                         child_1.ref();
2201                         this.el = new Gtk.ColumnViewColumn( "Property", child_1.el );
2202
2203                         // my vars (dec)
2204
2205                         // set gobject values
2206                         this.el.id = "keycol";
2207                         this.el.expand = true;
2208                         this.el.resizable = true;
2209                 }
2210
2211                 // user defined functions
2212         }
2213         public class Xcls_SignalListItemFactory50 : Object
2214         {
2215                 public Gtk.SignalListItemFactory el;
2216                 private Xcls_LeftProps  _this;
2217
2218
2219                         // my vars (def)
2220
2221                 // ctor
2222                 public Xcls_SignalListItemFactory50(Xcls_LeftProps _owner )
2223                 {
2224                         _this = _owner;
2225                         this.el = new Gtk.SignalListItemFactory();
2226
2227                         // my vars (dec)
2228
2229                         // set gobject values
2230
2231                         //listeners
2232                         this.el.setup.connect( (listitem) => {
2233                                 var lbl = new Gtk.Label("");
2234                                 ((Gtk.ListItem)listitem).set_child(lbl);
2235                                 lbl.justify = Gtk.Justification.LEFT;
2236                                 lbl.xalign = 1;
2237                                 lbl.use_markup = true;
2238                                 lbl.ellipsize = Pango.EllipsizeMode.START;
2239                                 /*lbl.changed.connect(() => {
2240                                         // notify and save the changed value...
2241                                         //var prop = (JsRender.NodeProp) ((Gtk.ListItem)listitem.get_item());
2242                                  
2243                                 //prop.val = lbl.text;
2244                                 //_this.updateIter(iter,prop);
2245                                 _this.changed();
2246                                 });
2247                                 */
2248                                 ((Gtk.ListItem)listitem).activatable = true;
2249                         });
2250                         this.el.bind.connect( (listitem) => {
2251                          var lb = (Gtk.Label) ((Gtk.ListItem)listitem).get_child();
2252                          var item = (JsRender.NodeProp) ((Gtk.ListItem)listitem).get_item();
2253                         
2254                         
2255                         item.bind_property("to_display_name_prop",
2256                                             lb, "label",
2257                                            GLib.BindingFlags.SYNC_CREATE);
2258                         item.bind_property("to_tooltip_name_prop",
2259                                             lb, "tooltip_markup",
2260                                            GLib.BindingFlags.SYNC_CREATE);
2261                         // was item (1) in old layout
2262                          
2263                         
2264                         });
2265                 }
2266
2267                 // user defined functions
2268         }
2269
2270
2271         public class Xcls_valcol : Object
2272         {
2273                 public Gtk.ColumnViewColumn el;
2274                 private Xcls_LeftProps  _this;
2275
2276
2277                         // my vars (def)
2278
2279                 // ctor
2280                 public Xcls_valcol(Xcls_LeftProps _owner )
2281                 {
2282                         _this = _owner;
2283                         _this.valcol = this;
2284                         var child_1 = new Xcls_SignalListItemFactory52( _this );
2285                         child_1.ref();
2286                         this.el = new Gtk.ColumnViewColumn( "Value", child_1.el );
2287
2288                         // my vars (dec)
2289
2290                         // set gobject values
2291                         this.el.id = "valcol";
2292                         this.el.expand = true;
2293                         this.el.resizable = true;
2294                 }
2295
2296                 // user defined functions
2297         }
2298         public class Xcls_SignalListItemFactory52 : Object
2299         {
2300                 public Gtk.SignalListItemFactory el;
2301                 private Xcls_LeftProps  _this;
2302
2303
2304                         // my vars (def)
2305                 public bool is_setting;
2306
2307                 // ctor
2308                 public Xcls_SignalListItemFactory52(Xcls_LeftProps _owner )
2309                 {
2310                         _this = _owner;
2311                         this.el = new Gtk.SignalListItemFactory();
2312
2313                         // my vars (dec)
2314                         this.is_setting = false;
2315
2316                         // set gobject values
2317
2318                         //listeners
2319                         this.el.setup.connect( (listitem) => {
2320                                 var hb = new Gtk.Box(Gtk.Orientation.HORIZONTAL,0);
2321                                 var elbl  = new Gtk.EditableLabel("");
2322                                 elbl.hexpand = true;
2323                                 hb.append(elbl);
2324                                 var lbl  = new Gtk.Label("");
2325                                 hb.append(lbl);
2326                                 lbl.hexpand = true;
2327                                 lbl.use_markup = true;
2328                                 lbl.xalign =0;
2329                                 lbl.ellipsize = Pango.EllipsizeMode.END;
2330                                 var cb = new Gtk.DropDown(new Gtk.StringList({}), null);
2331                                 cb.hexpand = true;
2332                          
2333                                 hb.append(cb);
2334                                 ((Gtk.ListItem)listitem).set_child(hb);
2335                                  
2336                                  var ef = new Gtk.EventControllerFocus();
2337                                  ef.enter.connect(() => {
2338                                          _this.stop_editor();
2339                                           var prop = (JsRender.NodeProp)((Gtk.ListItem)listitem).get_item();
2340                                          _this.selmodel.selectProp(prop);               
2341                                  });
2342                                  elbl.add_controller(ef);
2343                                  
2344                                  
2345                                   // dropdown??? - stop editing, and highliht node
2346                                  var tb = (Gtk.ToggleButton) cb.get_first_child();
2347                                  tb.clicked.connect(() => {
2348                                          var prop = (JsRender.NodeProp)((Gtk.ListItem)listitem).get_item();
2349                                                 
2350                                          _this.stop_editor();
2351                                          _this.selmodel.selectProp(prop);
2352                                          
2353                                  });
2354                                 elbl.changed.connect(() => {
2355                                         // notify and save the changed value...
2356                                         
2357                                 //_this.updateIter(iter,prop);
2358                                 // this should happen automatically
2359                                 
2360                                 if (!_this.loading && !this.is_setting) {
2361                                             var prop = (JsRender.NodeProp)((Gtk.ListItem)listitem).get_item();
2362                                                  
2363                                          
2364                                             prop.val = elbl.text;
2365                                          GLib.debug("calling changed");
2366                                         _this.changed();
2367                                        
2368                                 }
2369                                 
2370                                 });
2371                                 
2372                                 
2373                                 cb.notify["selected"].connect(() => {
2374                                         // dropdown selection changed.
2375                                         
2376                                         
2377                                         
2378                                 //_this.updateIter(iter,prop);
2379                                 if (!_this.loading && !this.is_setting) {
2380                                             var prop = (JsRender.NodeProp)((Gtk.ListItem)listitem).get_item();
2381                                             var model = (Gtk.StringList)cb.model;
2382                                             prop.val =   model.get_string(cb.selected);
2383                                             GLib.debug("property set to %s", prop.val);
2384                                         GLib.debug("calling changed");
2385                                         _this.changed();
2386                                          
2387                                 }
2388                                 
2389                                         
2390                                 });
2391                                 var gc = new Gtk.GestureClick();
2392                                 lbl.add_controller(gc);
2393                                 gc.pressed.connect(() => {
2394                                         var prop = (JsRender.NodeProp)((Gtk.ListItem)listitem).get_item();
2395                                          _this.stop_editor();
2396                                     _this.show_editor(_this.file, prop.parent, prop);
2397                                 });
2398                                   
2399                                 
2400                                 
2401                         });
2402                         this.el.bind.connect( (listitem) => {
2403                                  this.is_setting = true;
2404                         
2405                         
2406                                 var bx = (Gtk.Box) ((Gtk.ListItem)listitem).get_child();
2407                          
2408                                 
2409                                 
2410                                 
2411                                 var elbl = (Gtk.EditableLabel)bx.get_first_child();
2412                                 var lbl = (Gtk.Label) elbl.get_next_sibling();
2413                                 var cb  = (Gtk.DropDown) lbl.get_next_sibling();
2414                                 // decide if it's a combo or editable text..
2415                                 var model = (Gtk.StringList) cb.model;
2416                          
2417                                 elbl.hide();
2418                                 lbl.hide();
2419                                 cb.hide();
2420                                 
2421                                 var prop = (JsRender.NodeProp) ((Gtk.ListItem)listitem).get_item();
2422                                 //GLib.debug("prop = %s", prop.get_type().name());
2423                                 //GLib.debug("prop.val = %s", prop.val);
2424                                 //GLib.debug("prop.key = %s", prop.to_display_name());
2425                                  
2426                             var use_textarea =  prop.useTextArea();
2427                             
2428                             
2429                             var pal = _this.file.project.palete;
2430                                 
2431                             string[] opts;
2432                             var has_opts = pal.typeOptions(_this.node.fqn(), prop.name, prop.rtype, out opts);
2433                             
2434                             if (!has_opts && prop.ptype == JsRender.NodePropType.RAW) {
2435                                 use_textarea = true;
2436                             }
2437                             
2438                             
2439                             if (use_textarea) {
2440                                 prop.bind_property("val_short",
2441                                             lbl, "label",
2442                                            GLib.BindingFlags.SYNC_CREATE);
2443                                 prop.bind_property("val_tooltip",
2444                                             lbl, "tooltip_markup",
2445                                            GLib.BindingFlags.SYNC_CREATE);
2446                                 lbl.show();
2447                                         this.is_setting = false;        
2448                                 return;
2449                                 
2450                             }
2451                              
2452                                 
2453                                 
2454                                 
2455                                 
2456                                 // others... - fill in options for true/false?
2457                                    // GLib.debug (ktype.up());
2458                             if (has_opts) {
2459                                 
2460                                         while(model.get_n_items() > 0) {
2461                                                 model.remove(0);
2462                                         }
2463                                         cb.show();
2464                                         // can not remove - hopefully always empty.
2465                                         var sel = -1;
2466                                         for(var i = 0; i < opts.length; i ++) {
2467                                                 model.append( opts[i]);
2468                                                 // not sure this is a great idea... 
2469                                                 if (opts[i].down() == prop.val.down()) {
2470                                                         sel = i;
2471                                                 }
2472                                         }
2473                                         GLib.debug("Set selected item to %d", sel);
2474                                         cb.set_selected(sel > -1 ? sel : Gtk.INVALID_LIST_POSITION); 
2475                                         this.is_setting = false;        
2476                                         return ;
2477                             }
2478                                                           
2479                                 // see if type is a Enum.
2480                                 // triggers a changed event
2481                          
2482                                 elbl.set_text(prop.val);
2483                          
2484                                 elbl.show();
2485                                 this.is_setting = false;                         
2486                                 
2487                                 
2488                                 
2489                          
2490                         
2491                         });
2492                 }
2493
2494                 // user defined functions
2495         }
2496
2497
2498         public class Xcls_ContextMenu : Object
2499         {
2500                 public Gtk.Popover el;
2501                 private Xcls_LeftProps  _this;
2502
2503
2504                         // my vars (def)
2505
2506                 // ctor
2507                 public Xcls_ContextMenu(Xcls_LeftProps _owner )
2508                 {
2509                         _this = _owner;
2510                         _this.ContextMenu = this;
2511                         this.el = new Gtk.Popover();
2512
2513                         // my vars (dec)
2514
2515                         // set gobject values
2516                         var child_1 = new Xcls_Box54( _this );
2517                         this.el.child = child_1.el;
2518                 }
2519
2520                 // user defined functions
2521         }
2522         public class Xcls_Box54 : Object
2523         {
2524                 public Gtk.Box el;
2525                 private Xcls_LeftProps  _this;
2526
2527
2528                         // my vars (def)
2529
2530                 // ctor
2531                 public Xcls_Box54(Xcls_LeftProps _owner )
2532                 {
2533                         _this = _owner;
2534                         this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
2535
2536                         // my vars (dec)
2537
2538                         // set gobject values
2539                         var child_1 = new Xcls_Button55( _this );
2540                         child_1.ref();
2541                         this.el.append( child_1.el );
2542                 }
2543
2544                 // user defined functions
2545         }
2546         public class Xcls_Button55 : Object
2547         {
2548                 public Gtk.Button el;
2549                 private Xcls_LeftProps  _this;
2550
2551
2552                         // my vars (def)
2553
2554                 // ctor
2555                 public Xcls_Button55(Xcls_LeftProps _owner )
2556                 {
2557                         _this = _owner;
2558                         this.el = new Gtk.Button();
2559
2560                         // my vars (dec)
2561
2562                         // set gobject values
2563                         this.el.label = "Delete";
2564
2565                         //listeners
2566                         this.el.activate.connect( ( )  =>{
2567                                 _this.deleteSelected();
2568                                 
2569                         });
2570                 }
2571
2572                 // user defined functions
2573         }
2574
2575
2576
2577
2578
2579 }