gtk.ToggleToolButton

gtk.ToggleToolButton — A gtk.ToolItem containing a toggle button (new in PyGTK 2.4)

Synopsis

class gtk.ToggleToolButton(gtk.ToolButton):
    gtk.ToggleToolButton(stock_id=None)
def set_active(is_active)
def get_active()

Ancestry

+-- gobject.GObject
  +-- gtk.Object
    +-- gtk.Widget
      +-- gtk.Container
        +-- gtk.Bin
          +-- gtk.ToolItem
            +-- gtk.ToolButton
              +-- gtk.ToggleToolButton

Signal Prototypes

"toggled" def callback(toggletoolbutton, user_param1, ...)

Description

Note

This widget is available in PyGTK 2.4 and above.

A gtk.ToggleToolButton is a gtk.ToolItem that contains a toggle button. Use the gtk.ToggleToolButton() constructor to create a new gtk.ToggleToolButton.

Constructor

    gtk.ToggleToolButton(stock_id=None)
stock_id :the name of a stock item
Returns :a newly created gtk.ToggleToolButton

Note

This constructor is available in PyGTK 2.4 and above.

Creates a new gtk.ToggleToolButton. If stock_id is not None the toggle tool button contains the image and text from the specified stock item.

Methods

gtk.ToggleToolButton.set_active

    def set_active(is_active)
is_active :if TRUE the toggle tool button is active

Note

This method is available in PyGTK 2.4 and above.

The set_active() method sets the status of the toggle tool button to the value specified by is_active. If is_active is TRUE the gtk.ToggleButton is 'pressed in' (active). This method causes the toggled signal to be emitted.

gtk.ToggleToolButton.get_active

    def get_active()
Returns :TRUE if the toggle tool button is pressed in (active)

Note

This method is available in PyGTK 2.4 and above.

The get_active() method returns TRUE if the toggle tool button is pressed in (active) and FALSE if it is raised.

Signals

The "toggled" gtk.ToggleToolButton Signal

    def callback(toggletoolbutton, user_param1, ...)
toggletoolbutton :the toggletoolbutton that received the signal
user_param1 :the first user parameter (if any) specified with the connect() method
... :additional user parameters (if any)

Note

This signal is available in GTK+ 2.4 and above.

The "toggled" signal is emitted when the toggle tool button changes state.