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