2 valac --pkg gio-2.0 --pkg posix --pkg gtk+-3.0 --pkg libnotify --pkg gtksourceview-3.0 --pkg libwnck-3.0 \
3 /tmp/WindowRightPalete.vala -o /tmp/WindowRightPalete
8 static int main (string[] args) {
10 new Xcls_RightPalete();
11 WindowRightPalete.show_all();
18 public static Xcls_RightPalete WindowRightPalete;
20 public class Xcls_RightPalete
23 private static Xcls_RightPalete _this;
25 public Xcls_buttonbar buttonbar;
26 public Xcls_viewbox viewbox;
27 public Xcls_model model;
28 public Xcls_txtrender txtrender;
31 public signal void drag_end();
32 public Project.Project provider;
35 public Xcls_RightPalete()
37 this.el = new Gtk.VBox( true, 0 );
39 WindowRightPalete = this;
44 var child_0 = new Xcls_buttonbar();
45 this.el.add ( child_0.el );
46 var child_1 = new Xcls_viewbox();
47 this.el.add ( child_1.el );
50 // userdefined functions
52 // skip .signal:void:drag_end() - already used
54 // skip .Project.Project:provider - already used
58 // skip pack - not pipe
60 // skip xtype - not pipe
63 _this.buttonbar.el.show();
64 _this.viewbox.el.hide();
65 // print("TRIED TO HIDE");
67 public void showfunction() {
68 _this.buttonbar.el.hide();
69 _this.viewbox.el.show();
70 // this.get('model').expanded();
74 // skip |xns - no return type
76 // skip items - not pipe
78 // skip xvala_cls - not pipe
80 // skip xvala_xcls - not pipe
82 // skip xvala_id - not pipe
83 public class Xcls_buttonbar
90 public Xcls_buttonbar()
92 this.el = new Gtk.VBox( true, 0 );
93 _this.buttonbar = this;
98 var child_0 = new Xcls_Button3();
99 this.el.pack_start ( child_0.el , false,true );
100 var child_1 = new Xcls_Label5();
101 this.el.add ( child_1.el );
104 // userdefined functions
106 // skip |xns - no return type
108 // skip xtype - not pipe
110 // skip pack - not pipe
112 // skip id - not pipe
114 // skip items - not pipe
116 // skip xvala_cls - not pipe
118 // skip xvala_xcls - not pipe
120 // skip xvala_id - not pipe
122 public class Xcls_Button3
124 public Gtk.Button el;
129 public Xcls_Button3()
131 this.el = new Gtk.Button();
135 // set gobject values
136 var child_0 = new Xcls_Image4();
137 this.el.add ( child_0.el );
140 this.el.clicked.connect( (self) => {
145 // userdefined functions
147 // skip listeners - not pipe
149 // skip pack - not pipe
151 // skip xtype - not pipe
153 // skip |xns - no return type
155 // skip items - not pipe
157 // skip xvala_cls - not pipe
159 // skip xvala_xcls - not pipe
161 // skip xvala_id - not pipe
163 public class Xcls_Image4
172 this.el = new Gtk.Image();
176 // set gobject values
177 this.el.icon_size = Gtk.IconSize.MENU;
178 this.el.stock = Gtk.STOCK_GOTO_FIRST;
181 // userdefined functions
183 // skip |xns - no return type
185 // skip xtype - not pipe
187 // skip pack - not pipe
189 // skip |stock - already used
191 // skip |icon_size - already used
193 // skip xvala_cls - not pipe
195 // skip xvala_xcls - not pipe
197 // skip xvala_id - not pipe
199 public class Xcls_Label5
208 this.el = new Gtk.Label( "Palete" );
212 // set gobject values
216 this.el.enter_notify_event.connect( (self, event) => {
222 // userdefined functions
224 // skip listeners - not pipe
226 // skip angle - already used
228 // skip label - already used
230 // skip pack - not pipe
232 // skip xtype - not pipe
234 // skip |init - already used
236 // skip |xns - no return type
238 // skip xvala_cls - not pipe
240 // skip xvala_xcls - not pipe
242 // skip xvala_id - not pipe
244 public class Xcls_viewbox
251 public Xcls_viewbox()
253 this.el = new Gtk.VBox( true, 0 );
254 _this.viewbox = this;
258 // set gobject values
259 var child_0 = new Xcls_HBox7();
260 this.el.pack_start ( child_0.el , false,true );
261 var child_1 = new Xcls_ScrolledWindow11();
262 this.el.add ( child_1.el );
265 // userdefined functions
267 // skip |xns - no return type
269 // skip xtype - not pipe
271 // skip pack - not pipe
273 // skip id - not pipe
275 // skip items - not pipe
277 // skip xvala_cls - not pipe
279 // skip xvala_xcls - not pipe
281 // skip xvala_id - not pipe
283 public class Xcls_HBox7
292 this.el = new Gtk.HBox( true, 0 );
296 // set gobject values
297 var child_0 = new Xcls_Label8();
298 this.el.add ( child_0.el );
299 var child_1 = new Xcls_Button9();
300 this.el.pack_start ( child_1.el , false,true );
303 // userdefined functions
305 // skip |xns - no return type
307 // skip xtype - not pipe
309 // skip pack - not pipe
311 // skip items - not pipe
313 // skip xvala_cls - not pipe
315 // skip xvala_xcls - not pipe
317 // skip xvala_id - not pipe
319 public class Xcls_Label8
328 this.el = new Gtk.Label( "Palete" );
332 // set gobject values
335 // userdefined functions
337 // skip |xns - no return type
339 // skip xtype - not pipe
341 // skip pack - not pipe
343 // skip label - already used
345 // skip xvala_cls - not pipe
347 // skip xvala_xcls - not pipe
349 // skip xvala_id - not pipe
351 public class Xcls_Button9
353 public Gtk.Button el;
358 public Xcls_Button9()
360 this.el = new Gtk.Button();
364 // set gobject values
365 var child_0 = new Xcls_Image10();
366 this.el.add ( child_0.el );
369 this.el.clicked.connect( function (self) {
370 _this.RightPalete.hide();
374 // userdefined functions
376 // skip listeners - not pipe
378 // skip pack - not pipe
380 // skip xtype - not pipe
382 // skip |xns - no return type
384 // skip items - not pipe
386 // skip xvala_cls - not pipe
388 // skip xvala_xcls - not pipe
390 // skip xvala_id - not pipe
392 public class Xcls_Image10
399 public Xcls_Image10()
401 this.el = new Gtk.Image();
405 // set gobject values
406 this.el.icon_size = Gtk.IconSize.MENU;
407 this.el.stock = Gtk.STOCK_GOTO_LAST;
410 // userdefined functions
412 // skip |xns - no return type
414 // skip xtype - not pipe
416 // skip pack - not pipe
418 // skip |stock - already used
420 // skip |icon_size - already used
422 // skip xvala_cls - not pipe
424 // skip xvala_xcls - not pipe
426 // skip xvala_id - not pipe
428 public class Xcls_ScrolledWindow11
430 public Gtk.ScrolledWindow el;
435 public Xcls_ScrolledWindow11()
437 this.el = new Gtk.ScrolledWindow( null, null );
441 // set gobject values
442 this.el.shadow_type = Gtk.ShadowType.IN;
443 var child_0 = new Xcls_TreeView12();
444 this.el.add ( child_0.el );
447 // userdefined functions
449 // skip pack - not pipe
451 // skip xtype - not pipe
453 // skip |init - already used
455 // skip |shadow_type - already used
457 // skip |xns - no return type
459 // skip items - not pipe
461 // skip xvala_cls - not pipe
463 // skip xvala_xcls - not pipe
465 // skip xvala_id - not pipe
467 public class Xcls_TreeView12
469 public Gtk.TreeView el;
472 public GLib.List dropList;
473 public string dragData;
476 public Xcls_TreeView12()
478 this.el = new Gtk.TreeView();
482 // set gobject values
483 this.el.enable_tree_lines = true;
484 this.el.headers_visible = false;
485 var child_0 = new Xcls_model();
486 this.el.set_model ( child_0.el );
487 var child_1 = new Xcls_TreeViewColumn14();
488 this.el.append_column ( child_1.el );
491 this.el.drag_begin.connect( ( ctx) => {
492 // we could fill this in now...
493 // Seed.print('SOURCE: drag-begin');
498 var s = _this.selection;
500 s.get_selected(_this.model.el, out iter);
501 var path = _this.model.el.get_path(iter);
503 /// pix is a surface..
504 var pix = this.el.create_row_drag_icon ( path);
507 Gtk.drag_set_icon_surface (ctx, pix);
511 _this.model.el.get_value(iter, 0, out value);
512 if (_this.provider == null) {
515 //if (!this.get('/RightPalete').provider) {
518 this.dropList = _this.provider.getDropList((string)value);
519 this.dragData = (string) value;
524 this.el.drag_data_get.connect( (drag_context, selection_data, info, time) => {
525 //Seed.print('Palete: drag-data-get: ' + target_type);
526 if (this.el.dragData.length > 0 ) {
527 selection_data.set_text(this.dragData ,this.dragData.length);
531 //this.el.dragData = "TEST from source widget";
535 this.el.drag_end.connect( ( drag_context) => {
536 //Seed.print('SOURCE: drag-end');
539 this.dropList = null;
540 _this.drag_end(); // call signal..
541 //this.get('/LeftTree.view').highlight(false);
544 this.el.button_press_event.connect( ( event) => {
546 // if (!this.get('/Editor').save()) {
547 // // popup!! - click handled..
554 // userdefined functions
556 // skip listeners - not pipe
558 // skip .GLib.List:dropList - already used
560 // skip .string:dragData - already used
562 // skip pack - not pipe
564 // skip xtype - not pipe
566 // skip |enable_tree_lines - already used
568 // skip |headers_visible - already used
570 // skip |init - already used
572 // skip |xns - no return type
574 // skip items - not pipe
576 // skip xvala_cls - not pipe
578 // skip xvala_xcls - not pipe
580 // skip xvala_id - not pipe
582 public class Xcls_model
584 public Gtk.ListStore el;
591 this.el = new Gtk.ListStore( 2, "typeof(string),typeof(string)" );
596 // set gobject values
599 // userdefined functions
601 // skip columns - already used
603 // skip id - not pipe
605 // skip n_columns - already used
607 // skip pack - not pipe
609 // skip xtype - not pipe
610 public void load (GLib.List<string> tr, Gtk.TreeIter? iter)
615 //console.log('Project tree load: ' + tr.length);
618 //this.insert(citer,iter,0);
619 for(var i =0 ; i < tr.length(); i++) {
622 this.el.append(out citer);
624 this.el.insert(out citer,iter,-1);
627 var r = tr.nth_data(i);
629 this.el.set_value(citer, 0, r ); // title
631 //this.el.set_value(citer, 1, new GObject.Value( r)); //id
632 //if (r.cn && r.cn.length) {
633 // this.load(r.cn, citer);
639 public string getValue (Gtk.TreeIter iter, int col) {
641 this.el.get_value(iter, col , out gval);
647 // skip |xns - no return type
649 // skip xvala_cls - not pipe
651 // skip xvala_xcls - not pipe
653 // skip xvala_id - not pipe
655 public class Xcls_TreeViewColumn14
657 public Gtk.TreeViewColumn el;
662 public Xcls_TreeViewColumn14()
664 this.el = new Gtk.TreeViewColumn();
668 // set gobject values
669 var child_0 = new Xcls_txtrender();
670 this.el.pack_start ( child_0.el );
673 // userdefined functions
675 // skip pack - not pipe
677 // skip xtype - not pipe
679 // skip |init - already used
681 // skip |xns - no return type
683 // skip items - not pipe
685 // skip xvala_cls - not pipe
687 // skip xvala_xcls - not pipe
689 // skip xvala_id - not pipe
691 public class Xcls_txtrender
693 public Gtk.CellRendererText el;
698 public Xcls_txtrender()
700 this.el = new Gtk.CellRendererText();
701 _this.txtrender = this;
705 // set gobject values
708 // userdefined functions
710 // skip id - not pipe
712 // skip pack - not pipe
714 // skip xtype - not pipe
716 // skip |xns - no return type
718 // skip xvala_cls - not pipe
720 // skip xvala_xcls - not pipe
722 // skip xvala_id - not pipe