<?xml version="1.0"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
               "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
<!ENTITY % local.common.attrib "xmlns:xi  CDATA  #FIXED 'http://www.w3.org/2003/XInclude'">
<!ENTITY version SYSTEM "version.xml">
<!ENTITY pi "&#960;">
<!ENTITY solidus "&#8260;">
]>
<refentry id="GtkFixed">
<refmeta>
<refentrytitle role="top_of_page" id="GtkFixed.top_of_page">GtkFixed</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GTK4 Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>GtkFixed</refname>
<refpurpose>A container which allows you to position
widgets at fixed coordinates</refpurpose>
</refnamediv>

<refsect1 id="GtkFixed.functions" role="functions_proto">
<title role="functions_proto.title">Functions</title>
<informaltable pgwide="1" frame="none">
<tgroup cols="2">
<colspec colname="functions_proto_type" colwidth="150px"/>
<colspec colname="functions_proto_name"/>
<tbody>
<row><entry role="function_type"><link linkend="GtkWidget"><returnvalue>GtkWidget</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-fixed-new">gtk_fixed_new</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-fixed-put">gtk_fixed_put</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-fixed-remove">gtk_fixed_remove</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-fixed-move">gtk_fixed_move</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkFixed.other" role="other_proto">
<title role="other_proto.title">Types and Values</title>
<informaltable pgwide="1" frame="none">
<tgroup cols="2">
<colspec colname="other_proto_type" colwidth="150px"/>
<colspec colname="other_proto_name"/>
<tbody>
<row><entry role="datatype_keyword">struct</entry><entry role="function_name"><link linkend="GtkFixed-struct">GtkFixed</link></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkFixed.object-hierarchy" role="object_hierarchy">
<title role="object_hierarchy.title">Object Hierarchy</title>
<screen>    <link linkend="GObject">GObject</link>
    <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> <link linkend="GInitiallyUnowned">GInitiallyUnowned</link>
        <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> <link linkend="GtkWidget">GtkWidget</link>
            <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> GtkFixed
</screen>
</refsect1>
<refsect1 id="GtkFixed.implemented-interfaces" role="impl_interfaces">
<title role="impl_interfaces.title">Implemented Interfaces</title>
<para>
GtkFixed implements
 <link linkend="AtkImplementorIface">AtkImplementorIface</link>,  <link linkend="GtkBuildable">GtkBuildable</link> and  <link linkend="GtkConstraintTarget">GtkConstraintTarget</link>.</para>

</refsect1>

<refsect1 id="GtkFixed.includes"><title>Includes</title><synopsis>#include &lt;gtk/gtk.h&gt;
</synopsis></refsect1>

<refsect1 id="GtkFixed.description" role="desc">
<title role="desc.title">Description</title>
<para>The <link linkend="GtkFixed"><type>GtkFixed</type></link> widget is a container which can place child widgets
at fixed positions and with fixed sizes, given in pixels. <link linkend="GtkFixed"><type>GtkFixed</type></link>
performs no automatic layout management.</para>
<para>For most applications, you should not use this container! It keeps
you from having to learn about the other GTK+ containers, but it
results in broken applications.  With <link linkend="GtkFixed"><type>GtkFixed</type></link>, the following
things will result in truncated text, overlapping widgets, and
other display bugs:</para>
<itemizedlist>
<listitem>
<para>Themes, which may change widget sizes.</para>
</listitem>
<listitem>
<para>Fonts other than the one you used to write the app will of course
change the size of widgets containing text; keep in mind that
users may use a larger font because of difficulty reading the
default, or they may be using a different OS that provides different fonts.</para>
</listitem>
<listitem>
<para>Translation of text into other languages changes its size. Also,
display of non-English text will use a different font in many
cases.</para>
</listitem>
</itemizedlist>
<para>In addition, <link linkend="GtkFixed"><type>GtkFixed</type></link> does not pay attention to text direction and thus may
produce unwanted results if your app is run under right-to-left languages
such as Hebrew or Arabic. That is: normally GTK will order containers
appropriately for the text direction, e.g. to put labels to the right of the
thing they label when using an RTL language, but it can’t do that with
<link linkend="GtkFixed"><type>GtkFixed</type></link>. So if you need to reorder widgets depending on the text direction,
you would need to manually detect it and adjust child positions accordingly.</para>
<para>Finally, fixed positioning makes it kind of annoying to add/remove
GUI elements, since you have to reposition all the other
elements. This is a long-term maintenance problem for your
application.</para>
<para>If you know none of these things are an issue for your application,
and prefer the simplicity of <link linkend="GtkFixed"><type>GtkFixed</type></link>, by all means use the
widget. But you should be aware of the tradeoffs.</para>

