gtkbutton.sgml 5.05 KB
Newer Older
Owen Taylor's avatar
Owen Taylor committed
1 2 3 4 5 6 7
<!-- ##### SECTION Title ##### -->
GtkButton

<!-- ##### SECTION Short_Description ##### -->
A widget that creates a signal when clicked on.

<!-- ##### SECTION Long_Description ##### -->
Jonathan Blandford's avatar
Jonathan Blandford committed
8 9 10 11 12 13 14 15 16
<para>
The #GtkButton widget is generally used to attach a function to that
is called when the button is pressed.  The various signals and how to use
them are outlined below.
</para>
<para>
The #GtkButton widget can hold any valid child widget.  That is it can
hold most any other standard #GtkWidget.  The most commonly used child is
the #GtkLabel.
Owen Taylor's avatar
Owen Taylor committed
17 18 19
</para>

<!-- ##### SECTION See_Also ##### -->
Jonathan Blandford's avatar
Jonathan Blandford committed
20 21
<para>

Owen Taylor's avatar
Owen Taylor committed
22 23 24
</para>

<!-- ##### STRUCT GtkButton ##### -->
Jonathan Blandford's avatar
Jonathan Blandford committed
25 26
<para>
This should not be accessed directly.  Use the accessor functions below.
Owen Taylor's avatar
Owen Taylor committed
27 28 29 30
</para>


<!-- ##### FUNCTION gtk_button_new ##### -->
Jonathan Blandford's avatar
Jonathan Blandford committed
31 32
<para>
Creates a new #GtkButton widget.
Owen Taylor's avatar
Owen Taylor committed
33 34 35 36 37 38
</para>

@Returns: The newly created #GtkButton widget.


<!-- ##### FUNCTION gtk_button_new_with_label ##### -->
Jonathan Blandford's avatar
Jonathan Blandford committed
39 40 41
<para>
Creates a #GtkButton widget with a #GtkLabel child containing the given
text.
Owen Taylor's avatar
Owen Taylor committed
42 43 44 45 46 47
</para>

@label: The text you want the #GtkLabel to hold.
@Returns: The newly created #GtkButton widget.


Havoc Pennington's avatar
Havoc Pennington committed
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
<!-- ##### FUNCTION gtk_button_new_with_mnemonic ##### -->
<para>

</para>

@label: 
@Returns: 


<!-- ##### FUNCTION gtk_button_new_from_stock ##### -->
<para>

</para>

@stock_id: 
@Returns: 


Owen Taylor's avatar
Owen Taylor committed
66
<!-- ##### FUNCTION gtk_button_pressed ##### -->
Jonathan Blandford's avatar
Jonathan Blandford committed
67 68
<para>
Emits a #GtkButton::pressed signal to the given #GtkButton.
Owen Taylor's avatar
Owen Taylor committed
69 70 71 72 73 74
</para>

@button: The #GtkButton you want to send the signal to.


<!-- ##### FUNCTION gtk_button_released ##### -->
Jonathan Blandford's avatar
Jonathan Blandford committed
75 76
<para>
Emits a #GtkButton::released signal to the given #GtkButton.
Owen Taylor's avatar
Owen Taylor committed
77 78 79 80 81 82
</para>

@button: The #GtkButton you want to send the signal to.


<!-- ##### FUNCTION gtk_button_clicked ##### -->
Jonathan Blandford's avatar
Jonathan Blandford committed
83 84
<para>
Emits a #GtkButton::clicked signal to the given #GtkButton.
Owen Taylor's avatar
Owen Taylor committed
85 86 87 88 89 90
</para>

@button: The #GtkButton you want to send the signal to.


<!-- ##### FUNCTION gtk_button_enter ##### -->
Jonathan Blandford's avatar
Jonathan Blandford committed
91 92
<para>
Emits a #GtkButton::enter signal to the given #GtkButton.
Owen Taylor's avatar
Owen Taylor committed
93 94 95 96 97 98
</para>

@button: The #GtkButton you want to send the signal to.


<!-- ##### FUNCTION gtk_button_leave ##### -->
Jonathan Blandford's avatar
Jonathan Blandford committed
99 100
<para>
Emits a #GtkButton::leave signal to the given #GtkButton.
Owen Taylor's avatar
Owen Taylor committed
101 102 103 104 105 106
</para>

@button: The #GtkButton you want to send the signal to.


<!-- ##### FUNCTION gtk_button_set_relief ##### -->
Jonathan Blandford's avatar
Jonathan Blandford committed
107 108 109 110 111 112
<para>
Sets the relief style of the edges of the given #GtkButton widget.
Three styles exist, GTK_RELIEF_NORMAL, GTK_RELIEF_HALF, GTK_RELIEF_NONE.
The default style is, as one can guess, GTK_RELIEF_NORMAL.

<!-- FIXME: put pictures of each style -->
Owen Taylor's avatar
Owen Taylor committed
113 114 115 116 117 118 119
</para>

