Next: , Previous: GtkMenuToolButton, Up: Top

70 GtkToggleToolButton

A GtkToolItem containing a toggle button

70.1 Overview

A <gtk-toggle-tool-button> is a <gtk-tool-item> that contains a toggle button.

Use gtk-toggle-tool-button-new to create a new <gtk-toggle-tool-button>. Use gtk-toggle-tool-button-new-from-stock to create a new <gtk-toggle-tool-button> containing a stock item.

70.2 Usage

— Class: <gtk-toggle-tool-button>

Derives from <gtk-tool-button>.

This class defines the following slots:

If the toggle button should be pressed in or not
— Signal on <gtk-toggle-tool-button>: toggled

Emitted whenever the toggle tool button changes state.

— Function: gtk-toggle-tool-button-new ⇒  (ret <gtk-tool-item>)

Returns a new <gtk-toggle-tool-button>

a newly created <gtk-toggle-tool-button>

Since 2.4

— Function: gtk-toggle-tool-button-set-active (self <gtk-toggle-tool-button>) (is_active bool)
— Method: set-active

Sets the status of the toggle tool button. Set to ‘#t’ if you want the GtkToggleButton to be 'pressed in', and ‘#f’ to raise it. This action causes the toggled signal to be emitted.

a <gtk-toggle-tool-button>
whether button should be active

Since 2.4

— Function: gtk-toggle-tool-button-get-active (self <gtk-toggle-tool-button>) ⇒  (ret bool)
— Method: get-active

Queries a <gtk-toggle-tool-button> and returns its current state. Returns ‘#t’ if the toggle button is pressed in and ‘#f’ if it is raised.

a <gtk-toggle-tool-button>
#t’ if the toggle tool button is pressed in, ‘#f’ if not

Since 2.4