Top |
StWidget * | st_button_new () |
StWidget * | st_button_new_with_label () |
const gchar * | st_button_get_label () |
void | st_button_set_label () |
void | st_button_set_toggle_mode () |
gboolean | st_button_get_toggle_mode () |
void | st_button_set_checked () |
gboolean | st_button_get_checked () |
void | st_button_fake_release () |
void | st_button_set_button_mask () |
StButtonMask | st_button_get_button_mask () |
StButtonMask | button-mask | Read / Write |
gboolean | checked | Read / Write |
char * | label | Read / Write |
gboolean | pressed | Read |
gboolean | toggle-mode | Read / Write |
GFlags ╰── StButtonMask GObject ╰── GInitiallyUnowned ╰── ClutterActor ╰── StWidget ╰── StBin ╰── StButton
StButton implements ClutterContainer, ClutterScriptable, ClutterAnimatable and AtkImplementorIface.
A button widget with support for either a text label or icon, toggle mode and transitions effects between states.
StWidget *
st_button_new_with_label (const gchar *text
);
Create a new StButton with the specified label
const gchar *
st_button_get_label (StButton *button
);
Get the text displayed on the button
void st_button_set_label (StButton *button
,const gchar *text
);
Sets the text displayed on the button
void st_button_set_toggle_mode (StButton *button
,gboolean toggle
);
Enables or disables toggle mode for the button. In toggle mode, the active state will be "toggled" when the user clicks the button.
gboolean
st_button_get_toggle_mode (StButton *button
);
Get the toggle mode status of the button.
void st_button_set_checked (StButton *button
,gboolean checked
);
Sets the pressed state of the button. This is only really useful if the
button has toggle-mode mode set to TRUE
.
gboolean
st_button_get_checked (StButton *button
);
Get the state of the button that is in toggle mode.
void
st_button_fake_release (StButton *button
);
If this widget is holding a pointer grab, this function will will ungrab it, and reset the pressed state. The effect is similar to if the user had released the mouse button, but without emitting the clicked signal.
This function is useful if for example you want to do something after the user is holding the mouse button for a given period of time, breaking the grab.
void st_button_set_button_mask (StButton *button
,StButtonMask mask
);
Sets which mouse buttons button
emits “clicked” for.
StButtonMask
st_button_get_button_mask (StButton *button
);
Gets the mask of mouse buttons that button
emits the
“clicked” signal for.
struct StButton;
The contents of this structure is private and should only be accessed using the provided API.
“button-mask”
property“button-mask” StButtonMask
Which buttons trigger the 'clicked' signal.
Owner: StButton
Flags: Read / Write
Default value: ST_BUTTON_ONE
“checked”
property “checked” gboolean
Indicates if a toggle button is "on" or "off".
Owner: StButton
Flags: Read / Write
Default value: FALSE
“label”
property “label” char *
Label of the button.
Owner: StButton
Flags: Read / Write
Default value: NULL
“pressed”
property “pressed” gboolean
Indicates if the button is pressed in.
Owner: StButton
Flags: Read
Default value: FALSE
“clicked”
signalvoid user_function (StButton *button, int clicked_button, gpointer user_data)
Emitted when the user activates the button, either with a mouse press and release or with the keyboard.
button |
the object that received the signal |
|
clicked_button |
the mouse button that was used |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last