@button: The #GtkButton you want to set relief styles of.
@newstyle: The GtkReliefStyle as described above.


<!-- ##### FUNCTION gtk_button_get_relief ##### -->
Jonathan Blandford's avatar
Jonathan Blandford committed
120 121
<para>
Returns the current relief style of the given #GtkButton.
Owen Taylor's avatar
Owen Taylor committed
122 123 124 125 126 127
</para>

@button: The #GtkButton you want the #GtkReliefStyle from.
@Returns: The current #GtkReliefStyle


128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160
<!-- ##### FUNCTION gtk_button_get_label ##### -->
<para>

</para>

@button: 
@Returns: 


<!-- ##### FUNCTION gtk_button_set_label ##### -->
<para>

</para>

@button: 
@label: 


<!-- ##### FUNCTION gtk_button_get_use_stock ##### -->
<para>

</para>

@button: 
@Returns: 


<!-- ##### FUNCTION gtk_button_set_use_stock ##### -->
<para>

</para>

@button: 
161 162
@use_stock: 
<!-- # Unused Parameters # -->
163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180
@value: 


<!-- ##### FUNCTION gtk_button_get_use_underline ##### -->
<para>

</para>

@button: 
@Returns: 


<!-- ##### FUNCTION gtk_button_set_use_underline ##### -->
<para>

</para>

@button: 
181 182
@use_underline: 
<!-- # Unused Parameters # -->
183 184 185
@value: 


Tim Janik's avatar
Tim Janik committed
186 187 188 189 190 191 192
<!-- ##### SIGNAL GtkButton::activate ##### -->
<para>

</para>

@button: the object which received the signal.

193
<!-- ##### SIGNAL GtkButton::clicked ##### -->
Jonathan Blandford's avatar
Jonathan Blandford committed
194 195 196 197
<para>
Emitted when a button clicked on by the mouse and the cursor stays on the
button.  If the cursor is not on the button when the mouse button is released,
the signal is not emitted.
Owen Taylor's avatar
Owen Taylor committed
198 199 200 201
</para>

@button: the object which received the signal.

202
<!-- ##### SIGNAL GtkButton::enter ##### -->
Jonathan Blandford's avatar
Jonathan Blandford committed
203 204
<para>
Emitted when the mouse cursor enters the region of the button.
Owen Taylor's avatar
Owen Taylor committed
205 206 207 208
</para>

@button: the object which received the signal.

209
<!-- ##### SIGNAL GtkButton::leave ##### -->
Jonathan Blandford's avatar
Jonathan Blandford committed
210 211
<para>
Emitted when the mouse cursor leaves the region of the button.
Owen Taylor's avatar
Owen Taylor committed
212 213 214 215
</para>

@button: the object which received the signal.

216
<!-- ##### SIGNAL GtkButton::pressed ##### -->
Jonathan Blandford's avatar
Jonathan Blandford committed
217 218
<para>
Emitted when the button is initially pressed.
Owen Taylor's avatar
Owen Taylor committed
219 220 221 222
</para>

@button: the object which received the signal.

223
<!-- ##### SIGNAL GtkButton::released ##### -->
Jonathan Blandford's avatar
Jonathan Blandford committed
224 225 226
<para>
Emitted when a button which is pressed is released, no matter where the
mouse cursor is.
Owen Taylor's avatar
Owen Taylor committed
227 228 229 230 231
</para>

@button: the object which received the signal.

<!-- ##### ARG GtkButton:label ##### -->
Matthias Clasen's avatar
Matthias Clasen committed
232 233
<para>

Owen Taylor's avatar
Owen Taylor committed
234 235 236
</para>

<!-- ##### ARG GtkButton:relief ##### -->
Matthias Clasen's avatar
Matthias Clasen committed
237 238
<para>

Owen Taylor's avatar
Owen Taylor committed
239 240
</para>

Havoc Pennington's avatar
Havoc Pennington committed
241 242 243 244 245 246 247 248 249 250
<!-- ##### ARG GtkButton:use-underline ##### -->
<para>

</para>

<!-- ##### ARG GtkButton:use-stock ##### -->
<para>

</para>

Soeren Sandmann's avatar
Soeren Sandmann committed
251
<!-- ##### ARG GtkButton:default-border ##### -->
252 253 254 255
<para>

</para>

Soeren Sandmann's avatar
Soeren Sandmann committed
256
<!-- ##### ARG GtkButton:child-displacement-y ##### -->
257 258 259 260
<para>

</para>

Soeren Sandmann's avatar
Soeren Sandmann committed
261
<!-- ##### ARG GtkButton:child-displacement-x ##### -->
262 263 264 265
<para>

</para>

Soren Sandmann's avatar
Soren Sandmann committed
266
<!-- ##### ARG GtkButton:default-outside-border ##### -->
267 268 269 270
<para>

</para>