2 valac --pkg gio-2.0 --pkg posix --pkg gtk+-3.0 --pkg libnotify --pkg gtksourceview-3.0 --pkg libwnck-3.0 \
3 /tmp/WindowLeftTree.vala -o /tmp/WindowLeftTree
8 static int main (string[] args) {
10 new Xcls_WindowLeftTree();
11 WindowLeftTree.show_all();
18 public static Xcls_WindowLeftTree WindowLeftTree;
20 public class Xcls_WindowLeftTree : Object
23 private Xcls_WindowLeftTree _this;
25 public Xcls_LeftTreeMenu LeftTreeMenu;
28 public Xcls_WindowLeftTree()
30 this.el = new Gtk.Window( );
32 WindowLeftTree = this;
37 this.el.shadow_type = Gtk.ShadowType.IN;
38 var child_0 = new Xcls_button(_this);
39 this.el.add ( child_0.el );
40 _this.LeftTreeMenu = new Xcls_LeftTreeMenu(_this);
43 this.el.set_policy (Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC);
48 // skip xvala_id - not pipe
49 public class Xcls_button : Object
52 private Xcls_WindowLeftTree _this;
55 public Xcls_button(Xcls_WindowLeftTree _owner)
57 this.el = new Gtk.Button.with_label ("Click me (0)");
64 this.el.button_press_event.connect( ( ev) => {
65 //console.log("button press?");
69 if (ev.type != Gdk.EventType.BUTTON_PRESS || ev.button != 3) {
70 //print("click" + ev.type);
75 _this.LeftTreeMenu.el.set_screen(Gdk.Screen.get_default());
76 _this.LeftTreeMenu.el.show_all();
77 _this.LeftTreeMenu.el.popup(null, null, null, ev.button, ev.time);
78 // print("click:" + res.path.to_string());
90 public class Xcls_LeftTreeMenu : Object
93 private Xcls_WindowLeftTree _this;
99 public Xcls_LeftTreeMenu(Xcls_WindowLeftTree _owner)
101 print("Xcls_LeftTreeMenu:Ctor called\n");
105 this.el = new Gtk.Menu();
106 _this.LeftTreeMenu = this;
110 // set gobject values
111 var child_0 = new Xcls_MenuItem7(_this);
112 this.el.add ( child_0.el );
113 var child_1 = new Xcls_MenuItem8(_this);
114 this.el.add ( child_1.el );
117 // userdefined functions
119 // skip id - not pipe
121 // skip pack - not pipe
123 // skip xtype - not pipe
125 // skip |xns - no return type
127 // skip items - not pipe
129 // skip xvala_cls - not pipe
131 // skip xvala_xcls - not pipe
133 // skip xvala_id - not pipe
135 public class Xcls_MenuItem7 : Object
137 public Gtk.MenuItem el;
138 private Xcls_WindowLeftTree _this;
144 public Xcls_MenuItem7(Xcls_WindowLeftTree _owner)
149 this.el = new Gtk.MenuItem.with_label("Delete Element");
152 // set gobject values
153 //this.el.label = "Delete Element";
154 print("add activate\n");
158 this.el.select.connect( ( ) => {
166 // userdefined functions
168 // skip listeners - not pipe
170 // skip label - already used
172 // skip pack - not pipe
174 // skip xtype - not pipe
176 // skip |xns - no return type
178 // skip xvala_cls - not pipe
180 // skip xvala_xcls - not pipe
182 // skip xvala_id - not pipe
184 public class Xcls_MenuItem8 : Object
186 public Gtk.MenuItem el;
187 private Xcls_WindowLeftTree _this;
193 public Xcls_MenuItem8(Xcls_WindowLeftTree _owner)
195 this.el = new Gtk.MenuItem();
200 // set gobject values
201 this.el.label = "Save as Template";
204 this.el.activate.connect( () => {
211 // userdefined functions
213 // skip listeners - not pipe
215 // skip label - already used
217 // skip pack - not pipe
219 // skip xtype - not pipe
221 // skip |xns - no return type
223 // skip xvala_cls - not pipe
225 // skip xvala_xcls - not pipe
227 // skip xvala_id - not pipe