2 valac --pkg gio-2.0 --pkg posix --pkg gtk+-3.0 \
3 /tmp/WindowLeftTree.vala -o /tmp/WindowLeftTree
8 static int main (string[] args) {
10 new Xcls_WindowLeftTree();
11 WindowLeftTree.show_all();
17 int main (string[] args) {
19 new JsRender.Lang_Class();
20 GLib.Log.set_always_fatal(LogLevelFlags.LEVEL_ERROR | LogLevelFlags.LEVEL_CRITICAL);
21 //print ("Drop points for Gtk.ScrolledWindow are : " +
22 // string.joinv(", " , Palete.factory("Gtk").getDropList("Gtk.ScrolledWindow"))
25 //testBuilderFile("Editor", "JSON");
26 //testBuilderFile("Editor", "JS");
27 //testBuilderFile("Editor", "VALA");
28 var a = new Xcls_WindowLeftTree();
38 public static Xcls_WindowLeftTree WindowLeftTree;
40 public class Xcls_WindowLeftTree : Object
43 private Xcls_WindowLeftTree _this;
45 public Xcls_LeftTreeMenu LeftTreeMenu;
48 public Xcls_WindowLeftTree()
50 this.el = new Gtk.Window( );
52 WindowLeftTree = this;
57 this.el.shadow_type = Gtk.ShadowType.IN;
58 var child_0 = new Xcls_button(_this);
59 this.el.add ( child_0.el );
60 _this.LeftTreeMenu = new Xcls_LeftTreeMenu(_this);
63 this.el.set_policy (Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC);
68 // skip xvala_id - not pipe
69 public class Xcls_button : Object
72 private Xcls_WindowLeftTree _this;
75 public Xcls_button(Xcls_WindowLeftTree _owner)
77 this.el = new Gtk.Button.with_label ("Click me (0)");
84 this.el.button_press_event.connect( ( ev) => {
85 //console.log("button press?");
89 if (ev.type != Gdk.EventType.BUTTON_PRESS || ev.button != 3) {
90 //print("click" + ev.type);
95 _this.LeftTreeMenu.el.set_screen(Gdk.Screen.get_default());
96 _this.LeftTreeMenu.el.show_all();
97 _this.LeftTreeMenu.el.popup(null, null, null, ev.button, ev.time);
98 // print("click:" + res.path.to_string());
110 public class Xcls_LeftTreeMenu : Object
113 private Xcls_WindowLeftTree _this;
119 public Xcls_LeftTreeMenu(Xcls_WindowLeftTree _owner)
121 print("Xcls_LeftTreeMenu:Ctor called\n");
125 this.el = new Gtk.Menu();
126 _this.LeftTreeMenu = this;
130 // set gobject values
131 var child_0 = new Xcls_MenuItem7(_this);
132 this.el.add ( child_0.el );
133 var child_1 = new Xcls_MenuItem8(_this);
134 this.el.add ( child_1.el );
137 // userdefined functions
139 // skip id - not pipe
141 // skip pack - not pipe
143 // skip xtype - not pipe
145 // skip |xns - no return type
147 // skip items - not pipe
149 // skip xvala_cls - not pipe
151 // skip xvala_xcls - not pipe
153 // skip xvala_id - not pipe
155 public class Xcls_MenuItem7 : Object
157 public Gtk.MenuItem el;
158 private Xcls_WindowLeftTree _this;
164 public Xcls_MenuItem7(Xcls_WindowLeftTree _owner)
169 this.el = new Gtk.MenuItem.with_label("Delete Element");
172 // set gobject values
173 //this.el.label = "Delete Element";
174 print("add activate\n");
178 this.el.select.connect( ( ) => {
186 // userdefined functions
188 // skip listeners - not pipe
190 // skip label - already used
192 // skip pack - not pipe
194 // skip xtype - not pipe
196 // skip |xns - no return type
198 // skip xvala_cls - not pipe
200 // skip xvala_xcls - not pipe
202 // skip xvala_id - not pipe
204 public class Xcls_MenuItem8 : Object
206 public Gtk.MenuItem el;
207 private Xcls_WindowLeftTree _this;
213 public Xcls_MenuItem8(Xcls_WindowLeftTree _owner)
215 this.el = new Gtk.MenuItem();
220 // set gobject values
221 this.el.label = "Save as Template";
224 this.el.activate.connect( () => {
231 // userdefined functions
233 // skip listeners - not pipe
235 // skip label - already used
237 // skip pack - not pipe
239 // skip xtype - not pipe
241 // skip |xns - no return type
243 // skip xvala_cls - not pipe
245 // skip xvala_xcls - not pipe
247 // skip xvala_id - not pipe