2 * This file is part of duit.
4 * duit 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 * duit 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 duit; 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
53 private import gtk
.gtktypes
;
55 private import lib
.gtk
;
57 private import gtk
.Widget
;
61 * The GtkFixed widget is a container which can place child widgets at fixed
62 * positions and with fixed sizes, given in pixels. GtkFixed performs no
63 * automatic layout management.
64 * For most applications, you should not use this container! It keeps
65 * you from having to learn about the other GTK+ containers, but it
66 * results in broken applications.
67 * With GtkFixed, the following things will result in truncated text,
68 * overlapping widgets, and other display bugs:
69 * Themes, which may change widget sizes.
70 * Fonts other than the one you used to write the app will of
71 * course change the size of widgets containing text; keep in mind that
72 * users may use a larger font because of difficulty reading the default,
73 * or they may be using Windows or the framebuffer port of GTK+, where
74 * different fonts are available.
75 * Translation of text into other languages changes its size. Also,
76 * display of non-English text will use a different font in many cases.
77 * In addition, the fixed widget can't properly be mirrored in
78 * right-to-left languages such as Hebrew and Arabic. i.e. normally GTK+
79 * will flip the interface to put labels to the right of the thing they
80 * label, but it can't do that with GtkFixed. So your application will
81 * not be usable in right-to-left languages.
82 * Finally, fixed positioning makes it kind of annoying to add/remove GUI
83 * elements, since you have to reposition all the other elements. This is
84 * a long-term maintenance problem for your application.
85 * If you know none of these things are an issue for your application,
86 * and prefer the simplicity of GtkFixed, by all means use the
87 * widget. But you should be aware of the tradeoffs.
89 private import gtk
.Container
;
90 public class Fixed
: Container
93 /** the main Gtk struct */
94 protected GtkFixed
* gtkFixed
;
97 public GtkFixed
* getFixedStruct()
103 /** the main Gtk struct as a void* */
104 protected void* getStruct()
106 return cast(void*)gtkFixed
;
110 * Sets our main struct and passes it to the parent class
112 public this (GtkFixed
* gtkFixed
)
114 super(cast(GtkContainer
*)gtkFixed
);
115 this.gtkFixed
= gtkFixed
;
124 * Creates a new GtkFixed.
130 // GtkWidget* gtk_fixed_new (void);
131 this(cast(GtkFixed
*)gtk_fixed_new() );
135 * Adds a widget to a GtkFixed container at the given position.
141 * the horizontal position to place the widget at.
143 * the vertical position to place the widget at.
145 public void put(Widget widget
, int x
, int y
)
147 // void gtk_fixed_put (GtkFixed *fixed, GtkWidget *widget, gint x, gint y);
148 gtk_fixed_put(gtkFixed
, (widget
is null) ?
null : widget
.getWidgetStruct(), x
, y
);
152 * Moves a child of a GtkFixed container to the given position.
158 * the horizontal position to move the widget to.
160 * the vertical position to move the widget to.
162 public void move(Widget widget
, int x
, int y
)
164 // void gtk_fixed_move (GtkFixed *fixed, GtkWidget *widget, gint x, gint y);
165 gtk_fixed_move(gtkFixed
, (widget
is null) ?
null : widget
.getWidgetStruct(), x
, y
);
169 * Gets whether the GtkFixed has its own GdkWindow.
170 * See gdk_fixed_set_has_window().
174 * TRUE if fixed has its own window.
176 public int getHasWindow()
178 // gboolean gtk_fixed_get_has_window (GtkFixed *fixed);
179 return gtk_fixed_get_has_window(gtkFixed
);
183 * Sets whether a GtkFixed widget is created with a separate
184 * GdkWindow for widget->window or not. (By default, it will be
185 * created with no separate GdkWindow). This function must be called
186 * while the GtkFixed is not realized, for instance, immediately after the
188 * This function was added to provide an easy migration path for
189 * older applications which may expect GtkFixed to have a separate window.
193 * TRUE if a separate window should be created
194 * Child Property Details
195 * The "x" child property
196 * "x" gint : Read / Write
197 * X position of child widget.
200 public void setHasWindow(int hasWindow
)
202 // void gtk_fixed_set_has_window (GtkFixed *fixed, gboolean has_window);
203 gtk_fixed_set_has_window(gtkFixed
, hasWindow
);