2 * This file is part of gtkD.
4 * gtkD is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation; either version 2.1 of the License, or
7 * (at your option) any later version.
9 * gtkD is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public License
15 * along with gtkD; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 // generated automatically - do not change
20 // find conversion definition on APILookup.txt
21 // implement new conversion functionalities on the wrap.utils pakage
24 * Conversion parameters:
25 * inFile = GtkCheckButton.html
27 * outFile = CheckButton
28 * strct = GtkCheckButton
44 * - gtk_check_button_new_with_label
45 * - gtk_check_button_new_with_mnemonic
55 module gtk
.CheckButton
;
61 import tango
.io
.Stdout
; // use the tango loging?
65 private import gtkc
.gtktypes
;
67 private import gtkc
.gtk
;
70 private import glib
.Str
;
71 private import gtk
.Button
;
72 private import glib
.Str
;
79 * A GtkCheckButton places a discrete GtkToggleButton next to a widget, (usually a GtkLabel). See the section on GtkToggleButton widgets for more information about toggle/check buttons.
80 * The important signal ('toggled') is also inherited from GtkToggleButton.
82 private import gtk
.ToggleButton
;
83 public class CheckButton
: ToggleButton
86 /** the main Gtk struct */
87 protected GtkCheckButton
* gtkCheckButton
;
90 public GtkCheckButton
* getCheckButtonStruct()
92 return gtkCheckButton
;
96 /** the main Gtk struct as a void* */
97 protected void* getStruct()
99 return cast(void*)gtkCheckButton
;
103 * Sets our main struct and passes it to the parent class
105 public this (GtkCheckButton
* gtkCheckButton
)
109 if ( gtkCheckButton
is null )
114 Stdout("struct gtkCheckButton is null on constructor").newline
;
118 printf("struct gtkCheckButton is null on constructor");
125 assert(gtkCheckButton
!is null, "struct gtkCheckButton is null on constructor");
127 super(cast(GtkToggleButton
*)gtkCheckButton
);
128 this.gtkCheckButton
= gtkCheckButton
;
132 * Creates a new GtkCheckButton with a GtkLabel to the right of it.
133 * If mnemonic is true the label
134 * will be created using gtk_label_new_with_mnemonic(), so underscores
135 * in label indicate the mnemonic for the check button.
137 * The text of the button, with an underscore in front of the
140 * the text for the check button.
144 public this (char[] label
, bool mnemonic
=true)
148 // GtkWidget* gtk_check_button_new_with_mnemonic (const gchar *label);
149 this(cast(GtkCheckButton
*)gtk_check_button_new_with_mnemonic(Str
.toStringz(label
)) );
153 // GtkWidget* gtk_check_button_new_with_label (const gchar *label);
154 this(cast(GtkCheckButton
*)gtk_check_button_new_with_label(Str
.toStringz(label
)) );
158 public this(char[] label
, void delegate(CheckButton
) onClicked
, bool mnemonic
=true)
160 this(label
, mnemonic
);
161 addOnClicked(cast(void delegate(Button
))onClicked
);
170 * Creates a new GtkCheckButton.
176 // GtkWidget* gtk_check_button_new (void);
177 this(cast(GtkCheckButton
*)gtk_check_button_new() );