<?xml version="1.0" standalone="no"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">

<refentry id="class-gtkfixed">
  <refnamediv>
    <refname>gtk.Fixed</refname>
    <refpurpose>a container which allows you to position widgets at fixed
coordinates</refpurpose>
  </refnamediv>

  <refsect1>
    <title>Synopsis</title>

    <classsynopsis language="python">
      <ooclass><classname>gtk.Fixed</classname></ooclass>
      <ooclass><classname><link
linkend="class-gtkcontainer">gtk.Container</link></classname></ooclass>
      <constructorsynopsis language="python">
	<methodname><link
linkend="constructor-gtkfixed">gtk.Fixed</link></methodname>
	<methodparam></methodparam>  </constructorsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtkfixed--put">put</link></methodname>
	<methodparam><parameter
		       role="keyword">widget</parameter></methodparam>
	<methodparam><parameter role="keyword">x</parameter></methodparam>
	<methodparam><parameter role="keyword">y</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtkfixed--move">move</link></methodname>
	<methodparam><parameter
		       role="keyword">widget</parameter></methodparam>
	<methodparam><parameter role="keyword">x</parameter></methodparam>
	<methodparam><parameter role="keyword">y</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtkfixed--set-has-window">set_has_window</link></methodname>
	<methodparam><parameter
		       role="keyword">has_window</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtkfixed--get-has-window">get_has_window</link></methodname>
	<methodparam></methodparam>  </methodsynopsis>
    </classsynopsis>

  </refsect1>

  <refsect1>
    <title>Ancestry</title>

<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
  +-- <link linkend="class-gtkobject">gtk.Object</link>
    +-- <link linkend="class-gtkwidget">gtk.Widget</link>
      +-- <link linkend="class-gtkcontainer">gtk.Container</link>
        +-- <link linkend="class-gtkfixed">gtk.Fixed</link>
</synopsis>

  </refsect1>
  
  <refsect1>
		<title>Implemented Interfaces</title>
		<para>
			<link linkend="class-gtkfixed"><classname>gtk.Fixed</classname></link>
			implements 
			<link linkend="class-gtkbuildable"><classname>gtk.Buildable</classname></link>
		</para>
	</refsect1>

  <refsect1 id="properties-gtkfixed">
    <title>gtk.Fixed Properties</title>

    <para><link linkend="properties-gtkobject">gtk.Object Properties</link></para>
    <para><link linkend="properties-gtkwidget">gtk.Widget Properties</link></para>
    <para><link linkend="properties-gtkcontainer">gtk.Container Properties</link></para>

  </refsect1>

  <refsect1 id="style-properties-gtkfixed">
    <title>gtk.Fixed Style Properties</title>

    <para><link linkend="style-properties-gtkwidget">gtk.Widget Style Properties</link></para>

  </refsect1>

  <refsect1 id="child-properties-gtkfixed">
    <title>gtk.Fixed Child Properties</title>

    <blockquote role="properties">
      <informaltable pgwide="1" frame="none">
	<tgroup cols="3">

	  <colspec column="1" colwidth="1in"/>
	  <colspec column="2" colwidth="1in"/>
	  <colspec column="3" colwidth="3.5in"/>
	  <tbody>

	    <row valign="top">
	      <entry>"x"</entry>
	      <entry>Read/Write</entry>
	<entry>The x position of the child widget.</entry>
      </row>

	<row valign="top">
	  <entry>"y"</entry>
	  <entry>Read/Write</entry>
	  <entry>The y position of the child widget.</entry>
	</row>

	</tbody>
      </tgroup>
      </informaltable>
    </blockquote>

  </refsect1>

  <refsect1 id="signal-prototypes-gtkfixed">
    <title>gtk.Fixed Signal Prototypes</title>

    <para><link linkend="signal-prototypes-gobject">gobject.GObject Signal Prototypes</link></para>
    <para><link linkend="signal-prototypes-gtkobject">gtk.Object Signal Prototypes</link></para>
    <para><link linkend="signal-prototypes-gtkwidget">gtk.Widget Signal Prototypes</link></para>
    <para><link linkend="signal-prototypes-gtkcontainer">gtk.Container Signal Prototypes</link></para>
  </refsect1>

  <refsect1>
    <title>Description</title>

    <para>The <link
