[ruby-gnome2-doc-cvs] [Hiki] update - Gtk::ToggleButton

アーカイブの一覧に戻る

ruby-****@lists***** ruby-****@lists*****
2003年 4月 7日 (月) 17:54:52 JST


-------------------------
REMOTE_ADDR = 61.204.181.66
REMOTE_HOST = 
-------------------------

-------------------------
= class Gtk::ToggleButton
A Gtk::ToggleButton is a Gtk::Button which will remain 'pressed-in' when clicked. Clicking again will cause the toggle button to return to it's normal state. 

The state of a Gtk::ToggleButton can be set specifically using Gtk::ToggleButton#active=, and retrieved using Gtk::ToggleButton#active?. 

To simply switch the state of a toggle button, use Gtk::ToggleButton#toggled. 

== super class
* Gtk::Button

== class methods
--- Gtk::ToggleButton.new(label = nil, use_underline = false)
    Creates a new Gtk::ToggleButton with a Gtk::Label to the right of it.
    If use_underline is true, the label will be created underscores in label indicate the mnemonic for the check button.
    * label : the text label to display next to the radio button.
    * use_underline : true if the label will be created underscores in label indicate the mnemonic for check button.
    * Returns: a new Gtk::ToggleButton.
  
--- Gtk::ToggleButton.new(stock)
    Creates a new Gtk::ToggleButton with a Gtk::Stock constant value.
    * stock: a Gtk::Stock constant value.
    * Returns: a new Gtk::ToggleButton.
    

== public instance methods
--- active?
    Queries a Gtk::ToggleButton and returns it's current state. 
    Returns: true if the toggle button is pressed in and false if it is raised. 

--- active=(active)
    Sets the status of the toggle button. Set to true if you want the Gtk::ToggleButton to be 'pressed in', and false to raise it. This action causes the toggled signal to be emitted. 
    * active: true or false.
    * Returns: active.

--- set_active(active)
    Same as active=.
    * active: true or false.
    * Returns: self

--- draw_indicator?
    Gets the value set by Gtk::ToggleButton#draw_indicator=.
    * Returns: true if the toggle part of the button is displayed, false otherwise

--- draw_indicator=(draw_indicator)
    Sets the toggle part of the button is displayed or not.
    * draw_indicator: true if the toggle part of the button is displayed, false otherwise
    * Returns: draw_inidicator

--- set_draw_indicator(draw_indicator)
    Same as draw_indicator=.
    * draw_indicator: true if the toggle part of the button is displayed, false otherwise
    * Returns: self

--- inconsistent?
    Gets the value set by Gtk::ToggleButton#inconsistent=.
    * Returns: true if the button is displayed as inconsistent, false otherwise

--- inconsistent=(setting)
    If the user has selected a range of elements (such as some text or spreadsheet cells) that are affected by a toggle button, and the current values in that range are inconsistent, you may want to display the toggle in an "in between" state. This function turns on "in between" display. Normally you would turn off the inconsistent state again if the user toggles the toggle button. This has to be done manually, Gtk::ToggleButton#inconsistent= only affects visual appearance, it doesn't affect the semantics of the button.
    * setting: true if state is inconsistent  
    * Returns: setting

--- set_inconsistent(setting)
    Same as inconsistent=.
    * setting: true if state is inconsistent  
    * Returns: self

--- mode?
    Retrieves whether the button is displayed as a separate indicator and label. See Gtk::ToggleButton#mode=.
    * Returns: true if the togglebutton is drawn as a separate indicator and label.  

--- mode=(draw_indicator)
    Sets whether the button is displayed as a separate indicator and label. You can call this method on a checkbutton or a radiobutton with draw_indicator = false to make the button look like a normal button.
    This function only effects instances of classes like Gtk::CheckButton and Gtk::RadioButton that derive from Gtk::ToggleButton, not instances of Gtk::ToggleButton itself.
    * draw_indicator : if true, draw the button as a separate indicator and label; if false, draw the button like a normal button
    * Returns: draw_indicator

--- set_mode(draw_indicator)
    Same as mode=.
    * draw_indicator : if true, draw the button as a separate indicator and label; if false, draw the button like a normal button
    * Returns: self

--- toggled
    Emits the toggled signal on the Gtk::ToggleButton. There is no good reason for an application ever to call this function. 
    * Returns: self

== signals
--- toggled: self
     * self: the object which received the signal. 

== See Also
* Gtk::Button a more general button.
* Gtk::CheckButton another way of presenting a toggle option.
* Gtk::CheckMenuItem a Gtk::ToggleButton as a menu item

- ((<Masao>))





ruby-gnome2-cvs メーリングリストの案内
アーカイブの一覧に戻る