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 = GtkRadioToolButton.html
27 * outFile = RadioToolButton
28 * strct = GtkRadioToolButton
30 * ctorStrct=GtkToolItem
31 * clss = RadioToolButton
39 * - gtk_radio_tool_button_
50 * - GtkToolItem* -> ToolItem
55 module gtk
.RadioToolButton
;
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
.ToolItem
;
72 private import glib
.ListSG
;
79 * A GtkRadioToolButton is a GtkToolItem that contains a radio button,
80 * that is, a button that is part of a group of toggle buttons where only
81 * one button can be active at a time.
82 * Use gtk_radio_tool_button_new() to create a new
83 * GtkRadioToolButton. use gtk_radio_tool_button_new_from_widget() to
84 * create a new GtkRadioToolButton that is part of the same group as an
85 * existing GtkRadioToolButton. Use
86 * gtk_radio_tool_button_new_from_stock() or
87 * gtk_radio_tool_button_new_from_widget_with_stock() to create a new
88 * GtkRAdioToolButton containing a stock item.
90 private import gtk
.ToggleToolButton
;
91 public class RadioToolButton
: ToggleToolButton
94 /** the main Gtk struct */
95 protected GtkRadioToolButton
* gtkRadioToolButton
;
98 public GtkRadioToolButton
* getRadioToolButtonStruct()
100 return gtkRadioToolButton
;
104 /** the main Gtk struct as a void* */
105 protected void* getStruct()
107 return cast(void*)gtkRadioToolButton
;
111 * Sets our main struct and passes it to the parent class
113 public this (GtkRadioToolButton
* gtkRadioToolButton
)
117 if ( gtkRadioToolButton
is null )
122 Stdout("struct gtkRadioToolButton is null on constructor").newline
;
126 printf("struct gtkRadioToolButton is null on constructor");
133 assert(gtkRadioToolButton
!is null, "struct gtkRadioToolButton is null on constructor");
135 super(cast(GtkToggleToolButton
*)gtkRadioToolButton
);
136 this.gtkRadioToolButton
= gtkRadioToolButton
;
144 * Creates a new GtkRadioToolButton, adding it to group.
146 * An existing radio button group, or NULL if you are creating a new group
148 * The new GtkRadioToolButton
151 public this (ListSG group
)
153 // GtkToolItem* gtk_radio_tool_button_new (GSList *group);
154 this(cast(GtkRadioToolButton
*)gtk_radio_tool_button_new((group
is null) ?
null : group
.getListSGStruct()) );
158 * Creates a new GtkRadioToolButton, adding it to group.
159 * The new GtkRadioToolButton will contain an icon and label from the
160 * stock item indicated by stock_id.
162 * an existing radio button group, or NULL if you are creating a new group
164 * the name of a stock item
166 * The new GtkRadioToolItem
169 public this (ListSG group
, char[] stockId
)
171 // GtkToolItem* gtk_radio_tool_button_new_from_stock (GSList *group, const gchar *stock_id);
172 this(cast(GtkRadioToolButton
*)gtk_radio_tool_button_new_from_stock((group
is null) ?
null : group
.getListSGStruct(), Str
.toStringz(stockId
)) );
176 * Creates a new GtkRadioToolButton adding it to the same group as gruup
178 * An existing GtkRadioToolButton
180 * The new GtkRadioToolButton
185 // GtkToolItem* gtk_radio_tool_button_new_from_widget (GtkRadioToolButton *group);
186 this(cast(GtkRadioToolButton
*)gtk_radio_tool_button_new_from_widget(gtkRadioToolButton
) );
190 * Creates a new GtkRadioToolButton adding it to the same group as group.
191 * The new GtkRadioToolButton will contain an icon and label from the
192 * stock item indicated by stock_id.
194 * An existing GtkRadioToolButton.
196 * the name of a stock item
198 * A new GtkRadioToolButton
201 public this (char[] stockId
)
203 // GtkToolItem* gtk_radio_tool_button_new_with_stock_from_widget (GtkRadioToolButton *group, const gchar *stock_id);
204 this(cast(GtkRadioToolButton
*)gtk_radio_tool_button_new_with_stock_from_widget(gtkRadioToolButton
, Str
.toStringz(stockId
)) );
208 * Returns the radio button group button belongs to.
210 * a GtkRadioToolButton
212 * The group button belongs to.
215 public ListSG
getGroup()
217 // GSList* gtk_radio_tool_button_get_group (GtkRadioToolButton *button);
218 return new ListSG( gtk_radio_tool_button_get_group(gtkRadioToolButton
) );
222 * Adds button to group, removing it from the group it belonged to before.
224 * a GtkRadioToolButton
226 * an existing radio button group
229 * The "group" property
230 * "group" GtkRadioToolButton : Write
231 * Sets a new group for a radio tool button.
237 * An ancestor class of GtkRadioToolButton. The properties
238 * "label_widget", "label", "icon_widget", and "stock_id" on
239 * GtkToolButton determine the label and icon used on a
240 * GtkRadioToolButton.
241 * GtkSeparatorToolItem
242 * A subclass of GtkToolItem that separates groups of
243 * items on a toolbar. It is usually a good idea to put a separator
244 * before and after a group of GtkRadioToolButtons on a GtkToolbar.
246 public void setGroup(ListSG group
)
248 // void gtk_radio_tool_button_set_group (GtkRadioToolButton *button, GSList *group);
249 gtk_radio_tool_button_set_group(gtkRadioToolButton
, (group
is null) ?
null : group
.getListSGStruct());