linkend="class-gtkfixed"><classname>gtk.Fixed</classname></link> widget is a
container that can place child widgets at fixed positions and with fixed
sizes, given in pixels. <link
linkend="class-gtkfixed"><classname>gtk.Fixed</classname></link> performs no
automatic layout management. For most applications, you should not use this
container! It keeps you from having to learn about the other PyGTK
containers, but it results in broken applications. With <link
linkend="class-gtkfixed"><classname>gtk.Fixed</classname></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 Windows or the framebuffer port of PyGTK, where different fonts are
available.</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, the fixed widget can't properly be mirrored in
right-to-left languages such as Hebrew and Arabic. i.e. normally PyGTK will
flip the interface to put labels to the right of the thing they label, but
it can't do that with <link
linkend="class-gtkfixed"><classname>gtk.Fixed</classname></link>. So your
application will not be usable in right-to-left languages. Finally, fixed
positioning makes it kind of annoying to add and remove GUI elements, since
you have to reposition all the other elements. This is a long-term
maintenance problem for your application. If you know none of these things
are an issue for your application, and prefer the simplicity of <link
linkend="class-gtkfixed"><classname>gtk.Fixed</classname></link>, by all
means use the widget. But you should be aware of the tradeoffs.</para>

  </refsect1>

  <refsect1 id="constructor-gtkfixed">
    <title>Constructor</title>

    <programlisting><constructorsynopsis language="python">
	<methodname>gtk.Fixed</methodname>
	<methodparam></methodparam>  </constructorsynopsis></programlisting>
    <variablelist>
      <varlistentry>
	<term><emphasis>Returns</emphasis>&nbsp;:</term>
	<listitem><simpara>a new fixed widget</simpara></listitem>
      </varlistentry>
    </variablelist>

    <para>Creates a new <link
linkend="class-gtkfixed"><classname>gtk.Fixed</classname></link>
widget</para>

  </refsect1>

  <refsect1>
    <title>Methods</title>

    <refsect2 id="method-gtkfixed--put">
      <title>gtk.Fixed.put</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>put</methodname>
	  <methodparam><parameter
			 role="keyword">widget</parameter></methodparam>
	  <methodparam><parameter role="keyword">x</parameter></methodparam>
	  <methodparam><parameter role="keyword">y</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">widget</parameter>&nbsp;:</term>
	  <listitem><simpara>the child widget being
added*</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter role="keyword">x</parameter>&nbsp;:</term>
	  <listitem><simpara>the x position of the widget
location</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter role="keyword">y</parameter>&nbsp;:</term>
	  <listitem><simpara>the y position of the widget
location</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>put</methodname>() method adds the child widget
specified by <parameter>widget</parameter> to the gtk.Fixed widget at the
location specified by <parameter>x</parameter> and
<parameter>y</parameter>.</para>

    </refsect2>

    <refsect2 id="method-gtkfixed--move">
      <title>gtk.Fixed.move</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>move</methodname>
	  <methodparam><parameter
			 role="keyword">widget</parameter></methodparam>
	  <methodparam><parameter role="keyword">x</parameter></methodparam>
	  <methodparam><parameter role="keyword">y</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">widget</parameter>&nbsp;:</term>
	  <listitem><simpara>the child widget</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter role="keyword">x</parameter>&nbsp;:</term>
	  <listitem><simpara>the new x position</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter role="keyword">y</parameter>&nbsp;:</term>
	  <listitem><simpara>the new y position</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>move</methodname>() method moves the child
widget specified by <parameter>widget</parameter> to the location specified
specified by <parameter>x</parameter> and <parameter>y</parameter>.</para>

    </refsect2>

    <refsect2 id="method-gtkfixed--set-has-window">
      <title>gtk.Fixed.set_has_window</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>set_has_window</methodname>
	  <methodparam><parameter
			 role="keyword">has_window</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter
role="keyword">has_window</parameter>&nbsp;:</term>
	  <listitem><simpara>if <literal>True</literal> a separate window
should be created</simpara></listitem>
	</varlistentry>
      </variablelist>
      
      <para>The <methodname>set_has_window</methodname>() method specifies
whether a <link
linkend="class-gtkfixed"><classname>gtk.Fixed</classname></link> widget is
created with a separate <link
linkend="class-gdkwindow"><classname>gtk.gdk.Window</classname></link>
according to the value of <parameter>has_window</parameter>. If
<parameter>has_window</parameter> is <literal>True</literal> the fixed
widget will be created with its own separate window. By default, the setting
is <literal>False</literal> and the fixed will be created with no separate
<link
linkend="class-gdkwindow"><classname>gtk.gdk.Window</classname></link>. This
method must be called while the <link
linkend="class-gtkfixed"><classname>gtk.Fixed</classname></link> is not
realized, for instance, immediately after the window is created.</para>

    </refsect2>

    <refsect2 id="method-gtkfixed--get-has-window">
      <title>gtk.Fixed.get_has_window</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>get_has_window</methodname>
	  <methodparam></methodparam>  </methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara><literal>True</literal> if the fixed widget has
its own window.</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>get_has_window</methodname>() method returns
<literal>True</literal> if the <link
linkend="class-gtkfixed"><classname>gtk.Fixed</classname></link> widget  has
it's own <link
linkend="class-gdkwindow"><classname>gtk.gdk.Window</classname></link>. See
the <link
linkend="method-gtkfixed--set-has-window"><methodname>set_has_window</methodname>()</link> 
method.</para>

    </refsect2>

  </refsect1>

</refentry>
