1
<!-- ##### SECTION Title ##### -->
4
<!-- ##### SECTION Short_Description ##### -->
5
A container which allows you to position widgets at fixed coordinates
7
<!-- ##### SECTION Long_Description ##### -->
9
The #GtkFixed widget is a container which can place child widgets at fixed
10
positions and with fixed sizes, given in pixels. #GtkFixed performs no
11
automatic layout management.
15
For most applications, you should not use this container! It keeps
16
you from having to learn about the other GTK+ containers, but it
17
results in broken applications.
18
With #GtkFixed, the following things will result in truncated text,
19
overlapping widgets, and other display bugs:
22
<para>Themes, which may change widget sizes.
26
<para>Fonts other than the one you used to write the app will of
27
course change the size of widgets containing text; keep in mind that
28
users may use a larger font because of difficulty reading the default,
29
or they may be using Windows or the framebuffer port of GTK+, where
30
different fonts are available.
35
Translation of text into other languages changes its size. Also,
36
display of non-English text will use a different font in many cases.
43
In addition, the fixed widget can't properly be mirrored in
44
right-to-left languages such as Hebrew and Arabic. i.e. normally GTK+
45
will flip the interface to put labels to the right of the thing they
46
label, but it can't do that with #GtkFixed. So your application will
47
not be usable in right-to-left languages.
51
Finally, fixed positioning makes it kind of annoying to add/remove GUI
52
elements, since you have to reposition all the other elements. This is
53
a long-term maintenance problem for your application.
57
If you know none of these things are an issue for your application,
58
and prefer the simplicity of #GtkFixed, by all means use the
59
widget. But you should be aware of the tradeoffs.
62
<!-- ##### SECTION See_Also ##### -->
67
<!-- ##### SECTION Stability_Level ##### -->
70
<!-- ##### STRUCT GtkFixed ##### -->
72
The #GtkFixed-struct struct contains the following fields.
73
(These fields should be considered read-only. They should never be set by
76
<informaltable pgwide="1" frame="none" role="struct">
77
<tgroup cols="2"><colspec colwidth="2*"/><colspec colwidth="8*"/>
81
<entry>#GList *children;</entry>
82
<entry>a list of #GtkFixedChild elements, containing the child widgets and
83
their positions.</entry>
86
</tbody></tgroup></informaltable>
90
<!-- ##### ARG GtkFixed:x ##### -->
95
<!-- ##### ARG GtkFixed:y ##### -->
100
<!-- ##### STRUCT GtkFixedChild ##### -->
102
The #GtkFixedChild-struct struct contains the following fields.
103
(These fields should be considered read-only. They should never be set by
106
<informaltable pgwide="1" frame="none" role="struct">
107
<tgroup cols="2"><colspec colwidth="2*"/><colspec colwidth="8*"/>
111
<entry>#GtkWidget *widget;</entry>
112
<entry>the child #GtkWidget.</entry>
116
<entry>#gint x;</entry>
117
<entry>the horizontal position of the widget within the #GtkFixed
122
<entry>#gint y;</entry>
123
<entry>the vertical position of the widget within the #GtkFixed
127
</tbody></tgroup></informaltable>
134
<!-- ##### FUNCTION gtk_fixed_new ##### -->
136
Creates a new #GtkFixed.
139
@Returns: a new #GtkFixed.
142
<!-- ##### FUNCTION gtk_fixed_put ##### -->
144
Adds a widget to a #GtkFixed container at the given position.
148
@widget: the widget to add.
149
@x: the horizontal position to place the widget at.
150
@y: the vertical position to place the widget at.
153
<!-- ##### FUNCTION gtk_fixed_move ##### -->
155
Moves a child of a #GtkFixed container to the given position.
159
@widget: the child widget.
160
@x: the horizontal position to move the widget to.
161
@y: the vertical position to move the widget to.
164
<!-- ##### FUNCTION gtk_fixed_get_has_window ##### -->
173
<!-- ##### FUNCTION gtk_fixed_set_has_window ##### -->