gtk2/docs/reference/gtk/tmpl/gtkbutton.sgml
Owen Taylor 11aed263b7 Set the width of the layout to the actual wrap width (our requisition) not
Tue May 14 16:44:09 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtklabel.c (gtk_label_ensure_layout): Set
        the width of the layout to the actual wrap width
        (our requisition) not the width we set when calculating
        the width. This results in the lines being justified
        within the correct area. (#79157, Anders Carlsson)

        * gtk/gtkaccelgroup.c gtk/gtkmarshelers.list: Corrected
        registered parameter types of "accel_activate" and
        "accel_changed" signals. (Patch from Murray Cumming, #78798)

        * gtk/gtkrc.c (gtk_rc_make_default_dir): Switch
        binary-version and type to correspond to the
        current ordering in _gtk_get_module_path.
        (#78746, Sergey Kuzminov)

        * gtk/gtkrc.c (gtk_rc_get_module_dir): Add docs
        pointing to the GTK_PATH documentation.

        * gtk/Makefile.am (uninstall-local): Delete
        key themes as well. (#81286, Kristian Rietveld.)
2002-05-14 20:55:22 +00:00

272 lines
5.3 KiB
Plaintext

<!-- ##### SECTION Title ##### -->
GtkButton
<!-- ##### SECTION Short_Description ##### -->
A widget that creates a signal when clicked on.
<!-- ##### SECTION Long_Description ##### -->
<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.
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
<!-- ##### STRUCT GtkButton ##### -->
<para>
This should not be accessed directly. Use the accessor functions below.
</para>
<!-- ##### FUNCTION gtk_button_new ##### -->
<para>
Creates a new #GtkButton widget.
</para>
@Returns: The newly created #GtkButton widget.
<!-- ##### FUNCTION gtk_button_new_with_label ##### -->
<para>
Creates a #GtkButton widget with a #GtkLabel child containing the given
text.
</para>
@label: The text you want the #GtkLabel to hold.
@Returns: The newly created #GtkButton widget.
<!-- ##### FUNCTION gtk_button_new_with_mnemonic ##### -->
<para>
</para>
@label:
@Returns:
<!-- ##### FUNCTION gtk_button_new_from_stock ##### -->
<para>
</para>
@stock_id:
@Returns:
<!-- ##### FUNCTION gtk_button_pressed ##### -->
<para>
Emits a #GtkButton::pressed signal to the given #GtkButton.
</para>
@button: The #GtkButton you want to send the signal to.
<!-- ##### FUNCTION gtk_button_released ##### -->
<para>
Emits a #GtkButton::released signal to the given #GtkButton.
</para>
@button: The #GtkButton you want to send the signal to.
<!-- ##### FUNCTION gtk_button_clicked ##### -->
<para>
Emits a #GtkButton::clicked signal to the given #GtkButton.
</para>
@button: The #GtkButton you want to send the signal to.
<!-- ##### FUNCTION gtk_button_enter ##### -->
<para>
Emits a #GtkButton::enter signal to the given #GtkButton.
</para>
@button: The #GtkButton you want to send the signal to.
<!-- ##### FUNCTION gtk_button_leave ##### -->
<para>
Emits a #GtkButton::leave signal to the given #GtkButton.
</para>
@button: The #GtkButton you want to send the signal to.
<!-- ##### FUNCTION gtk_button_set_relief ##### -->
<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 -->
</para>
@button: The #GtkButton you want to set relief styles of.
@newstyle: The GtkReliefStyle as described above.
<!-- ##### FUNCTION gtk_button_get_relief ##### -->
<para>
Returns the current relief style of the given #GtkButton.
</para>
@button: The #GtkButton you want the #GtkReliefStyle from.
@Returns: The current #GtkReliefStyle
<!-- ##### 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:
@use_stock:
<!-- # Unused Parameters # -->
@value:
<!-- ##### FUNCTION gtk_button_get_use_underline ##### -->
<para>
</para>
@button:
@Returns:
<!-- ##### FUNCTION gtk_button_set_use_underline ##### -->
<para>
</para>
@button:
@use_underline:
<!-- # Unused Parameters # -->
@value:
<!-- ##### SIGNAL GtkButton::activate ##### -->
<para>
</para>
@button: the object which received the signal.
<!-- ##### SIGNAL GtkButton::clicked ##### -->
<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.
</para>
@button: the object which received the signal.
<!-- ##### SIGNAL GtkButton::enter ##### -->
<para>
Emitted when the mouse cursor enters the region of the button.
</para>
@button: the object which received the signal.
<!-- ##### SIGNAL GtkButton::leave ##### -->
<para>
Emitted when the mouse cursor leaves the region of the button.
</para>
@button: the object which received the signal.
<!-- ##### SIGNAL GtkButton::pressed ##### -->
<para>
Emitted when the button is initially pressed.
</para>
@button: the object which received the signal.
<!-- ##### SIGNAL GtkButton::released ##### -->
<para>
Emitted when a button which is pressed is released, no matter where the
mouse cursor is.
</para>
@button: the object which received the signal.
<!-- ##### ARG GtkButton:label ##### -->
<para>
The text within the child #GtkLabel of the #GtkButton. Only useful if
there is actually a #GtkLabel inside of the #GtkButton.
</para>
<!-- ##### ARG GtkButton:relief ##### -->
<para>
The #GtkReliefStyle as outlined in gtk_button_set_relief().
</para>
<!-- ##### ARG GtkButton:use-underline ##### -->
<para>
</para>
<!-- ##### ARG GtkButton:use-stock ##### -->
<para>
</para>
<!-- ##### ARG GtkButton:default-border ##### -->
<para>
</para>
<!-- ##### ARG GtkButton:default-outside-border ##### -->
<para>
</para>
<!-- ##### ARG GtkButton:child-displacement-y ##### -->
<para>
</para>
<!-- ##### ARG GtkButton:child-displacement-x ##### -->
<para>
</para>