Gtk.ToggleToolButton¶
| Subclasses: | Gtk.RadioToolButton | 
|---|
Methods¶
| class | new() | 
| class | new_from_stock(stock_id) | 
| get_active() | |
| set_active(is_active) | 
Virtual Methods¶
| Inherited: | Gtk.ToolButton (1), Gtk.ToolItem (2), Gtk.Container (10), Gtk.Widget (82), GObject.Object (7), Gtk.Buildable (10), Gtk.Activatable (2), Gtk.Actionable (4) | 
|---|
| do_toggled() | 
Properties¶
| Inherited: | Gtk.ToolButton (6), Gtk.ToolItem (3), Gtk.Container (3), Gtk.Widget (39), Gtk.Activatable (2), Gtk.Actionable (2) | 
|---|
| Name | Type | Flags | Short Description | 
|---|---|---|---|
| active | bool | r/w/en | If the toggle button should be pressed in | 
Style Properties¶
| Inherited: | Gtk.ToolButton (1), Gtk.Widget (17) | 
|---|
Signals¶
| Inherited: | Gtk.ToolButton (1), Gtk.ToolItem (2), Gtk.Container (4), Gtk.Widget (69), GObject.Object (1) | 
|---|
| Name | Short Description | 
|---|---|
| toggled | Emitted whenever the toggle tool button changes state. | 
Fields¶
| Inherited: | Gtk.ToolButton (1), Gtk.ToolItem (2), Gtk.Container (4), Gtk.Widget (69), GObject.Object (1) | 
|---|
| Name | Type | Access | Description | 
|---|---|---|---|
| parent | Gtk.ToolButton | r | 
Class Details¶
- 
class Gtk.ToggleToolButton(*args, **kwargs)¶
- Bases: - Gtk.ToolButton- Abstract: - No - Structure: - Gtk.ToggleToolButtonClass- A - Gtk.ToggleToolButtonis a- Gtk.ToolItemthat contains a toggle button.- Use - Gtk.ToggleToolButton.new() to create a new- Gtk.ToggleToolButton.- CSS nodes
 - Gtk.ToggleToolButtonhas a single CSS node with name togglebutton.- 
classmethod new()[source]¶
- Returns: - a newly created - Gtk.ToggleToolButton- Return type: - Gtk.ToolItem- Returns a new - Gtk.ToggleToolButton- New in version 2.4. 
 - 
classmethod new_from_stock(stock_id)[source]¶
- Parameters: - stock_id ( - str) – the name of the stock item- Returns: - A new - Gtk.ToggleToolButton- Return type: - Gtk.ToolItem- Creates a new - Gtk.ToggleToolButtoncontaining the image and text from a stock item. Some stock ids have preprocessor macros like- Gtk.STOCK_OKand- Gtk.STOCK_APPLY.- It is an error if stock_id is not a name of a stock item. - New in version 2.4. - Deprecated since version 3.10: Use - Gtk.ToggleToolButton.new() instead.
 - 
get_active()[source]¶
- Returns: - Trueif the toggle tool button is pressed in,- Falseif not- Return type: - bool- Queries a - Gtk.ToggleToolButtonand returns its current state. Returns- Trueif the toggle button is pressed in and- Falseif it is raised.- New in version 2.4. 
 - 
set_active(is_active)[source]¶
- Parameters: - is_active ( - bool) – whether self should be active- Sets the status of the toggle tool button. Set to - Trueif you want the- Gtk.ToggleButtonto be “pressed in”, and- Falseto raise it. This action causes the toggled signal to be emitted.- New in version 2.4. 
 - 
do_toggled() virtual¶
 
Signal Details¶
- 
Gtk.ToggleToolButton.signals.toggled(toggle_tool_button)¶
- Signal Name: - toggled- Flags: - RUN_FIRST- Parameters: - toggle_tool_button ( - Gtk.ToggleToolButton) – The object which received the signal- Emitted whenever the toggle tool button changes state.