GtkToggleToolButton

GtkToggleToolButton — A GtkToolItem containing a toggle button

Functions

Types and Values

Includes

#include <gtk/gtk.h>

Description

A GtkToggleToolButton is a GtkToolItem that contains a toggle button.

Use gtk_toggle_tool_button_new() to create a new GtkToggleToolButton.

CSS nodes

GtkToggleToolButton has a single CSS node with name togglebutton.

Functions

gtk_toggle_tool_button_new ()

GtkToolItem *
gtk_toggle_tool_button_new (void);

Returns a new GtkToggleToolButton

Returns

a newly created GtkToggleToolButton

Since: 2.4


gtk_toggle_tool_button_set_active ()

void
gtk_toggle_tool_button_set_active (GtkToggleToolButton *button,
                                   gboolean is_active);

Sets the status of the toggle tool button. Set to TRUE if you want the GtkToggleButton to be “pressed in”, and FALSE to raise it. This action causes the toggled signal to be emitted.

Parameters

button

a GtkToggleToolButton

 

is_active

whether button should be active

 

Since: 2.4


gtk_toggle_tool_button_get_active ()

gboolean
gtk_toggle_tool_button_get_active (GtkToggleToolButton *button);

Queries a GtkToggleToolButton and returns its current state. Returns TRUE if the toggle button is pressed in and FALSE if it is raised.

Parameters

button

a GtkToggleToolButton

 

Returns

TRUE if the toggle tool button is pressed in, FALSE if not

Since: 2.4

Types and Values

struct GtkToggleToolButton

struct GtkToggleToolButton {
  GtkToolButton parent;
};

struct GtkToggleToolButtonClass

struct GtkToggleToolButtonClass {
  GtkToolButtonClass parent_class;


  /* signal */
  void (* toggled) (GtkToggleToolButton *button);
};

Members

toggled ()

Signal emitted whenever the toggle tool button changes state.

 

See Also

GtkToolbar, GtkToolButton, GtkSeparatorToolItem