1 <!-- ##### SECTION Title ##### -->
4 <!-- ##### SECTION Short_Description ##### -->
5 A widget that creates a signal when clicked on
7 <!-- ##### SECTION Long_Description ##### -->
9 The #GtkButton widget is generally used to attach a function to that
10 is called when the button is pressed. The various signals and how to use
11 them are outlined below.
14 The #GtkButton widget can hold any valid child widget. That is it can
15 hold most any other standard #GtkWidget. The most commonly used child is
19 <!-- ##### SECTION See_Also ##### -->
24 <!-- ##### SECTION Stability_Level ##### -->
27 <!-- ##### STRUCT GtkButton ##### -->
29 This should not be accessed directly. Use the accessor functions below.
33 <!-- ##### SIGNAL GtkButton::activate ##### -->
38 @button: the object which received the signal.
40 <!-- ##### SIGNAL GtkButton::clicked ##### -->
42 Emitted when a button clicked on by the mouse and the cursor stays on the
43 button. If the cursor is not on the button when the mouse button is released,
44 the signal is not emitted.
47 @button: the object which received the signal.
49 <!-- ##### SIGNAL GtkButton::enter ##### -->
51 Emitted when the mouse cursor enters the region of the button.
54 @button: the object which received the signal.
56 <!-- ##### SIGNAL GtkButton::leave ##### -->
58 Emitted when the mouse cursor leaves the region of the button.
61 @button: the object which received the signal.
63 <!-- ##### SIGNAL GtkButton::pressed ##### -->
65 Emitted when the button is initially pressed.
68 @button: the object which received the signal.
70 <!-- ##### SIGNAL GtkButton::released ##### -->
72 Emitted when a button which is pressed is released, no matter where the
76 @button: the object which received the signal.
78 <!-- ##### ARG GtkButton:focus-on-click ##### -->
83 <!-- ##### ARG GtkButton:image ##### -->
88 <!-- ##### ARG GtkButton:label ##### -->
93 <!-- ##### ARG GtkButton:relief ##### -->
98 <!-- ##### ARG GtkButton:use-stock ##### -->
103 <!-- ##### ARG GtkButton:use-underline ##### -->
108 <!-- ##### ARG GtkButton:xalign ##### -->
113 <!-- ##### ARG GtkButton:yalign ##### -->
118 <!-- ##### ARG GtkButton:child-displacement-x ##### -->
123 <!-- ##### ARG GtkButton:child-displacement-y ##### -->
128 <!-- ##### ARG GtkButton:default-border ##### -->
133 <!-- ##### ARG GtkButton:default-outside-border ##### -->
138 <!-- ##### ARG GtkButton:displace-focus ##### -->
143 <!-- ##### FUNCTION gtk_button_new ##### -->
145 Creates a new #GtkButton widget. To add a child widget to the button,
146 use gtk_container_add().
149 @Returns: The newly created #GtkButton widget.
152 <!-- ##### FUNCTION gtk_button_new_with_label ##### -->
154 Creates a #GtkButton widget with a #GtkLabel child containing the given
158 @label: The text you want the #GtkLabel to hold.
159 @Returns: The newly created #GtkButton widget.
162 <!-- ##### FUNCTION gtk_button_new_with_mnemonic ##### -->
171 <!-- ##### FUNCTION gtk_button_new_from_stock ##### -->
180 <!-- ##### FUNCTION gtk_button_pressed ##### -->
182 Emits a #GtkButton::pressed signal to the given #GtkButton.
185 @button: The #GtkButton you want to send the signal to.
188 <!-- ##### FUNCTION gtk_button_released ##### -->
190 Emits a #GtkButton::released signal to the given #GtkButton.
193 @button: The #GtkButton you want to send the signal to.
196 <!-- ##### FUNCTION gtk_button_clicked ##### -->
198 Emits a #GtkButton::clicked signal to the given #GtkButton.
201 @button: The #GtkButton you want to send the signal to.
204 <!-- ##### FUNCTION gtk_button_enter ##### -->
206 Emits a #GtkButton::enter signal to the given #GtkButton.
209 @button: The #GtkButton you want to send the signal to.
212 <!-- ##### FUNCTION gtk_button_leave ##### -->
214 Emits a #GtkButton::leave signal to the given #GtkButton.
217 @button: The #GtkButton you want to send the signal to.
220 <!-- ##### FUNCTION gtk_button_set_relief ##### -->
222 Sets the relief style of the edges of the given #GtkButton widget.
223 Three styles exist, GTK_RELIEF_NORMAL, GTK_RELIEF_HALF, GTK_RELIEF_NONE.
224 The default style is, as one can guess, GTK_RELIEF_NORMAL.
226 <!-- FIXME: put pictures of each style -->
229 @button: The #GtkButton you want to set relief styles of.
230 @newstyle: The GtkReliefStyle as described above.
233 <!-- ##### FUNCTION gtk_button_get_relief ##### -->
235 Returns the current relief style of the given #GtkButton.
238 @button: The #GtkButton you want the #GtkReliefStyle from.
239 @Returns: The current #GtkReliefStyle
242 <!-- ##### FUNCTION gtk_button_get_label ##### -->
251 <!-- ##### FUNCTION gtk_button_set_label ##### -->
260 <!-- ##### FUNCTION gtk_button_get_use_stock ##### -->
269 <!-- ##### FUNCTION gtk_button_set_use_stock ##### -->
276 <!-- # Unused Parameters # -->
280 <!-- ##### FUNCTION gtk_button_get_use_underline ##### -->
289 <!-- ##### FUNCTION gtk_button_set_use_underline ##### -->
296 <!-- # Unused Parameters # -->
300 <!-- ##### FUNCTION gtk_button_set_focus_on_click ##### -->
309 <!-- ##### FUNCTION gtk_button_get_focus_on_click ##### -->
318 <!-- ##### FUNCTION gtk_button_set_alignment ##### -->
328 <!-- ##### FUNCTION gtk_button_get_alignment ##### -->
338 <!-- ##### FUNCTION gtk_button_set_image ##### -->
347 <!-- ##### FUNCTION gtk_button_get_image ##### -->