1999-08-16 18:51:52 +00:00
|
|
|
<!-- ##### SECTION Title ##### -->
|
|
|
|
GtkButton
|
|
|
|
|
|
|
|
<!-- ##### SECTION Short_Description ##### -->
|
2004-10-11 18:08:35 +00:00
|
|
|
A widget that creates a signal when clicked on
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
<!-- ##### SECTION Long_Description ##### -->
|
2002-06-08 06:48:27 +00:00
|
|
|
<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.
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
|
|
|
<!-- ##### SECTION See_Also ##### -->
|
2002-06-08 06:48:27 +00:00
|
|
|
<para>
|
|
|
|
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
2005-06-20 22:06:27 +00:00
|
|
|
<!-- ##### SECTION Stability_Level ##### -->
|
|
|
|
|
|
|
|
|
2010-05-08 05:18:53 +00:00
|
|
|
<!-- ##### SECTION Image ##### -->
|
|
|
|
|
|
|
|
|
1999-08-16 18:51:52 +00:00
|
|
|
<!-- ##### STRUCT GtkButton ##### -->
|
2002-06-08 06:48:27 +00:00
|
|
|
<para>
|
|
|
|
This should not be accessed directly. Use the accessor functions below.
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
|
|
|
|
2004-07-20 02:26:06 +00:00
|
|
|
<!-- ##### SIGNAL GtkButton::activate ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@button: the object which received the signal.
|
|
|
|
|
|
|
|
<!-- ##### SIGNAL GtkButton::clicked ##### -->
|
|
|
|
<para>
|
2005-12-19 20:19:19 +00:00
|
|
|
|
2004-07-20 02:26:06 +00:00
|
|
|
</para>
|
|
|
|
|
2005-12-19 20:19:19 +00:00
|
|
|
@button:
|
2004-07-20 02:26:06 +00:00
|
|
|
|
|
|
|
<!-- ##### SIGNAL GtkButton::enter ##### -->
|
|
|
|
<para>
|
2005-12-19 20:19:19 +00:00
|
|
|
|
2004-07-20 02:26:06 +00:00
|
|
|
</para>
|
|
|
|
|
2005-12-19 20:19:19 +00:00
|
|
|
@button:
|
2004-07-20 02:26:06 +00:00
|
|
|
|
|
|
|
<!-- ##### SIGNAL GtkButton::leave ##### -->
|
|
|
|
<para>
|
2005-12-19 20:19:19 +00:00
|
|
|
|
2004-07-20 02:26:06 +00:00
|
|
|
</para>
|
|
|
|
|
2005-12-19 20:19:19 +00:00
|
|
|
@button:
|
2004-07-20 02:26:06 +00:00
|
|
|
|
|
|
|
<!-- ##### SIGNAL GtkButton::pressed ##### -->
|
|
|
|
<para>
|
2005-12-19 20:19:19 +00:00
|
|
|
|
2004-07-20 02:26:06 +00:00
|
|
|
</para>
|
|
|
|
|
2005-12-19 20:19:19 +00:00
|
|
|
@button:
|
2004-07-20 02:26:06 +00:00
|
|
|
|
|
|
|
<!-- ##### SIGNAL GtkButton::released ##### -->
|
|
|
|
<para>
|
2005-12-19 20:19:19 +00:00
|
|
|
|
2004-07-20 02:26:06 +00:00
|
|
|
</para>
|
|
|
|
|
2006-05-05 16:21:19 +00:00
|
|
|
@button:
|
2004-07-20 02:26:06 +00:00
|
|
|
|
|
|
|
<!-- ##### ARG GtkButton:focus-on-click ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
2004-12-16 18:21:44 +00:00
|
|
|
<!-- ##### ARG GtkButton:image ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
2006-06-05 19:33:40 +00:00
|
|
|
<!-- ##### ARG GtkButton:image-position ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
2004-07-20 02:26:06 +00:00
|
|
|
<!-- ##### ARG GtkButton:label ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<!-- ##### ARG GtkButton:relief ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<!-- ##### ARG GtkButton:use-stock ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<!-- ##### ARG GtkButton:use-underline ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<!-- ##### ARG GtkButton:xalign ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<!-- ##### ARG GtkButton:yalign ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<!-- ##### ARG GtkButton:child-displacement-x ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<!-- ##### ARG GtkButton:child-displacement-y ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<!-- ##### ARG GtkButton:default-border ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<!-- ##### ARG GtkButton:default-outside-border ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
2004-09-26 06:14:55 +00:00
|
|
|
<!-- ##### ARG GtkButton:displace-focus ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
2006-06-05 19:33:40 +00:00
|
|
|
<!-- ##### ARG GtkButton:image-spacing ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
2006-05-05 16:21:19 +00:00
|
|
|
<!-- ##### ARG GtkButton:inner-border ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
1999-08-16 18:51:52 +00:00
|
|
|
<!-- ##### FUNCTION gtk_button_new ##### -->
|
2002-06-08 06:48:27 +00:00
|
|
|
<para>
|
Documentation fixes.
Sun Oct 13 18:50:14 2002 Soeren Sandmann <sandmann@daimi.au.dk>
* gtkmenu.c, gtkmenu.sgml, gtkitemfactory.c, gdkwindow.c,
gtkwindow.c, gtkpaned.sgml, gtkdialog.c, gtkbox.h, gtkbutton.sgml,
gtktreemodel.sgml,gtktable.sgml, gtktable.c:
Documentation fixes.
#85719, #90759, #95169, Owen Taylor;
#89221, Yao Zhang, Matthias Clasen;
#95592, Joost Faassen;
#92637, Vitaly Tishkov;
#94616, Ben Martin;
#94772, sbaillie@bigpond.net.au;
2002-10-13 17:17:14 +00:00
|
|
|
Creates a new #GtkButton widget. To add a child widget to the button,
|
|
|
|
use gtk_container_add().
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
2010-05-08 05:18:53 +00:00
|
|
|
@void:
|
1999-08-16 18:51:52 +00:00
|
|
|
@Returns: The newly created #GtkButton widget.
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_button_new_with_label ##### -->
|
2002-06-08 06:48:27 +00:00
|
|
|
<para>
|
|
|
|
Creates a #GtkButton widget with a #GtkLabel child containing the given
|
|
|
|
text.
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
|
|
|
@label: The text you want the #GtkLabel to hold.
|
|
|
|
@Returns: The newly created #GtkButton widget.
|
|
|
|
|
|
|
|
|
2001-03-23 22:21:06 +00:00
|
|
|
<!-- ##### FUNCTION gtk_button_new_with_mnemonic ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@label:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_button_new_from_stock ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@stock_id:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
1999-08-16 18:51:52 +00:00
|
|
|
<!-- ##### FUNCTION gtk_button_pressed ##### -->
|
2002-06-08 06:48:27 +00:00
|
|
|
<para>
|
|
|
|
Emits a #GtkButton::pressed signal to the given #GtkButton.
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
|
|
|
@button: The #GtkButton you want to send the signal to.
|
2009-10-27 21:39:30 +00:00
|
|
|
@Deprecated: 2.20: Use the #GtkWidget::button-press-event signal.
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_button_released ##### -->
|
2002-06-08 06:48:27 +00:00
|
|
|
<para>
|
|
|
|
Emits a #GtkButton::released signal to the given #GtkButton.
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
|
|
|
@button: The #GtkButton you want to send the signal to.
|
2009-10-27 21:39:30 +00:00
|
|
|
@Deprecated: 2.20: Use the #GtkWidget::button-release-event signal.
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_button_clicked ##### -->
|
2002-06-08 06:48:27 +00:00
|
|
|
<para>
|
|
|
|
Emits a #GtkButton::clicked signal to the given #GtkButton.
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
|
|
|
@button: The #GtkButton you want to send the signal to.
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_button_enter ##### -->
|
2002-06-08 06:48:27 +00:00
|
|
|
<para>
|
|
|
|
Emits a #GtkButton::enter signal to the given #GtkButton.
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
|
|
|
@button: The #GtkButton you want to send the signal to.
|
2009-10-27 21:39:30 +00:00
|
|
|
@Deprecated: 2.20: Use the #GtkWidget::enter-notify-event signal.
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_button_leave ##### -->
|
2002-06-08 06:48:27 +00:00
|
|
|
<para>
|
|
|
|
Emits a #GtkButton::leave signal to the given #GtkButton.
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
|
|
|
@button: The #GtkButton you want to send the signal to.
|
2009-10-27 21:39:30 +00:00
|
|
|
@Deprecated: 2.20: Use the #GtkWidget::leave-notify-event signal.
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_button_set_relief ##### -->
|
2002-06-08 06:48:27 +00:00
|
|
|
<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 -->
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
|
|
|
@button: The #GtkButton you want to set relief styles of.
|
|
|
|
@newstyle: The GtkReliefStyle as described above.
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_button_get_relief ##### -->
|
2002-06-08 06:48:27 +00:00
|
|
|
<para>
|
|
|
|
Returns the current relief style of the given #GtkButton.
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
|
|
|
@button: The #GtkButton you want the #GtkReliefStyle from.
|
|
|
|
@Returns: The current #GtkReliefStyle
|
|
|
|
|
|
|
|
|
2001-10-13 05:52:14 +00:00
|
|
|
<!-- ##### 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:
|
2001-10-26 15:44:20 +00:00
|
|
|
@use_stock:
|
2001-10-13 05:52:14 +00:00
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_button_get_use_underline ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@button:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_button_set_use_underline ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@button:
|
2001-10-26 15:44:20 +00:00
|
|
|
@use_underline:
|
2001-10-13 05:52:14 +00:00
|
|
|
|
|
|
|
|
2003-07-02 22:45:30 +00:00
|
|
|
<!-- ##### FUNCTION gtk_button_set_focus_on_click ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@button:
|
|
|
|
@focus_on_click:
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_button_get_focus_on_click ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@button:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
2004-01-22 06:48:20 +00:00
|
|
|
<!-- ##### FUNCTION gtk_button_set_alignment ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@button:
|
|
|
|
@xalign:
|
|
|
|
@yalign:
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_button_get_alignment ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@button:
|
|
|
|
@xalign:
|
|
|
|
@yalign:
|
|
|
|
|
|
|
|
|
2005-06-20 22:06:27 +00:00
|
|
|
<!-- ##### FUNCTION gtk_button_set_image ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@button:
|
|
|
|
@image:
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_button_get_image ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@button:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
2006-06-05 19:33:40 +00:00
|
|
|
<!-- ##### FUNCTION gtk_button_set_image_position ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@button:
|
|
|
|
@position:
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_button_get_image_position ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@button:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|