Gtk.ToggleToolButton


Gtk.ToggleToolButton — A Gtk.ToolItem containing a toggle button

Object Hierarchy:

    GObject
    ╰── GInitiallyUnowned
        ╰── Gtk.Widget
            ╰── Gtk.Container
                ╰── Gtk.Bin
                    ╰── Gtk.ToolItem
                        ╰── Gtk.ToolButton
                            ╰── Gtk.ToggleToolButton
                                ╰── Gtk.RadioToolButton

See also:

Gtk.Toolbar, Gtk.ToolButton, Gtk.SeparatorToolItem


Functions:

Description:

A Gtk.ToggleToolButton is a GtkToolItem that contains a toggle button.

Use Gtk.ToggleToolButton::new() to create a new Gtk.ToggleToolButton.


Function Details:

new()

new () -> Gtk.ToolItem

Returns a new Gtk.ToggleToolButton

  • Returns: a newly created Gtk.ToggleToolButton

  • Since: 2.4


new_from_stock()

new_from_stock (stock_id:str) -> Gtk.ToolItem

Gtk.ToggleToolButton:new_from_stock has been deprecated since version 3.10 and should not be used in newly-written code. Use Gtk.ToggleToolButton:new() instead. Creates a new Gtk.ToggleToolButton containing the image and text from astock 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.

  • Returns: A new Gtk.ToggleToolButton

  • Since: 2.4


set_active()

set_active (self, is_active:bool)

Sets the status of the toggle tool button. Set to True if youwant the Gtk.ToggleButton to be “pressed in”, and FALSE to raise it.This action causes the toggled signal to be emitted.

  • Since: 2.4

get_active()

get_active (self) -> bool

Queries a Gtk.ToggleToolButton and returns its current state.Returns True if the toggle button is pressed in and FALSE if it is raised.

  • Returns: True if the toggle tool button is pressed in, FALSE if not

  • Since: 2.4


results matching ""

    No results matching ""