Create  Edit  FrontPage  Index  Search  Changes  History  RSS  Back  Login

Gtk::Misc Diff - Ruby-GNOME2 Project Website

  • Added parts are displayed like this.
  • Deleted parts are displayed like this.

= class Gtk::Misc

The Gtk::Misc widget is an abstract widget which is not useful itself, but is used to derive subclasses which have alignment and padding attributes.
The horizontal and vertical padding attributes allows extra space to be added around the widget.
The horizontal and vertical alignment attributes enable the widget to be positioned within its allocated area. Note that if the widget is added to a container in such a way that it expands automatically to fill its allocated area, the alignment settings will not alter the widgets position.

== Object Hierarchy

* Object
  * GLib::Instantiatable
    * GLib::Object
      * GLib::InitiallyUnowned
        * Gtk::Object
          * Gtk::Widget
            * Gtk::Misc

== Instance Methods

--- alignment

    Gets the X and Y alignment of the widget within its allocation.
    * Returns: [xalign, yalign]

--- set_alignment(xalign, yalign)

    Sets the alignment of the widget.
    * xalign: the horizontal alignment, from 0 (left) to 1 (right).  
    * yalign: the vertical alignment, from 0 (top) to 1 (bottom).  
    * Returns: self

--- padding

    Gets the padding in the X and Y directions of the widget.
    * Returns: [xpad, ypad]

--- set_padding(xpad, ypad)

    Sets the amount of space to add around the widget.
    * xpad: the amount of space to add on the left and right of the widget, in pixels.  
    * ypad: the amount of space to add on the top and bottom of the widget, in pixels.

--- xalign

    Gets the xalign.
    * Returns: xalign

--- xalign=(xalign)

    Sets the xalign.
    * xalign: the horizontal alignment, from 0 (left) to 1 (right).
    * Returns: xalign

--- set_xalign(xalign)

    Same as Gtk::Misc#xalign=.
    * xalign: the horizontal alignment, from 0 (left) to 1 (right).
    * Returns: self

--- yalign

    Gets the yalign.
    * Returns: yalign

--- yalign=(yalign)

    Sets the yalign.
    * yalign: the horizontal alignment, from 0 (left) to 1 (right).
    * Returns: yalign

--- set_yalign(yalign)

    Same as Gtk::Misc#yalign=.
    * yalign: the horizontal alignment, from 0 (left) to 1 (right).
    * Returns: self

--- xpad

    Gets the xpad.
    * Returns: xpad

--- xpad=(xpad)

    Sets the xpad.
    * xpad: the amount of space to add on the left and right of the widget, in pixels.  
    * Returns: xpad

--- set_xpad(xpad)

    Same as Gtk::Misc#xpad=.
    * xpad: the amount of space to add on the left and right of the widget, in pixels.  
    * Returns: self

--- ypad

    Gets the ypad.
    * Returns: ypad

--- ypad=(ypad)

    Sets the ypad.
    * ypad: the amount of space to add on the top and bottom of the widget, in pixels.  
    * Returns: ypad

--- set_ypad(ypad)

    Same as Gtk::Misc#ypad=.
    * ypad: the amount of space to add on the top and bottom of the widget, in pixels.
    * Returns: self

--- ref_accessible

    See Atk::Implementor#ref_accessible.

--- add_child

    See Gtk::Buildable#add_child.

--- construct_child

    See Gtk::Buildable#construct_child.

--- get_internal_child

    See Gtk::Buildable#get_internal_child.

--- name

    See Gtk::Buildable#name.

--- name=

    See Gtk::Buildable#name=.

--- set_buildable_property

    See Gtk::Buildable#set_buildable_property.

--- set_name

    See Gtk::Buildable#set_name.

--- builder_name

    See Gtk::Buildable#builder_name.

--- builder_name=

    See Gtk::Buildable#builder_name=.

--- set_builder_name

    See Gtk::Buildable#set_builder_name.

== Properties

--- xalign: Float (Read/Write)

    The horizontal alignment, from 0 (left) to 1 (right)

--- xpad: Integer (Read/Write)

    The amount of space to add on the left and right of the widget, in pixels

--- yalign: Float (Read/Write)

    The vertical alignment, from 0 (top) to 1 (bottom)

--- ypad: Integer (Read/Write)

    The amount of space to add on the top and bottom of the widget, in pixels

== See Also

== ChangeLog

- ((<Masao>))