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 <!-- ##### SECTION Image ##### -->
73 <!-- ##### STRUCT GtkFixed ##### -->
75 The #GtkFixed-struct struct contains the following fields.
76 (These fields should be considered read-only. They should never be set by
79 <informaltable pgwide="1" frame="none" role="struct">
80 <tgroup cols="2"><colspec colwidth="2*"/><colspec colwidth="8*"/>
84 <entry>#GList *children;</entry>
85 <entry>a list of #GtkFixedChild elements, containing the child widgets and
86 their positions.</entry>
89 </tbody></tgroup></informaltable>
93 <!-- ##### ARG GtkFixed:x ##### -->
98 <!-- ##### ARG GtkFixed:y ##### -->
103 <!-- ##### FUNCTION gtk_fixed_new ##### -->
105 Creates a new #GtkFixed.
109 @Returns: a new #GtkFixed.
112 <!-- ##### FUNCTION gtk_fixed_put ##### -->
114 Adds a widget to a #GtkFixed container at the given position.
118 @widget: the widget to add.
119 @x: the horizontal position to place the widget at.
120 @y: the vertical position to place the widget at.
123 <!-- ##### FUNCTION gtk_fixed_move ##### -->
125 Moves a child of a #GtkFixed container to the given position.
129 @widget: the child widget.
130 @x: the horizontal position to move the widget to.
131 @y: the vertical position to move the widget to.