org.gnome.gtk

## Class Fixed

- Object
- - org.freedesktop.bindings.Pointer
  - - org.freedesktop.bindings.Proxy
    - - org.gnome.glib.Object
      - - org.gnome.gtk.Widget
        - - org.gnome.gtk.Container
          - - org.gnome.gtk.Fixed

-     public class Fixed
      extends Container

  Fixed is a Container Widget that allows you to position other widgets on it at fixed coordinates. These could include Buttons and Labels as well as more complex composite widgets like Boxes.

  You should not use Fixed for any non-trivial purpose. While you might think at first that it would simplify your application, the reality is that Fixed is almost always the wrong Container choice. Because GTK is the widget toolkit used to power the user interfaces of GNOME applications, the appearance of Widgets is very dynamic. Different window managers and theme engines can radically change the size and appearance of Widgets to suit varying accessibility and usability requirements; different fonts available to your users will cause Labels to be sized differently than you'd expect, and of course translation completely throws predictability right out the window. Since the Fixed Container does not adapt to the size requests of the Widgets with in it, the frequent result is truncated text, overlapping Widgets, and other visual bugs.

  The Fixed widget can't be properly mirrored in right-to-left languages such as Hebrew and Arabic. A Fixed widget with a right-to-left font will render your application unusable.

  Adding or removing any GUI elements from this Fixed requires you to reposition all the other Widgets within it. As you can imagine, this will end up a long-term maintenance headache for your application.

  If any of those are a concern for your application, then you should be using a different Container, either combinations of `VBox` and `HBox`, or perhaps `Table`. You have been warned!

  Since:
    4.0.1
  Author:
    Srichand Pendyala, Andrew Cowie
  See Also:
    `Layout`, `DrawingArea`

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.gnome.gtk.Widget

      `Widget.ButtonPressEvent, Widget.ButtonReleaseEvent, Widget.Destroy, Widget.Draw, Widget.EnterNotifyEvent, Widget.FocusInEvent, Widget.FocusOutEvent, Widget.Hide, Widget.KeyPressEvent, Widget.KeyReleaseEvent, Widget.LeaveNotifyEvent, Widget.MapEvent, Widget.MotionNotifyEvent, Widget.PopupMenu, Widget.ScrollEvent, Widget.SizeAllocate, Widget.UnmapEvent, Widget.VisibilityNotifyEvent`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Fixed()` Create a new Fixed Widget.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `move(Widget widget, int x, int y)` Move a Widget that has already been added to this Fixed to a new location.
    `void` | `put(Widget widget, int x, int y)` Place a Widget into the Fixed Container at a specified location.

    - ### Methods inherited from class org.gnome.gtk.Container

      `add, getChildren, remove, setBorderWidth`

    - ### Methods inherited from class org.gnome.gtk.Widget

      `activate, addEvents, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, destroy, getAllocatedHeight, getAllocatedWidth, getAllocation, getCanDefault, getCanFocus, getHasFocus, getName, getParent, getPreferredHeightForWidthMinimum, getPreferredHeightForWidthNatural, getPreferredHeightMinimum, getPreferredHeightNatural, getPreferredWidthForHeightMinimum, getPreferredWidthForHeightNatural, getPreferredWidthMinimum, getPreferredWidthNatural, getRequestMode, getRequisition, getSensitive, getStyleContext, getToplevel, getWindow, grabAdd, grabDefault, grabFocus, grabRemove, hide, isSensitive, overrideBackground, overrideColor, overrideFont, queueDraw, queueDrawArea, realize, setAlignHorizontal, setAlignVertical, setCanDefault, setCanFocus, setEvents, setExpandHorizontal, setExpandVertical, setName, setSensitive, setSizeRequest, setTooltipMarkup, setTooltipText, show, showAll`

    - ### Methods inherited from class org.freedesktop.bindings.Pointer

      `toString`

    - ### Methods inherited from class Object

      `equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### Fixed

          public Fixed()

      Create a new Fixed Widget.
      Since:
        4.0.1

  - ### Method Detail

    - #### move

          public void move(Widget widget,
                  int x,
                  int y)

      Move a Widget that has already been added to this Fixed to a new location.

      Calling `move()` will cause GTK to inherently redraw the entire Fixed surface. If you have many Widgets in a Fixed, this can lead to flickering. Consider using `Layout` or `DrawingArea` instead.

      The x and y co-ordinates are measured in pixels from the top left corner of the Fixed.

      Parameters:
        `widget` - the Widget that will be moved.
        `x` - the horizontal position to move `widget` to.
        `y` - the vertical position to move `widget` to.
      Since:
        4.0.1

    - #### put

          public void put(Widget widget,
                 int x,
                 int y)

      Place a Widget into the Fixed Container at a specified location.

      It is up to you to ensure that the placing of the new Widget will not overlap any existing Widgets. If this is starting to be a burden, it's a good sign you're using the wrong Container!

      The x and y co-ordinates are measured in pixels from the top left corner of the Fixed.

      Parameters:
        `widget` - the Widget to be placed in the Fixed.
        `x` - horizontal position for the Widget being added
        `y` - vertical position for the Widget being added
      Since:
        4.0.1