Gtk.ToggleToolButton¶
- Subclasses:
Methods¶
- Inherited:
Gtk.ToolButton (14), Gtk.ToolItem (28), Gtk.Bin (1), Gtk.Container (35), Gtk.Widget (278), GObject.Object (37), Gtk.Buildable (10), Gtk.Activatable (6), Gtk.Actionable (5)
- Structs:
Gtk.ContainerClass (5), Gtk.WidgetClass (12), GObject.ObjectClass (5)
class |
|
class |
|
|
|
|
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)
|
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 |
|---|---|---|---|
r/w/en |
If the toggle button should be pressed in |
Style Properties¶
- Inherited:
Signals¶
- Inherited:
Gtk.ToolButton (1), Gtk.ToolItem (2), Gtk.Container (4), Gtk.Widget (69), GObject.Object (1)
Name |
Short Description |
|---|---|
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 |
r |
Class Details¶
- class Gtk.ToggleToolButton(*args, **kwargs)¶
- Bases:
- Abstract:
No
- Structure:
A
Gtk.ToggleToolButtonis aGtk.ToolItemthat contains a toggle button.Use
Gtk.ToggleToolButton.new() to create a newGtk.ToggleToolButton.- CSS nodes
Gtk.ToggleToolButtonhas a single CSS node with name togglebutton.- classmethod new()[source]¶
- Returns:
a newly created
Gtk.ToggleToolButton- Return type:
Returns a new
Gtk.ToggleToolButtonNew 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:
Creates a new
Gtk.ToggleToolButtoncontaining the image and text from a stock item. Some stock ids have preprocessor macros likeGtk.STOCK_OKandGtk.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]¶
-
Queries a
Gtk.ToggleToolButtonand returns its current state. ReturnsTrueif the toggle button is pressed in andFalseif 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 theGtk.ToggleButtonto be “pressed in”, andFalseto raise it. This action causes the toggled signal to be emitted.New in version 2.4.
- do_toggled() virtual¶
Signal emitted whenever the toggle tool button changes state.
Signal Details¶
- Gtk.ToggleToolButton.signals.toggled(toggle_tool_button)¶
- Signal Name:
toggled- Flags:
- Parameters:
toggle_tool_button (
Gtk.ToggleToolButton) – The object which received the signal
Emitted whenever the toggle tool button changes state.