GTK+ 2 Reference Manual | ||||
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces | Properties | Signals |
#include <gtk/gtk.h> struct GtkToggleToolButton; GtkToolItem * gtk_toggle_tool_button_new (void
); GtkToolItem * gtk_toggle_tool_button_new_from_stock (const gchar *stock_id
); void gtk_toggle_tool_button_set_active (GtkToggleToolButton *button
,gboolean is_active
); gboolean gtk_toggle_tool_button_get_active (GtkToggleToolButton *button
);
GObject +----GInitiallyUnowned +----GtkObject +----GtkWidget +----GtkContainer +----GtkBin +----GtkToolItem +----GtkToolButton +----GtkToggleToolButton +----GtkRadioToolButton
GtkToggleToolButton implements AtkImplementorIface, GtkBuildable and GtkActivatable.
A GtkToggleToolButton is a GtkToolItem that contains a toggle button.
Use gtk_toggle_tool_button_new()
to create a new
GtkToggleToolButton. Use gtk_toggle_tool_button_new_from_stock()
to
create a new GtkToggleToolButton containing a stock item.
struct GtkToggleToolButton;
The GtkToggleToolButton struct contains only private data and should only be accessed through the functions described below.
GtkToolItem * gtk_toggle_tool_button_new (void
);
Returns a new GtkToggleToolButton
Returns : |
a newly created GtkToggleToolButton |
Since 2.4
GtkToolItem * gtk_toggle_tool_button_new_from_stock
(const gchar *stock_id
);
Creates a new GtkToggleToolButton containing the image and text from a stock item. Some stock ids have preprocessor macros like GTK_STOCK_OK and GTK_STOCK_APPLY.
It is an error if stock_id
is not a name of a stock item.
|
the name of the stock item |
Returns : |
A new GtkToggleToolButton |
Since 2.4
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.
|
a GtkToggleToolButton |
|
whether button should be active |
Since 2.4
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.
|
a GtkToggleToolButton |
Returns : |
TRUE if the toggle tool button is pressed in, FALSE if not |
Since 2.4
"toggled"
signalvoid user_function (GtkToggleToolButton *toggle_tool_button,
gpointer user_data) : Run First
Emitted whenever the toggle tool button changes state.
|
the object that emitted the signal |
|
user data set when the signal handler was connected. |
The toolbar widget The parent class of GtkToggleToolButton. The properties "label_widget", "label", "icon_widget", and "stock_id" on GtkToolButton determine the label and icon used on GtkToggleToolButtons. A subclass of GtkToolItem that separates groups of items on a toolbar. |