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 = GtkFixed.html
47 * - GtkWidget* -> Widget
58 import tango
.io
.Stdout
; // use the tango loging?
62 private import gtkc
.gtktypes
;
64 private import gtkc
.gtk
;
67 private import gtk
.Widget
;
74 * The GtkFixed widget is a container which can place child widgets at fixed
75 * positions and with fixed sizes, given in pixels. GtkFixed performs no
76 * automatic layout management.
77 * For most applications, you should not use this container! It keeps
78 * you from having to learn about the other GTK+ containers, but it
79 * results in broken applications.
80 * With GtkFixed, the following things will result in truncated text,
81 * overlapping widgets, and other display bugs:
82 * Themes, which may change widget sizes.
83 * Fonts other than the one you used to write the app will of
84 * course change the size of widgets containing text; keep in mind that
85 * users may use a larger font because of difficulty reading the default,
86 * or they may be using Windows or the framebuffer port of GTK+, where
87 * different fonts are available.
88 * Translation of text into other languages changes its size. Also,
89 * display of non-English text will use a different font in many cases.
90 * In addition, the fixed widget can't properly be mirrored in
91 * right-to-left languages such as Hebrew and Arabic. i.e. normally GTK+
92 * will flip the interface to put labels to the right of the thing they
93 * label, but it can't do that with GtkFixed. So your application will
94 * not be usable in right-to-left languages.
95 * Finally, fixed positioning makes it kind of annoying to add/remove GUI
96 * elements, since you have to reposition all the other elements. This is
97 * a long-term maintenance problem for your application.
98 * If you know none of these things are an issue for your application,
99 * and prefer the simplicity of GtkFixed, by all means use the
100 * widget. But you should be aware of the tradeoffs.
102 private import gtk
.Container
;
103 public class Fixed
: Container
106 /** the main Gtk struct */
107 protected GtkFixed
* gtkFixed
;
110 public GtkFixed
* getFixedStruct()
116 /** the main Gtk struct as a void* */
117 protected void* getStruct()
119 return cast(void*)gtkFixed
;
123 * Sets our main struct and passes it to the parent class
125 public this (GtkFixed
* gtkFixed
)
129 if ( gtkFixed
is null )
134 Stdout("struct gtkFixed is null on constructor").newline
;
138 printf("struct gtkFixed is null on constructor");
145 assert(gtkFixed
!is null, "struct gtkFixed is null on constructor");
147 super(cast(GtkContainer
*)gtkFixed
);
148 this.gtkFixed
= gtkFixed
;
157 * Creates a new GtkFixed.
163 // GtkWidget* gtk_fixed_new (void);
164 this(cast(GtkFixed
*)gtk_fixed_new() );
168 * Adds a widget to a GtkFixed container at the given position.
174 * the horizontal position to place the widget at.
176 * the vertical position to place the widget at.
178 public void put(Widget widget
, int x
, int y
)
180 // void gtk_fixed_put (GtkFixed *fixed, GtkWidget *widget, gint x, gint y);
181 gtk_fixed_put(gtkFixed
, (widget
is null) ?
null : widget
.getWidgetStruct(), x
, y
);
185 * Moves a child of a GtkFixed container to the given position.
191 * the horizontal position to move the widget to.
193 * the vertical position to move the widget to.
195 public void move(Widget widget
, int x
, int y
)
197 // void gtk_fixed_move (GtkFixed *fixed, GtkWidget *widget, gint x, gint y);
198 gtk_fixed_move(gtkFixed
, (widget
is null) ?
null : widget
.getWidgetStruct(), x
, y
);
202 * Gets whether the GtkFixed has its own GdkWindow.
203 * See gdk_fixed_set_has_window().
207 * TRUE if fixed has its own window.
209 public int getHasWindow()
211 // gboolean gtk_fixed_get_has_window (GtkFixed *fixed);
212 return gtk_fixed_get_has_window(gtkFixed
);
216 * Sets whether a GtkFixed widget is created with a separate
217 * GdkWindow for widget->window or not. (By default, it will be
218 * created with no separate GdkWindow). This function must be called
219 * while the GtkFixed is not realized, for instance, immediately after the
221 * This function was added to provide an easy migration path for
222 * older applications which may expect GtkFixed to have a separate window.
226 * TRUE if a separate window should be created
227 * Child Property Details
228 * The "x" child property
229 * "x" gint : Read / Write
230 * X position of child widget.
233 public void setHasWindow(int hasWindow
)
235 // void gtk_fixed_set_has_window (GtkFixed *fixed, gboolean has_window);
236 gtk_fixed_set_has_window(gtkFixed
, hasWindow
);