1 /+
2 d code generated with makegtkdclass. 
3 PLEASE DO "NOT" EDIT THIS FILE!
4 CREATE A DERIVED CLASS INSTEAD!
5 +/
6 module mywin1controller;
7 
8 import app;
9 
10 import core.stdc.stdlib;
11 
12 import std.functional;
13 import std.experimental.logger;
14 
15 import gtk.Builder, gtk.Widget, gdk.Event;
16 import gtk.ApplicationWindow;
17 import gtk.Box;
18 import gtk.Label;
19 import gtk.Entry;
20 import gtk.Button;
21 
22 
23 class Mywin1Controller: ApplicationWindow {
24     Builder builder;
25     
26     Box vbox1;
27     Label label1;
28     Box hbox1;
29     Label label2;
30     Entry text1;
31     Button button1;
32     
33     
34     this(gtk.Application.Application application){
35         
36         builder = new Builder();
37 
38         import mywin1bytes: mywin1_bytearray;
39         if(!builder.addFromString(cast(string)mywin1_bytearray)){
40             critical("Window resource cannot be found!");
41         }
42         
43         auto s = builder.getObject("mywindow1");
44         auto win = cast(GtkApplicationWindow*)s.getObjectGStruct();
45         super(win);
46         this.setApplication(application);
47         
48         vbox1 = cast(Box)builder.getObject("vbox1");
49         label1 = cast(Label)builder.getObject("label1");
50         hbox1 = cast(Box)builder.getObject("hbox1");
51         label2 = cast(Label)builder.getObject("label2");
52         text1 = cast(Entry)builder.getObject("text1");
53         button1 = cast(Button)builder.getObject("button1");
54         
55 
56         button1.addOnClicked(toDelegate(&button1OnClicked));
57         
58         
59         this.addOnDelete(delegate bool(Event e, Widget w) {
60             exit(0);
61             return true;
62         });
63     }
64 
65     void button1OnClicked(Button aux){
66         // please override me in your derived class!
67     }    
68 
69 
70 }