</refsect1>
<refsect1 id="GtkFixed.functions_details" role="details">
<title role="details.title">Functions</title>
<refsect2 id="gtk-fixed-new" role="function">
<title>gtk_fixed_new&#160;()</title>
<indexterm zone="gtk-fixed-new"><primary>gtk_fixed_new</primary></indexterm>
<programlisting language="C"><link linkend="GtkWidget"><returnvalue>GtkWidget</returnvalue></link>&#160;*
gtk_fixed_new (<parameter><type>void</type></parameter>);</programlisting>
<para>Creates a new <link linkend="GtkFixed"><type>GtkFixed</type></link>.</para>
<refsect3 id="gtk-fixed-new.returns" role="returns">
<title>Returns</title>
<para> a new <link linkend="GtkFixed"><type>GtkFixed</type></link>.</para>
</refsect3></refsect2>
<refsect2 id="gtk-fixed-put" role="function">
<title>gtk_fixed_put&#160;()</title>
<indexterm zone="gtk-fixed-put"><primary>gtk_fixed_put</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_fixed_put (<parameter><link linkend="GtkFixed"><type>GtkFixed</type></link> *fixed</parameter>,
               <parameter><link linkend="GtkWidget"><type>GtkWidget</type></link> *widget</parameter>,
               <parameter><link linkend="gint"><type>gint</type></link> x</parameter>,
               <parameter><link linkend="gint"><type>gint</type></link> y</parameter>);</programlisting>
<para>Adds a widget to a <link linkend="GtkFixed"><type>GtkFixed</type></link> container and assigns a translation
transformation to the given <parameter>x</parameter>
 and <parameter>y</parameter>
 coordinates to it.</para>
<refsect3 id="gtk-fixed-put.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>fixed</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkFixed"><type>GtkFixed</type></link>.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>widget</para></entry>
<entry role="parameter_description"><para>the widget to add.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>x</para></entry>
<entry role="parameter_description"><para>the horizontal position to place the widget at.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>y</para></entry>
<entry role="parameter_description"><para>the vertical position to place the widget at.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-fixed-remove" role="function">
<title>gtk_fixed_remove&#160;()</title>
<indexterm zone="gtk-fixed-remove"><primary>gtk_fixed_remove</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_fixed_remove (<parameter><link linkend="GtkFixed"><type>GtkFixed</type></link> *fixed</parameter>,
                  <parameter><link linkend="GtkWidget"><type>GtkWidget</type></link> *widget</parameter>);</programlisting>
<para>Removes a child from <parameter>fixed</parameter>
, after it has been added
with <link linkend="gtk-fixed-put"><function>gtk_fixed_put()</function></link>.</para>
<refsect3 id="gtk-fixed-remove.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>fixed</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkFixed"><type>GtkFixed</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>widget</para></entry>
<entry role="parameter_description"><para>the child widget to remove</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-fixed-move" role="function">
<title>gtk_fixed_move&#160;()</title>
<indexterm zone="gtk-fixed-move"><primary>gtk_fixed_move</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_fixed_move (<parameter><link linkend="GtkFixed"><type>GtkFixed</type></link> *fixed</parameter>,
                <parameter><link linkend="GtkWidget"><type>GtkWidget</type></link> *widget</parameter>,
                <parameter><link linkend="gint"><type>gint</type></link> x</parameter>,
                <parameter><link linkend="gint"><type>gint</type></link> y</parameter>);</programlisting>
<para>Sets a translation transformation to the given <parameter>x</parameter>
 and <parameter>y</parameter>
 coordinates to
the child <parameter>widget</parameter>
 of the given <link linkend="GtkFixed"><type>GtkFixed</type></link> container.</para>
<refsect3 id="gtk-fixed-move.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>fixed</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkFixed"><type>GtkFixed</type></link>.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>widget</para></entry>
<entry role="parameter_description"><para>the child widget.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>x</para></entry>
<entry role="parameter_description"><para>the horizontal position to move the widget to.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>y</para></entry>
<entry role="parameter_description"><para>the vertical position to move the widget to.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>

</refsect1>
<refsect1 id="GtkFixed.other_details" role="details">
<title role="details.title">Types and Values</title>
<refsect2 id="GtkFixed-struct" role="struct">
<title>struct GtkFixed</title>
<indexterm zone="GtkFixed-struct"><primary>GtkFixed</primary></indexterm>
<programlisting language="C">struct GtkFixed;</programlisting>
</refsect2>

</refsect1>

</refentry>
