tests/test1.vala
[app.Builder.js] / tests / test1.vala
1 /*
2  valac  --pkg gio-2.0  --pkg posix  --pkg gtk+-3.0 --pkg libnotify --pkg  libwnck-3.0 \
3       test1.vala \
4     -o /tmp/test1
5
6
7
8 */
9
10 static int main (string[] args) {
11     Gtk.init (ref args);
12     new Xcls_EditorWindow();
13     EditorWindow.showAll();
14      Gtk.main ();
15
16     return 0;
17 }
18  
19
20 public static Xcls_EditorWindow  EditorWindow;
21
22
23 public class Xcls_EditorWindow : Gtk.Window
24 {
25     public static Xcls_EditorWindow  _this;
26     public Xcls_save_button  save_button;
27     public Xcls_EditorWindow()
28     {
29          _this = this;
30          EditorWindow = this;
31          this.height_request = 300;
32          this.title = "Application Builder - Editor";
33          this.width_request = 500;
34          this.add (  new Xcls_VBox2() );
35     }
36 }
37 public class Xcls_VBox2 : Gtk.VBox
38 {
39     public Xcls_VBox2()
40     {
41          this.pack_start (  new Xcls_Toolbar3(), false,true );
42     }
43 }
44 public class Xcls_Toolbar3 : Gtk.Toolbar
45 {
46     public Xcls_Toolbar3()
47     {
48          this.add (  new Xcls_save_button() );
49     }
50 }
51 public class Xcls_save_button : Gtk.Button
52 {
53     public Xcls_save_button()
54     {
55          EditorWindow.save_button = this;
56          this.label = "Save";
57     }
58 }