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 = GtkBin.html
48 * - GtkWidget* -> Widget
59 import tango
.io
.Stdout
; // use the tango loging?
63 private import gtkc
.gtktypes
;
65 private import gtkc
.gtk
;
68 private import gtk
.Widget
;
75 * The GtkBin widget is a container with just one child.
76 * It is not very useful itself, but it is useful for deriving subclasses,
77 * since it provides common code needed for handling a single child widget.
78 * Many GTK+ widgets are subclasses of GtkBin, including GtkWindow, GtkButton,
79 * GtkFrame, GtkHandleBox, and GtkScrolledWindow.
81 private import gtk
.Container
;
82 public class Bin
: Container
85 /** the main Gtk struct */
86 protected GtkBin
* gtkBin
;
89 public GtkBin
* getBinStruct()
95 /** the main Gtk struct as a void* */
96 protected void* getStruct()
98 return cast(void*)gtkBin
;
102 * Sets our main struct and passes it to the parent class
104 public this (GtkBin
* gtkBin
)
108 if ( gtkBin
is null )
113 Stdout("struct gtkBin is null on constructor").newline
;
117 printf("struct gtkBin is null on constructor");
124 assert(gtkBin
!is null, "struct gtkBin is null on constructor");
126 super(cast(GtkContainer
*)gtkBin
);
127 this.gtkBin
= gtkBin
;
131 * Gets the child of the GtkBin, or NULL if the bin contains
132 * no child widget. The returned widget does not have a reference
133 * added, so you do not need to unref it.
137 * pointer to child of the GtkBin
139 public Widget
getChild()
141 // GtkWidget* gtk_bin_get_child (GtkBin *bin);
142 GtkWidget
* gtkWidget
= gtk_bin_get_child(gtkBin
);
145 return new Widget(gtkWidget
);