Crea  Modifica  FrontPage  Indici  Cerca  Ultime modifiche  History  RSS  Login

Gtk::Allocation

Gtk::Allocation

A Gtk::Allocation of a widget represents region which has been allocated to the widget by its parent. It is a subregion of its parents allocation. See the section called Size Allocation for more information.

Class Methods

Gtk::Allocation.new(x, y, width, height)
Creates a new Gtk::Allocation.
  • x: The X position of the widget's area relative to its parents allocation. (Integer)
  • y: The Y position of the widget's area relative to its parents allocation. (Integer)
  • width: The width of the widget's allocated area. (Integer)
  • height: The height of the widget's allocated area.(Integer)
  • Returns: a new Gtk::Allocation

Instance Methods

&(other)
Gets a new Gtk::Allocation that is intersection of the two regions.
intersect(other)
Same as Gtk::Allocation#&
|(other)
Gets a new Gtk::Allocation that combines all of this region and the second region.
union(other)
Same as Gtk::Allocation#|.
height
Gets the height value.
  • Returns: The height of the widget's allocated area.
height=(height)
Sets the height value.
  • height: a new height of the widget's allocated area. (Integer)
  • Returns: height
set_height(height)
Same as Gtk::Allocation#height=.
  • height: a new height of the widget's allocated area. (Integer)
  • Returns: self
width
Gets the width value.
  • Returns: The width of the widget's allocated area. (Integer)
width=(width)
Sets the width value.
  • width: a new width of the widget's allocated area. (Integer)
  • Returns: widget
set_width(width)
Same as Gtk::Allocation#width=.
  • width: a new width of the widget's allocated area. (Integer)
  • Returns: self
x
Gets the x value.
  • Returns: The X position of the widget's area relative to its parents allocation. (Integer)
x=(x)
Sets the X value.
  • x: a new X position of the widget's area relative to its parents allocation. (Integer)
  • Returns: x
set_x(x)
Same as Gtk::Allocation#x=.
  • x: a new X position of the widget's area relative to its parents allocation. (Integer)
  • Returns: self
y
Gets the Y value.
  • Returns: The Y position of the widget's area relative to its parents allocation. (Integer)
y=(y)
Sets the y value.
  • y: a new Y position of the widget's area relative to its parents allocation. (Integer)
  • Returns: y
set_y(y)
Same as Gtk::Allocation#y=.
  • y: a new Y position of the widget's area relative to its parents allocation. (Integer)
  • Returns: self
to_a
Gets the values as an Array.
  • Returns: [x, y, width, height]
    • x: The X position of the widget's area relative to its parents allocation. (Integer)
    • y: The Y position of the widget's area relative to its parents allocation. (Integer)
    • width: The width of the widget's allocated area. (Integer)
    • height: The height of the widget's allocated area.(Integer)
to_rect
Gets the values as an Gdk::Rectangle.

ChangeLog

  • 2007-03-25 Improved. - Masao
  • 2006-01-31 Added #to_rect - Masao
Ultima modifica:2007/03/25 22:25:56
Parola chiave:
Referenze:[Gdk::Rectangle] [Gtk::Widget] [Gtk::Allocation] [Gtk::Container]