[ruby-gnome2-doc-cvs] [Hiki] create - Gtk::SizeGroup

Back to archive index

ruby-****@sourc***** ruby-****@sourc*****
2003年 8月 15日 (金) 14:47:18 JST


-------------------------
REMOTE_ADDR = 61.204.181.66
REMOTE_HOST = 
        URL = http://ruby-gnome2.sourceforge.jp/?Gtk%3A%3ASizeGroup
-------------------------
= class Gtk::SizeGroup
Gtk::SizeGroup provides a mechanism for grouping a number of widgets together so they all request the same amount of space. This is typically useful when you want a column of widgets to have the same size, but you can't use a Gtk::Table widget.

In detail, the size requested for each widget in a Gtk::SizeGroup is the maximum of the sizes that would have been requested for each widget in the size group if they were not in the size group. The mode of the size group (see Gtk::SizeGroup#mode=) determines whether this applies to the horizontal size, the vertical size, or both sizes.

Note that size groups only affect the amount of space requested, not the size that the widgets finally receive. If you want the widgets in a Gtk::SizeGroup to actually be the same size, you need to pack them in such a way that they get the size they request and not more. For example, if you are packing your widgets into a table, you would not include the ((<GtkAttachOptions|Gtk#GtkAttachOptions>)) flag.

Widgets can be part of multiple size groups; GTK+ will compute the horizontal size of a widget from the horizontal requisition of all widgets that can be reached from the widget by a chain of size groups of type Gtk::SizeGroup::HORIZONTAL or Gtk::SizeGroup::BOTH, and the vertical size from the vertical requisition of all widgets that can be reached from the widget by a chain of size groups of type Gtk::SizeGroup::VERTICAL or Gtk::SizeGroup::BOTH.

== super class
* GLib::Object

== Class Methods
--- Gtk::SizeGroup.new(mode)
    Create a new Gtk::SizeGroup.
    * mode : the mode for the new size group. (((<GtkSizeGroupMode|Gtk::SizeGroup#GtkSizeGroupMode>)))
    * Returns : a newly created Gtk::SizeGroup 

== Instance Methods
--- mode
    Gets the current mode of the size group. See Gtk::SizeGroup#mode=.
    * Returns : the current mode of the size group. 
--- mode=(mode)
    Sets the ((<GtkSizeGroupMode|Gtk::SizeGroup#GtkSizeGroupMode>)) of the size group. The mode of the size group determines whether the widgets in the size group should all have the same horizontal requisition (Gtk::SizeGroup::HORIZONTAL) all have the same vertical requisition (Gtk::SizeGroup::VERTICAL), or should all have the same requisition in both directions (Gtk::SizeGroup::BOTH).
    * mode: the mode to set for the size group. (((<GtkSizeGroupMode|Gtk::SizeGroup#GtkSizeGroupMode>)))
    * Returns: mode
--- set_mode(mode)
    Same as mode=.
    * mode: the mode to set for the size group. (((<GtkSizeGroupMode|Gtk::SizeGroup#GtkSizeGroupMode>)))
    * Returns: self

--- add_widget(widget)
    Adds a widget to a Gtk::SizeGroup. In the future, the requisition of the widget will be determined as the maximum of its requisition and the requisition of the other widgets in the size group. Whether this applies horizontally, vertically, or in both directions depends on the mode of the size group. See Gtk::SizeGroup#mode=.
    * widget: the Gtk::Widget to add 
    * Returns: self

--- remove_widget(widget)
    Removes a widget from a Gtk::SizeGroup.
    * widget: the Gtk::Widget to remove 
    * Returns: self

== Constants
=== GtkSizeGroupMode
The mode of the size group determines the directions in which the size group effects the requested sizes of its component widgets.
--- NONE
    group has no effect 
--- HORIZONTAL
    group effects horizontal requisition
--- VERTICAL
    group effects vertical requisition
--- BOTH
    group effects both horizontal and vertical requisition




- ((<Masao>))






ruby-gnome2-cvs メーリングリストの案内
Back to archive index