<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Graphics.UI.Gtk.Layout.Fixed</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[ window.onload = function () {pageLoad();setSynopsis("mini_Graphics-UI-Gtk-Layout-Fixed.html");}; //]]> </script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Graphics-UI-Gtk-Layout-Fixed.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">gtk-0.12.0: Binding to the Gtk+ graphical user interface library.</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>portable (depends on GHC)</td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Maintainer</th><td>gtk2hs-users@lists.sourceforge.net</td></tr></table><p class="caption">Graphics.UI.Gtk.Layout.Fixed</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Detail </a></li><li><a href="#g:2">Class Hierarchy </a></li><li><a href="#g:3">Types </a></li><li><a href="#g:4">Constructors </a></li><li><a href="#g:5">Methods </a></li><li><a href="#g:6">Attributes </a></li><li><a href="#g:7">Child Attributes </a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc"><p>A container which allows you to position widgets at fixed coordinates </p></div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">data</span> <a href="#t:Fixed">Fixed</a> </li><li class="src short"><span class="keyword">class</span> <a href="Graphics-UI-Gtk-Abstract-Container.html#t:ContainerClass">ContainerClass</a> o => <a href="#t:FixedClass">FixedClass</a> o </li><li class="src short"><a href="#v:castToFixed">castToFixed</a> :: <a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-GObject.html#t:GObjectClass">GObjectClass</a> obj => obj -> <a href="Graphics-UI-Gtk-Layout-Fixed.html#t:Fixed">Fixed</a></li><li class="src short"><a href="#v:gTypeFixed">gTypeFixed</a> :: <a href="Graphics-UI-Gtk-Abstract-Widget.html#t:GType">GType</a></li><li class="src short"><a href="#v:toFixed">toFixed</a> :: <a href="Graphics-UI-Gtk-Layout-Fixed.html#t:FixedClass">FixedClass</a> o => o -> <a href="Graphics-UI-Gtk-Layout-Fixed.html#t:Fixed">Fixed</a></li><li class="src short"><a href="#v:fixedNew">fixedNew</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="Graphics-UI-Gtk-Layout-Fixed.html#t:Fixed">Fixed</a></li><li class="src short"><a href="#v:fixedPut">fixedPut</a> :: (<a href="Graphics-UI-Gtk-Layout-Fixed.html#t:FixedClass">FixedClass</a> self, <a href="Graphics-UI-Gtk-Abstract-Widget.html#t:WidgetClass">WidgetClass</a> widget) => self -> widget -> (<a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Int.html#t:Int">Int</a>, <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Int.html#t:Int">Int</a>) -> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a></li><li class="src short"><a href="#v:fixedMove">fixedMove</a> :: (<a href="Graphics-UI-Gtk-Layout-Fixed.html#t:FixedClass">FixedClass</a> self, <a href="Graphics-UI-Gtk-Abstract-Widget.html#t:WidgetClass">WidgetClass</a> widget) => self -> widget -> (<a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Int.html#t:Int">Int</a>, <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Int.html#t:Int">Int</a>) -> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a></li><li class="src short"><a href="#v:fixedSetHasWindow">fixedSetHasWindow</a> :: <a href="Graphics-UI-Gtk-Layout-Fixed.html#t:FixedClass">FixedClass</a> self => self -> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Bool.html#t:Bool">Bool</a> -> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a></li><li class="src short"><a href="#v:fixedGetHasWindow">fixedGetHasWindow</a> :: <a href="Graphics-UI-Gtk-Layout-Fixed.html#t:FixedClass">FixedClass</a> self => self -> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:fixedHasWindow">fixedHasWindow</a> :: <a href="Graphics-UI-Gtk-Layout-Fixed.html#t:FixedClass">FixedClass</a> self => <a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-Attributes.html#t:Attr">Attr</a> self <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:fixedChildX">fixedChildX</a> :: (<a href="Graphics-UI-Gtk-Layout-Fixed.html#t:FixedClass">FixedClass</a> self, <a href="Graphics-UI-Gtk-Abstract-Widget.html#t:WidgetClass">WidgetClass</a> child) => child -> <a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-Attributes.html#t:Attr">Attr</a> self <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Int.html#t:Int">Int</a></li><li class="src short"><a href="#v:fixedChildY">fixedChildY</a> :: (<a href="Graphics-UI-Gtk-Layout-Fixed.html#t:FixedClass">FixedClass</a> self, <a href="Graphics-UI-Gtk-Abstract-Widget.html#t:WidgetClass">WidgetClass</a> child) => child -> <a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-Attributes.html#t:Attr">Attr</a> self <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Int.html#t:Int">Int</a></li></ul></div><div id="interface"><h1 id="g:1">Detail </h1><div class="doc"><p>The <code><a href="Graphics-UI-Gtk-Layout-Fixed.html#t:Fixed">Fixed</a></code> widget is a container which can place child widgets at fixed positions and with fixed sizes, given in pixels. <code><a href="Graphics-UI-Gtk-Layout-Fixed.html#t:Fixed">Fixed</a></code> performs no automatic layout management. </p><p>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 <code><a href="Graphics-UI-Gtk-Layout-Fixed.html#t:Fixed">Fixed</a></code>, the following things will result in truncated text, overlapping widgets, and other display bugs: </p><ul><li> Themes, which may change widget sizes. </li><li> 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 Gtk+, where different fonts are available. </li><li> Translation of text into other languages changes its size. Also, display of non-English text will use a different font in many cases. </li></ul><p>In addition, the fixed widget can't properly be mirrored in right-to-left languages such as Hebrew and Arabic. i.e. normally Gtk+ will flip the interface to put labels to the right of the thing they label, but it can't do that with <code><a href="Graphics-UI-Gtk-Layout-Fixed.html#t:Fixed">Fixed</a></code>. So your application will not be usable in right-to-left languages. </p><p>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. </p><p>If you know none of these things are an issue for your application, and prefer the simplicity of <code><a href="Graphics-UI-Gtk-Layout-Fixed.html#t:Fixed">Fixed</a></code>, by all means use the widget. But you should be aware of the tradeoffs. </p></div><h1 id="g:2">Class Hierarchy </h1><div class="doc"><pre> | <code><a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-GObject.html#t:GObject">GObject</a></code> | +----<code><a href="Graphics-UI-Gtk-Abstract-Object.html#t:Object">Object</a></code> | +----<code><a href="Graphics-UI-Gtk-Abstract-Widget.html#t:Widget">Widget</a></code> | +----<code><a href="Graphics-UI-Gtk-Abstract-Container.html#t:Container">Container</a></code> | +----Fixed </pre></div><h1 id="g:3">Types </h1><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:Fixed" class="def">Fixed</a> <a href="src/Graphics-UI-Gtk-Types.html#Fixed" class="link">Source</a></p><div class="subs instances"><p id="control.i:Fixed" class="caption collapser" onclick="toggleSection('i:Fixed')">Instances</p><div id="section.i:Fixed" class="show"><table><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Eq.html#t:Eq">Eq</a> <a href="Graphics-UI-Gtk-Layout-Fixed.html#t:Fixed">Fixed</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Ord.html#t:Ord">Ord</a> <a href="Graphics-UI-Gtk-Layout-Fixed.html#t:Fixed">Fixed</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-GObject.html#t:GObjectClass">GObjectClass</a> <a href="Graphics-UI-Gtk-Layout-Fixed.html#t:Fixed">Fixed</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Graphics-UI-Gtk-Layout-Fixed.html#t:FixedClass">FixedClass</a> <a href="Graphics-UI-Gtk-Layout-Fixed.html#t:Fixed">Fixed</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Graphics-UI-Gtk-Abstract-Container.html#t:ContainerClass">ContainerClass</a> <a href="Graphics-UI-Gtk-Layout-Fixed.html#t:Fixed">Fixed</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Graphics-UI-Gtk-Abstract-Widget.html#t:WidgetClass">WidgetClass</a> <a href="Graphics-UI-Gtk-Layout-Fixed.html#t:Fixed">Fixed</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Graphics-UI-Gtk-Abstract-Object.html#t:ObjectClass">ObjectClass</a> <a href="Graphics-UI-Gtk-Layout-Fixed.html#t:Fixed">Fixed</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">class</span> <a href="Graphics-UI-Gtk-Abstract-Container.html#t:ContainerClass">ContainerClass</a> o => <a name="t:FixedClass" class="def">FixedClass</a> o <a href="src/Graphics-UI-Gtk-Types.html#FixedClass" class="link">Source</a></p><div class="subs instances"><p id="control.i:FixedClass" class="caption collapser" onclick="toggleSection('i:FixedClass')">Instances</p><div id="section.i:FixedClass" class="show"><table><tr><td class="src"><a href="Graphics-UI-Gtk-Layout-Fixed.html#t:FixedClass">FixedClass</a> <a href="Graphics-UI-Gtk-Layout-Fixed.html#t:Fixed">Fixed</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:castToFixed" class="def">castToFixed</a> :: <a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-GObject.html#t:GObjectClass">GObjectClass</a> obj => obj -> <a href="Graphics-UI-Gtk-Layout-Fixed.html#t:Fixed">Fixed</a><a href="src/Graphics-UI-Gtk-Types.html#castToFixed" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:gTypeFixed" class="def">gTypeFixed</a> :: <a href="Graphics-UI-Gtk-Abstract-Widget.html#t:GType">GType</a><a href="src/Graphics-UI-Gtk-Types.html#gTypeFixed" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:toFixed" class="def">toFixed</a> :: <a href="Graphics-UI-Gtk-Layout-Fixed.html#t:FixedClass">FixedClass</a> o => o -> <a href="Graphics-UI-Gtk-Layout-Fixed.html#t:Fixed">Fixed</a><a href="src/Graphics-UI-Gtk-Types.html#toFixed" class="link">Source</a></p></div><h1 id="g:4">Constructors </h1><div class="top"><p class="src"><a name="v:fixedNew" class="def">fixedNew</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="Graphics-UI-Gtk-Layout-Fixed.html#t:Fixed">Fixed</a><a href="src/Graphics-UI-Gtk-Layout-Fixed.html#fixedNew" class="link">Source</a></p><div class="doc"><p>Creates a new <code><a href="Graphics-UI-Gtk-Layout-Fixed.html#t:Fixed">Fixed</a></code>. </p></div></div><h1 id="g:5">Methods </h1><div class="top"><p class="src"><a name="v:fixedPut" class="def">fixedPut</a><a href="src/Graphics-UI-Gtk-Layout-Fixed.html#fixedPut" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: (<a href="Graphics-UI-Gtk-Layout-Fixed.html#t:FixedClass">FixedClass</a> self, <a href="Graphics-UI-Gtk-Abstract-Widget.html#t:WidgetClass">WidgetClass</a> widget)</td><td class="doc empty"> </td></tr><tr><td class="src">=> self</td><td class="doc empty"> </td></tr><tr><td class="src">-> widget</td><td class="doc"><p><code>widget</code> - the widget to add. </p></td></tr><tr><td class="src">-> (<a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Int.html#t:Int">Int</a>, <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Int.html#t:Int">Int</a>)</td><td class="doc"><p><code>(x,y)</code> - the horizontal and vertical position to place the widget at. </p></td></tr><tr><td class="src">-> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a></td><td class="doc empty"> </td></tr></table></div><div class="doc"><p>Adds a widget to a <code><a href="Graphics-UI-Gtk-Layout-Fixed.html#t:Fixed">Fixed</a></code> container at the given position. </p></div></div><div class="top"><p class="src"><a name="v:fixedMove" class="def">fixedMove</a><a href="src/Graphics-UI-Gtk-Layout-Fixed.html#fixedMove" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: (<a href="Graphics-UI-Gtk-Layout-Fixed.html#t:FixedClass">FixedClass</a> self, <a href="Graphics-UI-Gtk-Abstract-Widget.html#t:WidgetClass">WidgetClass</a> widget)</td><td class="doc empty"> </td></tr><tr><td class="src">=> self</td><td class="doc empty"> </td></tr><tr><td class="src">-> widget</td><td class="doc"><p><code>widget</code> - the child widget. </p></td></tr><tr><td class="src">-> (<a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Int.html#t:Int">Int</a>, <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Int.html#t:Int">Int</a>)</td><td class="doc"><p><code>(x,y)</code> - the horizontal and vertical position to move the widget to. </p></td></tr><tr><td class="src">-> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a></td><td class="doc empty"> </td></tr></table></div><div class="doc"><p>Moves a child of a <code><a href="Graphics-UI-Gtk-Layout-Fixed.html#t:Fixed">Fixed</a></code> container to the given position. </p></div></div><div class="top"><p class="src"><a name="v:fixedSetHasWindow" class="def">fixedSetHasWindow</a> :: <a href="Graphics-UI-Gtk-Layout-Fixed.html#t:FixedClass">FixedClass</a> self => self -> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Bool.html#t:Bool">Bool</a> -> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a><a href="src/Graphics-UI-Gtk-Layout-Fixed.html#fixedSetHasWindow" class="link">Source</a></p><div class="doc"><p>Sets whether the <code><a href="Graphics-UI-Gtk-Layout-Fixed.html#t:Fixed">Fixed</a></code> widget is created with a separate <code><a href="Graphics-UI-Gtk-Gdk-DrawWindow.html#t:DrawWindow">DrawWindow</a></code> for its window or not. (By default, it will be created with no separate <code><a href="Graphics-UI-Gtk-Gdk-DrawWindow.html#t:DrawWindow">DrawWindow</a></code>). This function must be called while the <code><a href="Graphics-UI-Gtk-Layout-Fixed.html#t:Fixed">Fixed</a></code> is not realized, for instance, immediately after the window is created. </p><p>This function was added to provide an easy migration path for older applications which may expect <code><a href="Graphics-UI-Gtk-Layout-Fixed.html#t:Fixed">Fixed</a></code> to have a separate window. </p></div></div><div class="top"><p class="src"><a name="v:fixedGetHasWindow" class="def">fixedGetHasWindow</a> :: <a href="Graphics-UI-Gtk-Layout-Fixed.html#t:FixedClass">FixedClass</a> self => self -> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Bool.html#t:Bool">Bool</a><a href="src/Graphics-UI-Gtk-Layout-Fixed.html#fixedGetHasWindow" class="link">Source</a></p><div class="doc"><p>Gets whether the <code><a href="Graphics-UI-Gtk-Layout-Fixed.html#t:Fixed">Fixed</a></code> has its own <code><a href="Graphics-UI-Gtk-Gdk-DrawWindow.html#t:DrawWindow">DrawWindow</a></code>. See <code><a href="Graphics-UI-Gtk-Layout-Fixed.html#v:fixedSetHasWindow">fixedSetHasWindow</a></code>. </p></div></div><h1 id="g:6">Attributes </h1><div class="top"><p class="src"><a name="v:fixedHasWindow" class="def">fixedHasWindow</a> :: <a href="Graphics-UI-Gtk-Layout-Fixed.html#t:FixedClass">FixedClass</a> self => <a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-Attributes.html#t:Attr">Attr</a> self <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Bool.html#t:Bool">Bool</a><a href="src/Graphics-UI-Gtk-Layout-Fixed.html#fixedHasWindow" class="link">Source</a></p><div class="doc"><p>'hasWindow' property. See <code><a href="Graphics-UI-Gtk-Layout-Fixed.html#v:fixedGetHasWindow">fixedGetHasWindow</a></code> and <code><a href="Graphics-UI-Gtk-Layout-Fixed.html#v:fixedSetHasWindow">fixedSetHasWindow</a></code> </p></div></div><h1 id="g:7">Child Attributes </h1><div class="top"><p class="src"><a name="v:fixedChildX" class="def">fixedChildX</a> :: (<a href="Graphics-UI-Gtk-Layout-Fixed.html#t:FixedClass">FixedClass</a> self, <a href="Graphics-UI-Gtk-Abstract-Widget.html#t:WidgetClass">WidgetClass</a> child) => child -> <a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-Attributes.html#t:Attr">Attr</a> self <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Int.html#t:Int">Int</a><a href="src/Graphics-UI-Gtk-Layout-Fixed.html#fixedChildX" class="link">Source</a></p><div class="doc"><p>X position of child widget. </p><p>Default value: 0 </p></div></div><div class="top"><p class="src"><a name="v:fixedChildY" class="def">fixedChildY</a> :: (<a href="Graphics-UI-Gtk-Layout-Fixed.html#t:FixedClass">FixedClass</a> self, <a href="Graphics-UI-Gtk-Abstract-Widget.html#t:WidgetClass">WidgetClass</a> child) => child -> <a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-Attributes.html#t:Attr">Attr</a> self <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Int.html#t:Int">Int</a><a href="src/Graphics-UI-Gtk-Layout-Fixed.html#fixedChildY" class="link">Source</a></p><div class="doc"><p>Y position of child widget. </p><p>Default value: 0 </p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.9.2</p></div></body></html>