]> git.draconx.ca Git - gob-dx.git/blob - examples/my-glade.gob
Replace gnulib patch with new common helper macro.
[gob-dx.git] / examples / my-glade.gob
1 requires 2.0.12
2
3 class My:Glade from Gtk:Window (GladeXML "my-glade.glade" "root")
4 /* If you don't want to specify the glade file directly, you can use a global
5    variable or a macro as follows:
6  class My:Glade from Gtk:Window (GladeXML GLADE_FILE "root")
7 */
8 {
9                 private Gtk:Label * label1 GladeXML;
10                 
11                 public GtkWidget *
12                 new(void)
13                 {
14                         MyGlade * self = GET_NEW;
15                         
16                         return GTK_WIDGET(self);
17                 }
18                 
19                 public void
20                 on_button1_clicked(self, GtkButton * button)
21                 {
22                         gtk_label_set_text(selfp->label1, "Vous venez d'appuyer sur le bouton A propos");
23                 }
24 }