1892 lines
95 KiB
HTML
1892 lines
95 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||
<html>
|
||
<head>
|
||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||
<title>GtkButton: GTK+ 3 Reference Manual</title>
|
||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
|
||
<link rel="home" href="index.html" title="GTK+ 3 Reference Manual">
|
||
<link rel="up" href="ButtonWidgets.html" title="Buttons and Toggles">
|
||
<link rel="prev" href="ButtonWidgets.html" title="Buttons and Toggles">
|
||
<link rel="next" href="GtkCheckButton.html" title="GtkCheckButton">
|
||
<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)">
|
||
<link rel="stylesheet" href="style.css" type="text/css">
|
||
</head>
|
||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
|
||
<td width="100%" align="left" class="shortcuts">
|
||
<a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span>
|
||
<a href="#GtkButton.description" class="shortcut">Description</a></span><span id="nav_hierarchy"> <span class="dim">|</span>
|
||
<a href="#GtkButton.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_interfaces"> <span class="dim">|</span>
|
||
<a href="#GtkButton.implemented-interfaces" class="shortcut">Implemented Interfaces</a></span><span id="nav_properties"> <span class="dim">|</span>
|
||
<a href="#GtkButton.properties" class="shortcut">Properties</a></span><span id="nav_style_properties"> <span class="dim">|</span>
|
||
<a href="#GtkButton.style-properties" class="shortcut">Style Properties</a></span><span id="nav_signals"> <span class="dim">|</span>
|
||
<a href="#GtkButton.signals" class="shortcut">Signals</a></span>
|
||
</td>
|
||
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
|
||
<td><a accesskey="u" href="ButtonWidgets.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
|
||
<td><a accesskey="p" href="ButtonWidgets.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
|
||
<td><a accesskey="n" href="GtkCheckButton.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
|
||
</tr></table>
|
||
<div class="refentry">
|
||
<a name="GtkButton"></a><div class="titlepage"></div>
|
||
<div class="refnamediv"><table width="100%"><tr>
|
||
<td valign="top">
|
||
<h2><span class="refentrytitle"><a name="GtkButton.top_of_page"></a>GtkButton</span></h2>
|
||
<p>GtkButton — A widget that emits a signal when clicked on</p>
|
||
</td>
|
||
<td class="gallery_image" valign="top" align="right"><img src="button.png"></td>
|
||
</tr></table></div>
|
||
<div class="refsect1">
|
||
<a name="GtkButton.functions"></a><h2>Functions</h2>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="functions_proto_type">
|
||
<col class="functions_proto_name">
|
||
</colgroup>
|
||
<tbody>
|
||
<tr>
|
||
<td class="function_type">
|
||
<a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GtkButton.html#gtk-button-new" title="gtk_button_new ()">gtk_button_new</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GtkButton.html#gtk-button-new-with-label" title="gtk_button_new_with_label ()">gtk_button_new_with_label</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GtkButton.html#gtk-button-new-with-mnemonic" title="gtk_button_new_with_mnemonic ()">gtk_button_new_with_mnemonic</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GtkButton.html#gtk-button-new-from-icon-name" title="gtk_button_new_from_icon_name ()">gtk_button_new_from_icon_name</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GtkButton.html#gtk-button-new-from-stock" title="gtk_button_new_from_stock ()">gtk_button_new_from_stock</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<span class="returnvalue">void</span>
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GtkButton.html#gtk-button-pressed" title="gtk_button_pressed ()">gtk_button_pressed</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<span class="returnvalue">void</span>
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GtkButton.html#gtk-button-released" title="gtk_button_released ()">gtk_button_released</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<span class="returnvalue">void</span>
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GtkButton.html#gtk-button-clicked" title="gtk_button_clicked ()">gtk_button_clicked</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<span class="returnvalue">void</span>
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GtkButton.html#gtk-button-enter" title="gtk_button_enter ()">gtk_button_enter</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<span class="returnvalue">void</span>
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GtkButton.html#gtk-button-leave" title="gtk_button_leave ()">gtk_button_leave</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<span class="returnvalue">void</span>
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GtkButton.html#gtk-button-set-relief" title="gtk_button_set_relief ()">gtk_button_set_relief</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<a class="link" href="gtk3-Standard-Enumerations.html#GtkReliefStyle" title="enum GtkReliefStyle"><span class="returnvalue">GtkReliefStyle</span></a>
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GtkButton.html#gtk-button-get-relief" title="gtk_button_get_relief ()">gtk_button_get_relief</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">const <span class="returnvalue">gchar</span> *
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GtkButton.html#gtk-button-get-label" title="gtk_button_get_label ()">gtk_button_get_label</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<span class="returnvalue">void</span>
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GtkButton.html#gtk-button-set-label" title="gtk_button_set_label ()">gtk_button_set_label</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<span class="returnvalue">gboolean</span>
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GtkButton.html#gtk-button-get-use-stock" title="gtk_button_get_use_stock ()">gtk_button_get_use_stock</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<span class="returnvalue">void</span>
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GtkButton.html#gtk-button-set-use-stock" title="gtk_button_set_use_stock ()">gtk_button_set_use_stock</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<span class="returnvalue">gboolean</span>
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GtkButton.html#gtk-button-get-use-underline" title="gtk_button_get_use_underline ()">gtk_button_get_use_underline</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<span class="returnvalue">void</span>
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GtkButton.html#gtk-button-set-use-underline" title="gtk_button_set_use_underline ()">gtk_button_set_use_underline</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<span class="returnvalue">void</span>
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GtkButton.html#gtk-button-set-focus-on-click" title="gtk_button_set_focus_on_click ()">gtk_button_set_focus_on_click</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<span class="returnvalue">gboolean</span>
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GtkButton.html#gtk-button-get-focus-on-click" title="gtk_button_get_focus_on_click ()">gtk_button_get_focus_on_click</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<span class="returnvalue">void</span>
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GtkButton.html#gtk-button-set-alignment" title="gtk_button_set_alignment ()">gtk_button_set_alignment</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<span class="returnvalue">void</span>
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GtkButton.html#gtk-button-get-alignment" title="gtk_button_get_alignment ()">gtk_button_get_alignment</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<span class="returnvalue">void</span>
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GtkButton.html#gtk-button-set-image" title="gtk_button_set_image ()">gtk_button_set_image</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GtkButton.html#gtk-button-get-image" title="gtk_button_get_image ()">gtk_button_get_image</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<span class="returnvalue">void</span>
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GtkButton.html#gtk-button-set-image-position" title="gtk_button_set_image_position ()">gtk_button_set_image_position</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<a class="link" href="gtk3-Standard-Enumerations.html#GtkPositionType" title="enum GtkPositionType"><span class="returnvalue">GtkPositionType</span></a>
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GtkButton.html#gtk-button-get-image-position" title="gtk_button_get_image_position ()">gtk_button_get_image_position</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<span class="returnvalue">void</span>
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GtkButton.html#gtk-button-set-always-show-image" title="gtk_button_set_always_show_image ()">gtk_button_set_always_show_image</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<span class="returnvalue">gboolean</span>
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GtkButton.html#gtk-button-get-always-show-image" title="gtk_button_get_always_show_image ()">gtk_button_get_always_show_image</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<span class="returnvalue">GdkWindow</span> *
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GtkButton.html#gtk-button-get-event-window" title="gtk_button_get_event_window ()">gtk_button_get_event_window</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
<div class="refsect1">
|
||
<a name="GtkButton.properties"></a><h2>Properties</h2>
|
||
<div class="informaltable"><table class="informaltable" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="properties_type">
|
||
<col width="300px" class="properties_name">
|
||
<col width="200px" class="properties_flags">
|
||
</colgroup>
|
||
<tbody>
|
||
<tr>
|
||
<td class="property_type"><span class="type">gboolean</span></td>
|
||
<td class="property_name"><a class="link" href="GtkButton.html#GtkButton--always-show-image" title="The “always-show-image” property">always-show-image</a></td>
|
||
<td class="property_flags">Read / Write / Construct</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="property_type">
|
||
<a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> *</td>
|
||
<td class="property_name"><a class="link" href="GtkButton.html#GtkButton--image" title="The “image” property">image</a></td>
|
||
<td class="property_flags">Read / Write</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="property_type"><a class="link" href="gtk3-Standard-Enumerations.html#GtkPositionType" title="enum GtkPositionType"><span class="type">GtkPositionType</span></a></td>
|
||
<td class="property_name"><a class="link" href="GtkButton.html#GtkButton--image-position" title="The “image-position” property">image-position</a></td>
|
||
<td class="property_flags">Read / Write</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="property_type">
|
||
<span class="type">char</span> *</td>
|
||
<td class="property_name"><a class="link" href="GtkButton.html#GtkButton--label" title="The “label” property">label</a></td>
|
||
<td class="property_flags">Read / Write / Construct</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="property_type"><a class="link" href="gtk3-Standard-Enumerations.html#GtkReliefStyle" title="enum GtkReliefStyle"><span class="type">GtkReliefStyle</span></a></td>
|
||
<td class="property_name"><a class="link" href="GtkButton.html#GtkButton--relief" title="The “relief” property">relief</a></td>
|
||
<td class="property_flags">Read / Write</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="property_type"><span class="type">gboolean</span></td>
|
||
<td class="property_name"><a class="link" href="GtkButton.html#GtkButton--use-stock" title="The “use-stock” property">use-stock</a></td>
|
||
<td class="property_flags">Read / Write / Construct</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="property_type"><span class="type">gboolean</span></td>
|
||
<td class="property_name"><a class="link" href="GtkButton.html#GtkButton--use-underline" title="The “use-underline” property">use-underline</a></td>
|
||
<td class="property_flags">Read / Write / Construct</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="property_type"><span class="type">float</span></td>
|
||
<td class="property_name"><a class="link" href="GtkButton.html#GtkButton--xalign" title="The “xalign” property">xalign</a></td>
|
||
<td class="property_flags">Read / Write</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="property_type"><span class="type">float</span></td>
|
||
<td class="property_name"><a class="link" href="GtkButton.html#GtkButton--yalign" title="The “yalign” property">yalign</a></td>
|
||
<td class="property_flags">Read / Write</td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
<div class="refsect1">
|
||
<a name="GtkButton.style-properties"></a><h2>Style Properties</h2>
|
||
<div class="informaltable"><table class="informaltable" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="style_properties_type">
|
||
<col width="300px" class="style_properties_name">
|
||
<col width="200px" class="style_properties_flags">
|
||
</colgroup>
|
||
<tbody>
|
||
<tr>
|
||
<td class="property_type"><span class="type">int</span></td>
|
||
<td class="property_name"><a class="link" href="GtkButton.html#GtkButton--s-child-displacement-x" title="The “child-displacement-x” style property">child-displacement-x</a></td>
|
||
<td class="property_flags">Read</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="property_type"><span class="type">int</span></td>
|
||
<td class="property_name"><a class="link" href="GtkButton.html#GtkButton--s-child-displacement-y" title="The “child-displacement-y” style property">child-displacement-y</a></td>
|
||
<td class="property_flags">Read</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="property_type">
|
||
<a class="link" href="GtkStyleContext.html#GtkBorder"><span class="type">GtkBorder</span></a> *</td>
|
||
<td class="property_name"><a class="link" href="GtkButton.html#GtkButton--s-default-border" title="The “default-border” style property">default-border</a></td>
|
||
<td class="property_flags">Read</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="property_type">
|
||
<a class="link" href="GtkStyleContext.html#GtkBorder"><span class="type">GtkBorder</span></a> *</td>
|
||
<td class="property_name"><a class="link" href="GtkButton.html#GtkButton--s-default-outside-border" title="The “default-outside-border” style property">default-outside-border</a></td>
|
||
<td class="property_flags">Read</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="property_type"><span class="type">gboolean</span></td>
|
||
<td class="property_name"><a class="link" href="GtkButton.html#GtkButton--s-displace-focus" title="The “displace-focus” style property">displace-focus</a></td>
|
||
<td class="property_flags">Read</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="property_type"><span class="type">int</span></td>
|
||
<td class="property_name"><a class="link" href="GtkButton.html#GtkButton--s-image-spacing" title="The “image-spacing” style property">image-spacing</a></td>
|
||
<td class="property_flags">Read</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="property_type">
|
||
<a class="link" href="GtkStyleContext.html#GtkBorder"><span class="type">GtkBorder</span></a> *</td>
|
||
<td class="property_name"><a class="link" href="GtkButton.html#GtkButton--s-inner-border" title="The “inner-border” style property">inner-border</a></td>
|
||
<td class="property_flags">Read</td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
<div class="refsect1">
|
||
<a name="GtkButton.signals"></a><h2>Signals</h2>
|
||
<div class="informaltable"><table class="informaltable" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="signal_proto_type">
|
||
<col width="300px" class="signal_proto_name">
|
||
<col width="200px" class="signal_proto_flags">
|
||
</colgroup>
|
||
<tbody>
|
||
<tr>
|
||
<td class="signal_type"><span class="returnvalue">void</span></td>
|
||
<td class="signal_name"><a class="link" href="GtkButton.html#GtkButton-activate" title="The “activate” signal">activate</a></td>
|
||
<td class="signal_flags">Action</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="signal_type"><span class="returnvalue">void</span></td>
|
||
<td class="signal_name"><a class="link" href="GtkButton.html#GtkButton-clicked" title="The “clicked” signal">clicked</a></td>
|
||
<td class="signal_flags">Action</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="signal_type"><span class="returnvalue">void</span></td>
|
||
<td class="signal_name"><a class="link" href="GtkButton.html#GtkButton-enter" title="The “enter” signal">enter</a></td>
|
||
<td class="signal_flags">Run First</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="signal_type"><span class="returnvalue">void</span></td>
|
||
<td class="signal_name"><a class="link" href="GtkButton.html#GtkButton-leave" title="The “leave” signal">leave</a></td>
|
||
<td class="signal_flags">Run First</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="signal_type"><span class="returnvalue">void</span></td>
|
||
<td class="signal_name"><a class="link" href="GtkButton.html#GtkButton-pressed" title="The “pressed” signal">pressed</a></td>
|
||
<td class="signal_flags">Run First</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="signal_type"><span class="returnvalue">void</span></td>
|
||
<td class="signal_name"><a class="link" href="GtkButton.html#GtkButton-released" title="The “released” signal">released</a></td>
|
||
<td class="signal_flags">Run First</td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
<div class="refsect1">
|
||
<a name="GtkButton.other"></a><h2>Types and Values</h2>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="other_proto_type">
|
||
<col class="other_proto_name">
|
||
</colgroup>
|
||
<tbody>
|
||
<tr>
|
||
<td class="datatype_keyword">struct</td>
|
||
<td class="function_name"><a class="link" href="GtkButton.html#GtkButton-struct" title="struct GtkButton">GtkButton</a></td>
|
||
</tr>
|
||
<tr>
|
||
<td class="datatype_keyword">struct</td>
|
||
<td class="function_name"><a class="link" href="GtkButton.html#GtkButtonClass" title="struct GtkButtonClass">GtkButtonClass</a></td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
<div class="refsect1">
|
||
<a name="GtkButton.object-hierarchy"></a><h2>Object Hierarchy</h2>
|
||
<pre class="screen"> GObject
|
||
<span class="lineart">╰──</span> GInitiallyUnowned
|
||
<span class="lineart">╰──</span> <a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a>
|
||
<span class="lineart">╰──</span> <a class="link" href="GtkContainer.html" title="GtkContainer">GtkContainer</a>
|
||
<span class="lineart">╰──</span> <a class="link" href="GtkBin.html" title="GtkBin">GtkBin</a>
|
||
<span class="lineart">╰──</span> GtkButton
|
||
<span class="lineart">├──</span> <a class="link" href="GtkToggleButton.html" title="GtkToggleButton">GtkToggleButton</a>
|
||
<span class="lineart">├──</span> <a class="link" href="GtkColorButton.html" title="GtkColorButton">GtkColorButton</a>
|
||
<span class="lineart">├──</span> <a class="link" href="GtkFontButton.html" title="GtkFontButton">GtkFontButton</a>
|
||
<span class="lineart">├──</span> <a class="link" href="GtkLinkButton.html" title="GtkLinkButton">GtkLinkButton</a>
|
||
<span class="lineart">├──</span> <a class="link" href="GtkLockButton.html" title="GtkLockButton">GtkLockButton</a>
|
||
<span class="lineart">├──</span> <a class="link" href="GtkModelButton.html" title="GtkModelButton">GtkModelButton</a>
|
||
<span class="lineart">╰──</span> <a class="link" href="GtkScaleButton.html" title="GtkScaleButton">GtkScaleButton</a>
|
||
</pre>
|
||
</div>
|
||
<div class="refsect1">
|
||
<a name="GtkButton.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
|
||
<p>
|
||
GtkButton implements
|
||
AtkImplementorIface, <a class="link" href="GtkBuildable.html" title="GtkBuildable">GtkBuildable</a>, <a class="link" href="GtkActionable.html" title="GtkActionable">GtkActionable</a> and <a class="link" href="GtkActivatable.html" title="GtkActivatable">GtkActivatable</a>.</p>
|
||
</div>
|
||
<div class="refsect1">
|
||
<a name="GtkButton.includes"></a><h2>Includes</h2>
|
||
<pre class="synopsis">#include <gtk/gtk.h>
|
||
</pre>
|
||
</div>
|
||
<div class="refsect1">
|
||
<a name="GtkButton.description"></a><h2>Description</h2>
|
||
<p>The <a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> widget is generally used to trigger a callback function that is
|
||
called when the button is pressed. The various signals and how to use them
|
||
are outlined below.</p>
|
||
<p>The <a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> widget can hold any valid child widget. That is, it can hold
|
||
almost any other standard <a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a>. The most commonly used child is the
|
||
<a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a>.</p>
|
||
<div class="refsect2">
|
||
<a name="id-1.3.9.2.11.4"></a><h3>CSS nodes</h3>
|
||
<p>GtkButton has a single CSS node with name button. The node will get the
|
||
style classes .image-button or .text-button, if the content is just an
|
||
image or label, respectively. It may also receive the .flat style class.</p>
|
||
<p>Other style classes that are commonly used with GtkButton include
|
||
.suggested-action and .destructive-action. In special cases, buttons
|
||
can be made round by adding the .circular style class.</p>
|
||
<p>Button-like widgets like <a class="link" href="GtkToggleButton.html" title="GtkToggleButton"><span class="type">GtkToggleButton</span></a>, <a class="link" href="GtkMenuButton.html" title="GtkMenuButton"><span class="type">GtkMenuButton</span></a>, <a class="link" href="GtkVolumeButton.html" title="GtkVolumeButton"><span class="type">GtkVolumeButton</span></a>,
|
||
<a class="link" href="GtkLockButton.html" title="GtkLockButton"><span class="type">GtkLockButton</span></a>, <a class="link" href="GtkColorButton.html" title="GtkColorButton"><span class="type">GtkColorButton</span></a>, <a class="link" href="GtkFontButton.html" title="GtkFontButton"><span class="type">GtkFontButton</span></a> or <a class="link" href="GtkFileChooserButton.html" title="GtkFileChooserButton"><span class="type">GtkFileChooserButton</span></a> use
|
||
style classes such as .toggle, .popup, .scale, .lock, .color, .font, .file
|
||
to differentiate themselves from a plain GtkButton.</p>
|
||
</div>
|
||
</div>
|
||
<div class="refsect1">
|
||
<a name="GtkButton.functions_details"></a><h2>Functions</h2>
|
||
<div class="refsect2">
|
||
<a name="gtk-button-new"></a><h3>gtk_button_new ()</h3>
|
||
<pre class="programlisting"><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *
|
||
gtk_button_new (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
|
||
<p>Creates a new <a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> widget. To add a child widget to the button,
|
||
use <a class="link" href="GtkContainer.html#gtk-container-add" title="gtk_container_add ()"><code class="function">gtk_container_add()</code></a>.</p>
|
||
<div class="refsect3">
|
||
<a name="gtk-button-new.returns"></a><h4>Returns</h4>
|
||
<p> The newly created <a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> widget.</p>
|
||
</div>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-button-new-with-label"></a><h3>gtk_button_new_with_label ()</h3>
|
||
<pre class="programlisting"><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *
|
||
gtk_button_new_with_label (<em class="parameter"><code>const <span class="type">gchar</span> *label</code></em>);</pre>
|
||
<p>Creates a <a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> widget with a <a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a> child containing the given
|
||
text.</p>
|
||
<div class="refsect3">
|
||
<a name="gtk-button-new-with-label.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody><tr>
|
||
<td class="parameter_name"><p>label</p></td>
|
||
<td class="parameter_description"><p>The text you want the <a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a> to hold.</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr></tbody>
|
||
</table></div>
|
||
</div>
|
||
<div class="refsect3">
|
||
<a name="gtk-button-new-with-label.returns"></a><h4>Returns</h4>
|
||
<p> The newly created <a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> widget.</p>
|
||
</div>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-button-new-with-mnemonic"></a><h3>gtk_button_new_with_mnemonic ()</h3>
|
||
<pre class="programlisting"><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *
|
||
gtk_button_new_with_mnemonic (<em class="parameter"><code>const <span class="type">gchar</span> *label</code></em>);</pre>
|
||
<p>Creates a new <a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> containing a label.
|
||
If characters in <em class="parameter"><code>label</code></em>
|
||
are preceded by an underscore, they are underlined.
|
||
If you need a literal underscore character in a label, use “__” (two
|
||
underscores). The first underlined character represents a keyboard
|
||
accelerator called a mnemonic.
|
||
Pressing Alt and that key activates the button.</p>
|
||
<div class="refsect3">
|
||
<a name="gtk-button-new-with-mnemonic.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody><tr>
|
||
<td class="parameter_name"><p>label</p></td>
|
||
<td class="parameter_description"><p>The text of the button, with an underscore in front of the
|
||
mnemonic character</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr></tbody>
|
||
</table></div>
|
||
</div>
|
||
<div class="refsect3">
|
||
<a name="gtk-button-new-with-mnemonic.returns"></a><h4>Returns</h4>
|
||
<p> a new <a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a></p>
|
||
</div>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-button-new-from-icon-name"></a><h3>gtk_button_new_from_icon_name ()</h3>
|
||
<pre class="programlisting"><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *
|
||
gtk_button_new_from_icon_name (<em class="parameter"><code>const <span class="type">gchar</span> *icon_name</code></em>,
|
||
<em class="parameter"><code><a class="link" href="gtk3-Themeable-Stock-Images.html#GtkIconSize" title="enum GtkIconSize"><span class="type">GtkIconSize</span></a> size</code></em>);</pre>
|
||
<p>Creates a new button containing an icon from the current icon theme.</p>
|
||
<p>If the icon name isn’t known, a “broken image” icon will be
|
||
displayed instead. If the current icon theme is changed, the icon
|
||
will be updated appropriately.</p>
|
||
<p>This function is a convenience wrapper around <a class="link" href="GtkButton.html#gtk-button-new" title="gtk_button_new ()"><code class="function">gtk_button_new()</code></a> and
|
||
<a class="link" href="GtkButton.html#gtk-button-set-image" title="gtk_button_set_image ()"><code class="function">gtk_button_set_image()</code></a>.</p>
|
||
<div class="refsect3">
|
||
<a name="gtk-button-new-from-icon-name.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody>
|
||
<tr>
|
||
<td class="parameter_name"><p>icon_name</p></td>
|
||
<td class="parameter_description"><p>an icon name or <code class="literal">NULL</code>. </p></td>
|
||
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>size</p></td>
|
||
<td class="parameter_description"><p>an icon size (<a class="link" href="gtk3-Themeable-Stock-Images.html#GtkIconSize" title="enum GtkIconSize"><span class="type">GtkIconSize</span></a>). </p></td>
|
||
<td class="parameter_annotations"><span class="annotation">[<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> int]</span></td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
<div class="refsect3">
|
||
<a name="gtk-button-new-from-icon-name.returns"></a><h4>Returns</h4>
|
||
<p> a new <a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> displaying the themed icon</p>
|
||
</div>
|
||
<p class="since">Since: <a class="link" href="api-index-3-10.html#api-index-3.10">3.10</a></p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-button-new-from-stock"></a><h3>gtk_button_new_from_stock ()</h3>
|
||
<pre class="programlisting"><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *
|
||
gtk_button_new_from_stock (<em class="parameter"><code>const <span class="type">gchar</span> *stock_id</code></em>);</pre>
|
||
<div class="warning">
|
||
<p><code class="literal">gtk_button_new_from_stock</code> has been deprecated since version 3.10 and should not be used in newly-written code.</p>
|
||
<p>Stock items are deprecated. Use <a class="link" href="GtkButton.html#gtk-button-new-with-label" title="gtk_button_new_with_label ()"><code class="function">gtk_button_new_with_label()</code></a>
|
||
instead.</p>
|
||
</div>
|
||
<p>Creates a new <a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> containing the image and text from a
|
||
stock item.
|
||
Some stock ids have preprocessor macros like <a class="link" href="gtk3-Stock-Items.html#GTK-STOCK-OK:CAPS" title="GTK_STOCK_OK"><span class="type">GTK_STOCK_OK</span></a> and
|
||
<a class="link" href="gtk3-Stock-Items.html#GTK-STOCK-APPLY:CAPS" title="GTK_STOCK_APPLY"><span class="type">GTK_STOCK_APPLY</span></a>.</p>
|
||
<p>If <em class="parameter"><code>stock_id</code></em>
|
||
is unknown, then it will be treated as a mnemonic
|
||
label (as for <a class="link" href="GtkButton.html#gtk-button-new-with-mnemonic" title="gtk_button_new_with_mnemonic ()"><code class="function">gtk_button_new_with_mnemonic()</code></a>).</p>
|
||
<div class="refsect3">
|
||
<a name="gtk-button-new-from-stock.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody><tr>
|
||
<td class="parameter_name"><p>stock_id</p></td>
|
||
<td class="parameter_description"><p>the name of the stock item </p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr></tbody>
|
||
</table></div>
|
||
</div>
|
||
<div class="refsect3">
|
||
<a name="gtk-button-new-from-stock.returns"></a><h4>Returns</h4>
|
||
<p> a new <a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a></p>
|
||
</div>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-button-pressed"></a><h3>gtk_button_pressed ()</h3>
|
||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||
gtk_button_pressed (<em class="parameter"><code><a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> *button</code></em>);</pre>
|
||
<div class="warning">
|
||
<p><code class="literal">gtk_button_pressed</code> has been deprecated since version 2.20 and should not be used in newly-written code.</p>
|
||
<p>Use the <a class="link" href="GtkWidget.html#GtkWidget-button-press-event" title="The “button-press-event” signal"><span class="type">“button-press-event”</span></a> signal.</p>
|
||
</div>
|
||
<p>Emits a <a class="link" href="GtkButton.html#GtkButton-pressed" title="The “pressed” signal"><span class="type">“pressed”</span></a> signal to the given <a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a>.</p>
|
||
<div class="refsect3">
|
||
<a name="gtk-button-pressed.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody><tr>
|
||
<td class="parameter_name"><p>button</p></td>
|
||
<td class="parameter_description"><p>The <a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> you want to send the signal to.</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr></tbody>
|
||
</table></div>
|
||
</div>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-button-released"></a><h3>gtk_button_released ()</h3>
|
||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||
gtk_button_released (<em class="parameter"><code><a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> *button</code></em>);</pre>
|
||
<div class="warning">
|
||
<p><code class="literal">gtk_button_released</code> has been deprecated since version 2.20 and should not be used in newly-written code.</p>
|
||
<p>Use the <a class="link" href="GtkWidget.html#GtkWidget-button-release-event" title="The “button-release-event” signal"><span class="type">“button-release-event”</span></a> signal.</p>
|
||
</div>
|
||
<p>Emits a <a class="link" href="GtkButton.html#GtkButton-released" title="The “released” signal"><span class="type">“released”</span></a> signal to the given <a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a>.</p>
|
||
<div class="refsect3">
|
||
<a name="gtk-button-released.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody><tr>
|
||
<td class="parameter_name"><p>button</p></td>
|
||
<td class="parameter_description"><p>The <a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> you want to send the signal to.</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr></tbody>
|
||
</table></div>
|
||
</div>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-button-clicked"></a><h3>gtk_button_clicked ()</h3>
|
||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||
gtk_button_clicked (<em class="parameter"><code><a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> *button</code></em>);</pre>
|
||
<p>Emits a <a class="link" href="GtkButton.html#GtkButton-clicked" title="The “clicked” signal"><span class="type">“clicked”</span></a> signal to the given <a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a>.</p>
|
||
<div class="refsect3">
|
||
<a name="gtk-button-clicked.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody><tr>
|
||
<td class="parameter_name"><p>button</p></td>
|
||
<td class="parameter_description"><p>The <a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> you want to send the signal to.</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr></tbody>
|
||
</table></div>
|
||
</div>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-button-enter"></a><h3>gtk_button_enter ()</h3>
|
||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||
gtk_button_enter (<em class="parameter"><code><a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> *button</code></em>);</pre>
|
||
<div class="warning">
|
||
<p><code class="literal">gtk_button_enter</code> has been deprecated since version 2.20 and should not be used in newly-written code.</p>
|
||
<p>Use the <a class="link" href="GtkWidget.html#GtkWidget-enter-notify-event" title="The “enter-notify-event” signal"><span class="type">“enter-notify-event”</span></a> signal.</p>
|
||
</div>
|
||
<p>Emits a <a class="link" href="GtkButton.html#GtkButton-enter" title="The “enter” signal"><span class="type">“enter”</span></a> signal to the given <a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a>.</p>
|
||
<div class="refsect3">
|
||
<a name="gtk-button-enter.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody><tr>
|
||
<td class="parameter_name"><p>button</p></td>
|
||
<td class="parameter_description"><p>The <a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> you want to send the signal to.</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr></tbody>
|
||
</table></div>
|
||
</div>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-button-leave"></a><h3>gtk_button_leave ()</h3>
|
||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||
gtk_button_leave (<em class="parameter"><code><a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> *button</code></em>);</pre>
|
||
<div class="warning">
|
||
<p><code class="literal">gtk_button_leave</code> has been deprecated since version 2.20 and should not be used in newly-written code.</p>
|
||
<p>Use the <a class="link" href="GtkWidget.html#GtkWidget-leave-notify-event" title="The “leave-notify-event” signal"><span class="type">“leave-notify-event”</span></a> signal.</p>
|
||
</div>
|
||
<p>Emits a <a class="link" href="GtkButton.html#GtkButton-leave" title="The “leave” signal"><span class="type">“leave”</span></a> signal to the given <a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a>.</p>
|
||
<div class="refsect3">
|
||
<a name="gtk-button-leave.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody><tr>
|
||
<td class="parameter_name"><p>button</p></td>
|
||
<td class="parameter_description"><p>The <a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> you want to send the signal to.</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr></tbody>
|
||
</table></div>
|
||
</div>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-button-set-relief"></a><h3>gtk_button_set_relief ()</h3>
|
||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||
gtk_button_set_relief (<em class="parameter"><code><a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> *button</code></em>,
|
||
<em class="parameter"><code><a class="link" href="gtk3-Standard-Enumerations.html#GtkReliefStyle" title="enum GtkReliefStyle"><span class="type">GtkReliefStyle</span></a> relief</code></em>);</pre>
|
||
<p>Sets the relief style of the edges of the given <a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> widget.
|
||
Two styles exist, <a class="link" href="gtk3-Standard-Enumerations.html#GTK-RELIEF-NORMAL:CAPS"><code class="literal">GTK_RELIEF_NORMAL</code></a> and <a class="link" href="gtk3-Standard-Enumerations.html#GTK-RELIEF-NONE:CAPS"><code class="literal">GTK_RELIEF_NONE</code></a>.
|
||
The default style is, as one can guess, <a class="link" href="gtk3-Standard-Enumerations.html#GTK-RELIEF-NORMAL:CAPS"><code class="literal">GTK_RELIEF_NORMAL</code></a>.
|
||
The deprecated value <a class="link" href="gtk3-Standard-Enumerations.html#GTK-RELIEF-HALF:CAPS"><code class="literal">GTK_RELIEF_HALF</code></a> behaves the same as
|
||
<a class="link" href="gtk3-Standard-Enumerations.html#GTK-RELIEF-NORMAL:CAPS"><code class="literal">GTK_RELIEF_NORMAL</code></a>.</p>
|
||
<div class="refsect3">
|
||
<a name="gtk-button-set-relief.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody>
|
||
<tr>
|
||
<td class="parameter_name"><p>button</p></td>
|
||
<td class="parameter_description"><p>The <a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> you want to set relief styles of</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>relief</p></td>
|
||
<td class="parameter_description"><p>The GtkReliefStyle as described above</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-button-get-relief"></a><h3>gtk_button_get_relief ()</h3>
|
||
<pre class="programlisting"><a class="link" href="gtk3-Standard-Enumerations.html#GtkReliefStyle" title="enum GtkReliefStyle"><span class="returnvalue">GtkReliefStyle</span></a>
|
||
gtk_button_get_relief (<em class="parameter"><code><a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> *button</code></em>);</pre>
|
||
<p>Returns the current relief style of the given <a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a>.</p>
|
||
<div class="refsect3">
|
||
<a name="gtk-button-get-relief.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody><tr>
|
||
<td class="parameter_name"><p>button</p></td>
|
||
<td class="parameter_description"><p>The <a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> you want the <a class="link" href="gtk3-Standard-Enumerations.html#GtkReliefStyle" title="enum GtkReliefStyle"><span class="type">GtkReliefStyle</span></a> from.</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr></tbody>
|
||
</table></div>
|
||
</div>
|
||
<div class="refsect3">
|
||
<a name="gtk-button-get-relief.returns"></a><h4>Returns</h4>
|
||
<p> The current <a class="link" href="gtk3-Standard-Enumerations.html#GtkReliefStyle" title="enum GtkReliefStyle"><span class="type">GtkReliefStyle</span></a></p>
|
||
</div>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-button-get-label"></a><h3>gtk_button_get_label ()</h3>
|
||
<pre class="programlisting">const <span class="returnvalue">gchar</span> *
|
||
gtk_button_get_label (<em class="parameter"><code><a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> *button</code></em>);</pre>
|
||
<p>Fetches the text from the label of the button, as set by
|
||
<a class="link" href="GtkButton.html#gtk-button-set-label" title="gtk_button_set_label ()"><code class="function">gtk_button_set_label()</code></a>. If the label text has not
|
||
been set the return value will be <code class="literal">NULL</code>. This will be the
|
||
case if you create an empty button with <a class="link" href="GtkButton.html#gtk-button-new" title="gtk_button_new ()"><code class="function">gtk_button_new()</code></a> to
|
||
use as a container.</p>
|
||
<div class="refsect3">
|
||
<a name="gtk-button-get-label.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody><tr>
|
||
<td class="parameter_name"><p>button</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr></tbody>
|
||
</table></div>
|
||
</div>
|
||
<div class="refsect3">
|
||
<a name="gtk-button-get-label.returns"></a><h4>Returns</h4>
|
||
<p> The text of the label widget. This string is owned
|
||
by the widget and must not be modified or freed.</p>
|
||
</div>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-button-set-label"></a><h3>gtk_button_set_label ()</h3>
|
||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||
gtk_button_set_label (<em class="parameter"><code><a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> *button</code></em>,
|
||
<em class="parameter"><code>const <span class="type">gchar</span> *label</code></em>);</pre>
|
||
<p>Sets the text of the label of the button to <em class="parameter"><code>str</code></em>
|
||
. This text is
|
||
also used to select the stock item if <a class="link" href="GtkButton.html#gtk-button-set-use-stock" title="gtk_button_set_use_stock ()"><code class="function">gtk_button_set_use_stock()</code></a>
|
||
is used.</p>
|
||
<p>This will also clear any previously set labels.</p>
|
||
<div class="refsect3">
|
||
<a name="gtk-button-set-label.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody>
|
||
<tr>
|
||
<td class="parameter_name"><p>button</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>label</p></td>
|
||
<td class="parameter_description"><p>a string</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-button-get-use-stock"></a><h3>gtk_button_get_use_stock ()</h3>
|
||
<pre class="programlisting"><span class="returnvalue">gboolean</span>
|
||
gtk_button_get_use_stock (<em class="parameter"><code><a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> *button</code></em>);</pre>
|
||
<div class="warning"><p><code class="literal">gtk_button_get_use_stock</code> has been deprecated since version 3.10 and should not be used in newly-written code.</p></div>
|
||
<p>Returns whether the button label is a stock item.</p>
|
||
<div class="refsect3">
|
||
<a name="gtk-button-get-use-stock.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody><tr>
|
||
<td class="parameter_name"><p>button</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr></tbody>
|
||
</table></div>
|
||
</div>
|
||
<div class="refsect3">
|
||
<a name="gtk-button-get-use-stock.returns"></a><h4>Returns</h4>
|
||
<p> <code class="literal">TRUE</code> if the button label is used to
|
||
select a stock item instead of being
|
||
used directly as the label text.</p>
|
||
</div>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-button-set-use-stock"></a><h3>gtk_button_set_use_stock ()</h3>
|
||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||
gtk_button_set_use_stock (<em class="parameter"><code><a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> *button</code></em>,
|
||
<em class="parameter"><code><span class="type">gboolean</span> use_stock</code></em>);</pre>
|
||
<div class="warning"><p><code class="literal">gtk_button_set_use_stock</code> has been deprecated since version 3.10 and should not be used in newly-written code.</p></div>
|
||
<p>If <code class="literal">TRUE</code>, the label set on the button is used as a
|
||
stock id to select the stock item for the button.</p>
|
||
<div class="refsect3">
|
||
<a name="gtk-button-set-use-stock.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody>
|
||
<tr>
|
||
<td class="parameter_name"><p>button</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>use_stock</p></td>
|
||
<td class="parameter_description"><p><code class="literal">TRUE</code> if the button should use a stock item</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-button-get-use-underline"></a><h3>gtk_button_get_use_underline ()</h3>
|
||
<pre class="programlisting"><span class="returnvalue">gboolean</span>
|
||
gtk_button_get_use_underline (<em class="parameter"><code><a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> *button</code></em>);</pre>
|
||
<p>Returns whether an embedded underline in the button label indicates a
|
||
mnemonic. See <a class="link" href="GtkButton.html#gtk-button-set-use-underline" title="gtk_button_set_use_underline ()"><code class="function">gtk_button_set_use_underline()</code></a>.</p>
|
||
<div class="refsect3">
|
||
<a name="gtk-button-get-use-underline.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody><tr>
|
||
<td class="parameter_name"><p>button</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr></tbody>
|
||
</table></div>
|
||
</div>
|
||
<div class="refsect3">
|
||
<a name="gtk-button-get-use-underline.returns"></a><h4>Returns</h4>
|
||
<p> <code class="literal">TRUE</code> if an embedded underline in the button label
|
||
indicates the mnemonic accelerator keys.</p>
|
||
</div>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-button-set-use-underline"></a><h3>gtk_button_set_use_underline ()</h3>
|
||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||
gtk_button_set_use_underline (<em class="parameter"><code><a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> *button</code></em>,
|
||
<em class="parameter"><code><span class="type">gboolean</span> use_underline</code></em>);</pre>
|
||
<p>If true, an underline in the text of the button label indicates
|
||
the next character should be used for the mnemonic accelerator key.</p>
|
||
<div class="refsect3">
|
||
<a name="gtk-button-set-use-underline.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody>
|
||
<tr>
|
||
<td class="parameter_name"><p>button</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>use_underline</p></td>
|
||
<td class="parameter_description"><p><code class="literal">TRUE</code> if underlines in the text indicate mnemonics</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-button-set-focus-on-click"></a><h3>gtk_button_set_focus_on_click ()</h3>
|
||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||
gtk_button_set_focus_on_click (<em class="parameter"><code><a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> *button</code></em>,
|
||
<em class="parameter"><code><span class="type">gboolean</span> focus_on_click</code></em>);</pre>
|
||
<div class="warning">
|
||
<p><code class="literal">gtk_button_set_focus_on_click</code> has been deprecated since version 3.20 and should not be used in newly-written code.</p>
|
||
<p>Use <a class="link" href="GtkWidget.html#gtk-widget-set-focus-on-click" title="gtk_widget_set_focus_on_click ()"><code class="function">gtk_widget_set_focus_on_click()</code></a> instead</p>
|
||
</div>
|
||
<p>Sets whether the button will grab focus when it is clicked with the mouse.
|
||
Making mouse clicks not grab focus is useful in places like toolbars where
|
||
you don’t want the keyboard focus removed from the main area of the
|
||
application.</p>
|
||
<div class="refsect3">
|
||
<a name="gtk-button-set-focus-on-click.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody>
|
||
<tr>
|
||
<td class="parameter_name"><p>button</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>focus_on_click</p></td>
|
||
<td class="parameter_description"><p>whether the button grabs focus when clicked with the mouse</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
<p class="since">Since: 2.4</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-button-get-focus-on-click"></a><h3>gtk_button_get_focus_on_click ()</h3>
|
||
<pre class="programlisting"><span class="returnvalue">gboolean</span>
|
||
gtk_button_get_focus_on_click (<em class="parameter"><code><a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> *button</code></em>);</pre>
|
||
<div class="warning">
|
||
<p><code class="literal">gtk_button_get_focus_on_click</code> has been deprecated since version 3.20 and should not be used in newly-written code.</p>
|
||
<p>Use <a class="link" href="GtkWidget.html#gtk-widget-get-focus-on-click" title="gtk_widget_get_focus_on_click ()"><code class="function">gtk_widget_get_focus_on_click()</code></a> instead</p>
|
||
</div>
|
||
<p>Returns whether the button grabs focus when it is clicked with the mouse.
|
||
See <a class="link" href="GtkButton.html#gtk-button-set-focus-on-click" title="gtk_button_set_focus_on_click ()"><code class="function">gtk_button_set_focus_on_click()</code></a>.</p>
|
||
<div class="refsect3">
|
||
<a name="gtk-button-get-focus-on-click.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody><tr>
|
||
<td class="parameter_name"><p>button</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr></tbody>
|
||
</table></div>
|
||
</div>
|
||
<div class="refsect3">
|
||
<a name="gtk-button-get-focus-on-click.returns"></a><h4>Returns</h4>
|
||
<p> <code class="literal">TRUE</code> if the button grabs focus when it is clicked with
|
||
the mouse.</p>
|
||
</div>
|
||
<p class="since">Since: 2.4</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-button-set-alignment"></a><h3>gtk_button_set_alignment ()</h3>
|
||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||
gtk_button_set_alignment (<em class="parameter"><code><a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> *button</code></em>,
|
||
<em class="parameter"><code><span class="type">gfloat</span> xalign</code></em>,
|
||
<em class="parameter"><code><span class="type">gfloat</span> yalign</code></em>);</pre>
|
||
<div class="warning">
|
||
<p><code class="literal">gtk_button_set_alignment</code> has been deprecated since version 3.14 and should not be used in newly-written code.</p>
|
||
<p>Access the child widget directly if you need to control
|
||
its alignment.</p>
|
||
</div>
|
||
<p>Sets the alignment of the child. This property has no effect unless
|
||
the child is a <a class="link" href="GtkMisc.html" title="GtkMisc"><span class="type">GtkMisc</span></a> or a <a class="link" href="GtkAlignment.html" title="GtkAlignment"><span class="type">GtkAlignment</span></a>.</p>
|
||
<div class="refsect3">
|
||
<a name="gtk-button-set-alignment.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody>
|
||
<tr>
|
||
<td class="parameter_name"><p>button</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>xalign</p></td>
|
||
<td class="parameter_description"><p>the horizontal position of the child, 0.0 is left aligned,
|
||
1.0 is right aligned</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>yalign</p></td>
|
||
<td class="parameter_description"><p>the vertical position of the child, 0.0 is top aligned,
|
||
1.0 is bottom aligned</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
<p class="since">Since: 2.4</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-button-get-alignment"></a><h3>gtk_button_get_alignment ()</h3>
|
||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||
gtk_button_get_alignment (<em class="parameter"><code><a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> *button</code></em>,
|
||
<em class="parameter"><code><span class="type">gfloat</span> *xalign</code></em>,
|
||
<em class="parameter"><code><span class="type">gfloat</span> *yalign</code></em>);</pre>
|
||
<div class="warning">
|
||
<p><code class="literal">gtk_button_get_alignment</code> has been deprecated since version 3.14 and should not be used in newly-written code.</p>
|
||
<p>Access the child widget directly if you need to control
|
||
its alignment.</p>
|
||
</div>
|
||
<p>Gets the alignment of the child in the button.</p>
|
||
<div class="refsect3">
|
||
<a name="gtk-button-get-alignment.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody>
|
||
<tr>
|
||
<td class="parameter_name"><p>button</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>xalign</p></td>
|
||
<td class="parameter_description"><p>return location for horizontal alignment. </p></td>
|
||
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span></td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>yalign</p></td>
|
||
<td class="parameter_description"><p>return location for vertical alignment. </p></td>
|
||
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span></td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
<p class="since">Since: 2.4</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-button-set-image"></a><h3>gtk_button_set_image ()</h3>
|
||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||
gtk_button_set_image (<em class="parameter"><code><a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> *button</code></em>,
|
||
<em class="parameter"><code><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> *image</code></em>);</pre>
|
||
<p>Set the image of <em class="parameter"><code>button</code></em>
|
||
to the given widget. The image will be
|
||
displayed if the label text is <code class="literal">NULL</code> or if
|
||
<a class="link" href="GtkButton.html#GtkButton--always-show-image" title="The “always-show-image” property"><span class="type">“always-show-image”</span></a> is <code class="literal">TRUE</code>. You don’t have to call
|
||
<a class="link" href="GtkWidget.html#gtk-widget-show" title="gtk_widget_show ()"><code class="function">gtk_widget_show()</code></a> on <em class="parameter"><code>image</code></em>
|
||
yourself.</p>
|
||
<div class="refsect3">
|
||
<a name="gtk-button-set-image.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody>
|
||
<tr>
|
||
<td class="parameter_name"><p>button</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>image</p></td>
|
||
<td class="parameter_description"><p>a widget to set as the image for the button, or <code class="literal">NULL</code> to unset. </p></td>
|
||
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
<p class="since">Since: 2.6</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-button-get-image"></a><h3>gtk_button_get_image ()</h3>
|
||
<pre class="programlisting"><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *
|
||
gtk_button_get_image (<em class="parameter"><code><a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> *button</code></em>);</pre>
|
||
<p>Gets the widget that is currenty set as the image of <em class="parameter"><code>button</code></em>
|
||
.
|
||
This may have been explicitly set by <a class="link" href="GtkButton.html#gtk-button-set-image" title="gtk_button_set_image ()"><code class="function">gtk_button_set_image()</code></a>
|
||
or constructed by <a class="link" href="GtkButton.html#gtk-button-new-from-stock" title="gtk_button_new_from_stock ()"><code class="function">gtk_button_new_from_stock()</code></a>.</p>
|
||
<div class="refsect3">
|
||
<a name="gtk-button-get-image.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody><tr>
|
||
<td class="parameter_name"><p>button</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr></tbody>
|
||
</table></div>
|
||
</div>
|
||
<div class="refsect3">
|
||
<a name="gtk-button-get-image.returns"></a><h4>Returns</h4>
|
||
<p>a <a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> or <code class="literal">NULL</code> in case
|
||
there is no image. </p>
|
||
<p><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>][<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p>
|
||
</div>
|
||
<p class="since">Since: 2.6</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-button-set-image-position"></a><h3>gtk_button_set_image_position ()</h3>
|
||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||
gtk_button_set_image_position (<em class="parameter"><code><a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> *button</code></em>,
|
||
<em class="parameter"><code><a class="link" href="gtk3-Standard-Enumerations.html#GtkPositionType" title="enum GtkPositionType"><span class="type">GtkPositionType</span></a> position</code></em>);</pre>
|
||
<p>Sets the position of the image relative to the text
|
||
inside the button.</p>
|
||
<div class="refsect3">
|
||
<a name="gtk-button-set-image-position.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody>
|
||
<tr>
|
||
<td class="parameter_name"><p>button</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>position</p></td>
|
||
<td class="parameter_description"><p>the position</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
<p class="since">Since: 2.10</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-button-get-image-position"></a><h3>gtk_button_get_image_position ()</h3>
|
||
<pre class="programlisting"><a class="link" href="gtk3-Standard-Enumerations.html#GtkPositionType" title="enum GtkPositionType"><span class="returnvalue">GtkPositionType</span></a>
|
||
gtk_button_get_image_position (<em class="parameter"><code><a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> *button</code></em>);</pre>
|
||
<p>Gets the position of the image relative to the text
|
||
inside the button.</p>
|
||
<div class="refsect3">
|
||
<a name="gtk-button-get-image-position.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody><tr>
|
||
<td class="parameter_name"><p>button</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr></tbody>
|
||
</table></div>
|
||
</div>
|
||
<div class="refsect3">
|
||
<a name="gtk-button-get-image-position.returns"></a><h4>Returns</h4>
|
||
<p> the position</p>
|
||
</div>
|
||
<p class="since">Since: 2.10</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-button-set-always-show-image"></a><h3>gtk_button_set_always_show_image ()</h3>
|
||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||
gtk_button_set_always_show_image (<em class="parameter"><code><a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> *button</code></em>,
|
||
<em class="parameter"><code><span class="type">gboolean</span> always_show</code></em>);</pre>
|
||
<p>If <code class="literal">TRUE</code>, the button will ignore the <a class="link" href="GtkSettings.html#GtkSettings--gtk-button-images" title="The “gtk-button-images” property"><span class="type">“gtk-button-images”</span></a>
|
||
setting and always show the image, if available.</p>
|
||
<p>Use this property if the button would be useless or hard to use
|
||
without the image.</p>
|
||
<div class="refsect3">
|
||
<a name="gtk-button-set-always-show-image.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody>
|
||
<tr>
|
||
<td class="parameter_name"><p>button</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>always_show</p></td>
|
||
<td class="parameter_description"><p><code class="literal">TRUE</code> if the menuitem should always show the image</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
<p class="since">Since: <a class="link" href="api-index-3-6.html#api-index-3.6">3.6</a></p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-button-get-always-show-image"></a><h3>gtk_button_get_always_show_image ()</h3>
|
||
<pre class="programlisting"><span class="returnvalue">gboolean</span>
|
||
gtk_button_get_always_show_image (<em class="parameter"><code><a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> *button</code></em>);</pre>
|
||
<p>Returns whether the button will ignore the <a class="link" href="GtkSettings.html#GtkSettings--gtk-button-images" title="The “gtk-button-images” property"><span class="type">“gtk-button-images”</span></a>
|
||
setting and always show the image, if available.</p>
|
||
<div class="refsect3">
|
||
<a name="gtk-button-get-always-show-image.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody><tr>
|
||
<td class="parameter_name"><p>button</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr></tbody>
|
||
</table></div>
|
||
</div>
|
||
<div class="refsect3">
|
||
<a name="gtk-button-get-always-show-image.returns"></a><h4>Returns</h4>
|
||
<p> <code class="literal">TRUE</code> if the button will always show the image</p>
|
||
</div>
|
||
<p class="since">Since: <a class="link" href="api-index-3-6.html#api-index-3.6">3.6</a></p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-button-get-event-window"></a><h3>gtk_button_get_event_window ()</h3>
|
||
<pre class="programlisting"><span class="returnvalue">GdkWindow</span> *
|
||
gtk_button_get_event_window (<em class="parameter"><code><a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> *button</code></em>);</pre>
|
||
<p>Returns the button’s event window if it is realized, <code class="literal">NULL</code> otherwise.
|
||
This function should be rarely needed.</p>
|
||
<div class="refsect3">
|
||
<a name="gtk-button-get-event-window.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody><tr>
|
||
<td class="parameter_name"><p>button</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr></tbody>
|
||
</table></div>
|
||
</div>
|
||
<div class="refsect3">
|
||
<a name="gtk-button-get-event-window.returns"></a><h4>Returns</h4>
|
||
<p><em class="parameter"><code>button</code></em>
|
||
’s event window. </p>
|
||
<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p>
|
||
</div>
|
||
<p class="since">Since: 2.22</p>
|
||
</div>
|
||
</div>
|
||
<div class="refsect1">
|
||
<a name="GtkButton.other_details"></a><h2>Types and Values</h2>
|
||
<div class="refsect2">
|
||
<a name="GtkButton-struct"></a><h3>struct GtkButton</h3>
|
||
<pre class="programlisting">struct GtkButton;</pre>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="GtkButtonClass"></a><h3>struct GtkButtonClass</h3>
|
||
<pre class="programlisting">struct GtkButtonClass {
|
||
GtkBinClass parent_class;
|
||
|
||
void (* pressed) (GtkButton *button);
|
||
void (* released) (GtkButton *button);
|
||
void (* clicked) (GtkButton *button);
|
||
void (* enter) (GtkButton *button);
|
||
void (* leave) (GtkButton *button);
|
||
void (* activate) (GtkButton *button);
|
||
};
|
||
</pre>
|
||
<div class="refsect3">
|
||
<a name="GtkButtonClass.members"></a><h4>Members</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="300px" class="struct_members_name">
|
||
<col class="struct_members_description">
|
||
<col width="200px" class="struct_members_annotations">
|
||
</colgroup>
|
||
<tbody>
|
||
<tr>
|
||
<td class="struct_member_name"><p><em class="structfield"><code><a name="GtkButtonClass.pressed"></a>pressed</code></em> ()</p></td>
|
||
<td class="struct_member_description"><p>Signal emitted when the button is pressed. Deprecated: 2.8.</p></td>
|
||
<td class="struct_member_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="struct_member_name"><p><em class="structfield"><code><a name="GtkButtonClass.released"></a>released</code></em> ()</p></td>
|
||
<td class="struct_member_description"><p>Signal emitted when the button is released. Deprecated: 2.8.</p></td>
|
||
<td class="struct_member_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="struct_member_name"><p><em class="structfield"><code><a name="GtkButtonClass.clicked"></a>clicked</code></em> ()</p></td>
|
||
<td class="struct_member_description"><p>Signal emitted when the button has been activated (pressed and released).</p></td>
|
||
<td class="struct_member_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="struct_member_name"><p><em class="structfield"><code><a name="GtkButtonClass.enter"></a>enter</code></em> ()</p></td>
|
||
<td class="struct_member_description"><p>Signal emitted when the pointer enters the button. Deprecated: 2.8.</p></td>
|
||
<td class="struct_member_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="struct_member_name"><p><em class="structfield"><code><a name="GtkButtonClass.leave"></a>leave</code></em> ()</p></td>
|
||
<td class="struct_member_description"><p>Signal emitted when the pointer leaves the button. Deprecated: 2.8.</p></td>
|
||
<td class="struct_member_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="struct_member_name"><p><em class="structfield"><code><a name="GtkButtonClass.activate"></a>activate</code></em> ()</p></td>
|
||
<td class="struct_member_description"><p>Signal that causes the button to animate press then
|
||
release. Applications should never connect to this signal, but use
|
||
the <em class="parameter"><code>clicked</code></em>
|
||
signal.</p></td>
|
||
<td class="struct_member_annotations"> </td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="refsect1">
|
||
<a name="GtkButton.property-details"></a><h2>Property Details</h2>
|
||
<div class="refsect2">
|
||
<a name="GtkButton--always-show-image"></a><h3>The <code class="literal">“always-show-image”</code> property</h3>
|
||
<pre class="programlisting"> “always-show-image” <span class="type">gboolean</span></pre>
|
||
<p>If <code class="literal">TRUE</code>, the button will ignore the <a class="link" href="GtkSettings.html#GtkSettings--gtk-button-images" title="The “gtk-button-images” property"><span class="type">“gtk-button-images”</span></a>
|
||
setting and always show the image, if available.</p>
|
||
<p>Use this property if the button would be useless or hard to use
|
||
without the image.</p>
|
||
<p>Owner: GtkButton</p>
|
||
<p>Flags: Read / Write / Construct</p>
|
||
<p>Default value: FALSE</p>
|
||
<p class="since">Since: <a class="link" href="api-index-3-6.html#api-index-3.6">3.6</a></p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="GtkButton--image"></a><h3>The <code class="literal">“image”</code> property</h3>
|
||
<pre class="programlisting"> “image” <a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> *</pre>
|
||
<p>The child widget to appear next to the button text.</p>
|
||
<p>Owner: GtkButton</p>
|
||
<p>Flags: Read / Write</p>
|
||
<p class="since">Since: 2.6</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="GtkButton--image-position"></a><h3>The <code class="literal">“image-position”</code> property</h3>
|
||
<pre class="programlisting"> “image-position” <a class="link" href="gtk3-Standard-Enumerations.html#GtkPositionType" title="enum GtkPositionType"><span class="type">GtkPositionType</span></a></pre>
|
||
<p>The position of the image relative to the text inside the button.</p>
|
||
<p>Owner: GtkButton</p>
|
||
<p>Flags: Read / Write</p>
|
||
<p>Default value: GTK_POS_LEFT</p>
|
||
<p class="since">Since: 2.10</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="GtkButton--label"></a><h3>The <code class="literal">“label”</code> property</h3>
|
||
<pre class="programlisting"> “label” <span class="type">char</span> *</pre>
|
||
<p>Text of the label widget inside the button, if the button contains a label widget.</p>
|
||
<p>Owner: GtkButton</p>
|
||
<p>Flags: Read / Write / Construct</p>
|
||
<p>Default value: NULL</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="GtkButton--relief"></a><h3>The <code class="literal">“relief”</code> property</h3>
|
||
<pre class="programlisting"> “relief” <a class="link" href="gtk3-Standard-Enumerations.html#GtkReliefStyle" title="enum GtkReliefStyle"><span class="type">GtkReliefStyle</span></a></pre>
|
||
<p>The border relief style.</p>
|
||
<p>Owner: GtkButton</p>
|
||
<p>Flags: Read / Write</p>
|
||
<p>Default value: GTK_RELIEF_NORMAL</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="GtkButton--use-stock"></a><h3>The <code class="literal">“use-stock”</code> property</h3>
|
||
<pre class="programlisting"> “use-stock” <span class="type">gboolean</span></pre>
|
||
<p>If set, the label is used to pick a stock item instead of being displayed.</p>
|
||
<div class="warning"><p><code class="literal">GtkButton:use-stock</code> has been deprecated since version 3.10 and should not be used in newly-written code.</p></div>
|
||
<p>Owner: GtkButton</p>
|
||
<p>Flags: Read / Write / Construct</p>
|
||
<p>Default value: FALSE</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="GtkButton--use-underline"></a><h3>The <code class="literal">“use-underline”</code> property</h3>
|
||
<pre class="programlisting"> “use-underline” <span class="type">gboolean</span></pre>
|
||
<p>If set, an underline in the text indicates the next character should be used for the mnemonic accelerator key.</p>
|
||
<p>Owner: GtkButton</p>
|
||
<p>Flags: Read / Write / Construct</p>
|
||
<p>Default value: FALSE</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="GtkButton--xalign"></a><h3>The <code class="literal">“xalign”</code> property</h3>
|
||
<pre class="programlisting"> “xalign” <span class="type">float</span></pre>
|
||
<p>If the child of the button is a <a class="link" href="GtkMisc.html" title="GtkMisc"><span class="type">GtkMisc</span></a> or <a class="link" href="GtkAlignment.html" title="GtkAlignment"><span class="type">GtkAlignment</span></a>, this property
|
||
|
||
can be used to control its horizontal alignment. 0.0 is left aligned,
|
||
|
||
1.0 is right aligned.</p>
|
||
<div class="warning">
|
||
<p><code class="literal">GtkButton:xalign</code> has been deprecated since version 3.14 and should not be used in newly-written code.</p>
|
||
<p>Access the child widget directly if you need to control
|
||
its alignment.</p>
|
||
</div>
|
||
<p>Owner: GtkButton</p>
|
||
<p>Flags: Read / Write</p>
|
||
<p>Allowed values: [0,1]</p>
|
||
<p>Default value: 0.5</p>
|
||
<p class="since">Since: 2.4</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="GtkButton--yalign"></a><h3>The <code class="literal">“yalign”</code> property</h3>
|
||
<pre class="programlisting"> “yalign” <span class="type">float</span></pre>
|
||
<p>If the child of the button is a <a class="link" href="GtkMisc.html" title="GtkMisc"><span class="type">GtkMisc</span></a> or <a class="link" href="GtkAlignment.html" title="GtkAlignment"><span class="type">GtkAlignment</span></a>, this property
|
||
|
||
can be used to control its vertical alignment. 0.0 is top aligned,
|
||
|
||
1.0 is bottom aligned.</p>
|
||
<div class="warning">
|
||
<p><code class="literal">GtkButton:yalign</code> has been deprecated since version 3.14 and should not be used in newly-written code.</p>
|
||
<p>Access the child widget directly if you need to control
|
||
its alignment.</p>
|
||
</div>
|
||
<p>Owner: GtkButton</p>
|
||
<p>Flags: Read / Write</p>
|
||
<p>Allowed values: [0,1]</p>
|
||
<p>Default value: 0.5</p>
|
||
<p class="since">Since: 2.4</p>
|
||
</div>
|
||
</div>
|
||
<div class="refsect1">
|
||
<a name="GtkButton.style-property-details"></a><h2>Style Property Details</h2>
|
||
<div class="refsect2">
|
||
<a name="GtkButton--s-child-displacement-x"></a><h3>The <code class="literal">“child-displacement-x”</code> style property</h3>
|
||
<pre class="programlisting"> “child-displacement-x” <span class="type">int</span></pre>
|
||
<p>How far in the x direction to move the child when the button is depressed.</p>
|
||
<div class="warning">
|
||
<p><code class="literal">GtkButton:child-displacement-x</code> has been deprecated since version 3.20 and should not be used in newly-written code.</p>
|
||
<p>Use CSS margins and padding instead;
|
||
the value of this style property is ignored.</p>
|
||
</div>
|
||
<p>Owner: GtkButton</p>
|
||
<p>Flags: Read</p>
|
||
<p>Default value: 0</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="GtkButton--s-child-displacement-y"></a><h3>The <code class="literal">“child-displacement-y”</code> style property</h3>
|
||
<pre class="programlisting"> “child-displacement-y” <span class="type">int</span></pre>
|
||
<p>How far in the y direction to move the child when the button is depressed.</p>
|
||
<div class="warning">
|
||
<p><code class="literal">GtkButton:child-displacement-y</code> has been deprecated since version 3.20 and should not be used in newly-written code.</p>
|
||
<p>Use CSS margins and padding instead;
|
||
the value of this style property is ignored.</p>
|
||
</div>
|
||
<p>Owner: GtkButton</p>
|
||
<p>Flags: Read</p>
|
||
<p>Default value: 0</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="GtkButton--s-default-border"></a><h3>The <code class="literal">“default-border”</code> style property</h3>
|
||
<pre class="programlisting"> “default-border” <a class="link" href="GtkStyleContext.html#GtkBorder"><span class="type">GtkBorder</span></a> *</pre>
|
||
<p>The "default-border" style property defines the extra space to add
|
||
around a button that can become the default widget of its window.
|
||
For more information about default widgets, see <a class="link" href="GtkWidget.html#gtk-widget-grab-default" title="gtk_widget_grab_default ()"><code class="function">gtk_widget_grab_default()</code></a>.</p>
|
||
<div class="warning">
|
||
<p><code class="literal">GtkButton:default-border</code> has been deprecated since version 3.14 and should not be used in newly-written code.</p>
|
||
<p>Use CSS margins and padding instead;
|
||
the value of this style property is ignored.</p>
|
||
</div>
|
||
<p>Owner: GtkButton</p>
|
||
<p>Flags: Read</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="GtkButton--s-default-outside-border"></a><h3>The <code class="literal">“default-outside-border”</code> style property</h3>
|
||
<pre class="programlisting"> “default-outside-border” <a class="link" href="GtkStyleContext.html#GtkBorder"><span class="type">GtkBorder</span></a> *</pre>
|
||
<p>The "default-outside-border" style property defines the extra outside
|
||
space to add around a button that can become the default widget of its
|
||
window. Extra outside space is always drawn outside the button border.
|
||
For more information about default widgets, see <a class="link" href="GtkWidget.html#gtk-widget-grab-default" title="gtk_widget_grab_default ()"><code class="function">gtk_widget_grab_default()</code></a>.</p>
|
||
<div class="warning">
|
||
<p><code class="literal">GtkButton:default-outside-border</code> has been deprecated since version 3.14 and should not be used in newly-written code.</p>
|
||
<p>Use CSS margins and padding instead;
|
||
the value of this style property is ignored.</p>
|
||
</div>
|
||
<p>Owner: GtkButton</p>
|
||
<p>Flags: Read</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="GtkButton--s-displace-focus"></a><h3>The <code class="literal">“displace-focus”</code> style property</h3>
|
||
<pre class="programlisting"> “displace-focus” <span class="type">gboolean</span></pre>
|
||
<p>Whether the child_displacement_x/child_displacement_y properties
|
||
should also affect the focus rectangle.</p>
|
||
<div class="warning">
|
||
<p><code class="literal">GtkButton:displace-focus</code> has been deprecated since version 3.20 and should not be used in newly-written code.</p>
|
||
<p>Use CSS margins and padding instead;
|
||
the value of this style property is ignored.</p>
|
||
</div>
|
||
<p>Owner: GtkButton</p>
|
||
<p>Flags: Read</p>
|
||
<p>Default value: FALSE</p>
|
||
<p class="since">Since: 2.6</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="GtkButton--s-image-spacing"></a><h3>The <code class="literal">“image-spacing”</code> style property</h3>
|
||
<pre class="programlisting"> “image-spacing” <span class="type">int</span></pre>
|
||
<p>Spacing in pixels between the image and label.</p>
|
||
<p>Owner: GtkButton</p>
|
||
<p>Flags: Read</p>
|
||
<p>Allowed values: >= 0</p>
|
||
<p>Default value: 2</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="GtkButton--s-inner-border"></a><h3>The <code class="literal">“inner-border”</code> style property</h3>
|
||
<pre class="programlisting"> “inner-border” <a class="link" href="GtkStyleContext.html#GtkBorder"><span class="type">GtkBorder</span></a> *</pre>
|
||
<p>Sets the border between the button edges and child.</p>
|
||
<div class="warning">
|
||
<p><code class="literal">GtkButton:inner-border</code> has been deprecated since version 3.4 and should not be used in newly-written code.</p>
|
||
<p>Use the standard border and padding CSS properties;
|
||
the value of this style property is ignored.</p>
|
||
</div>
|
||
<p>Owner: GtkButton</p>
|
||
<p>Flags: Read</p>
|
||
<p class="since">Since: 2.10</p>
|
||
</div>
|
||
</div>
|
||
<div class="refsect1">
|
||
<a name="GtkButton.signal-details"></a><h2>Signal Details</h2>
|
||
<div class="refsect2">
|
||
<a name="GtkButton-activate"></a><h3>The <code class="literal">“activate”</code> signal</h3>
|
||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||
user_function (<a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> *widget,
|
||
<span class="type">gpointer</span> user_data)</pre>
|
||
<p>The ::activate signal on GtkButton is an action signal and
|
||
emitting it causes the button to animate press then release.
|
||
|
||
Applications should never connect to this signal, but use the
|
||
<a class="link" href="GtkButton.html#GtkButton-clicked" title="The “clicked” signal"><span class="type">“clicked”</span></a> signal.</p>
|
||
<div class="refsect3">
|
||
<a name="GtkButton-activate.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody>
|
||
<tr>
|
||
<td class="parameter_name"><p>widget</p></td>
|
||
<td class="parameter_description"><p>the object which received the signal.</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>user_data</p></td>
|
||
<td class="parameter_description"><p>user data set when the signal handler was connected.</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
<p>Flags: Action</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="GtkButton-clicked"></a><h3>The <code class="literal">“clicked”</code> signal</h3>
|
||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||
user_function (<a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> *button,
|
||
<span class="type">gpointer</span> user_data)</pre>
|
||
<p>Emitted when the button has been activated (pressed and released).</p>
|
||
<div class="refsect3">
|
||
<a name="GtkButton-clicked.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody>
|
||
<tr>
|
||
<td class="parameter_name"><p>button</p></td>
|
||
<td class="parameter_description"><p>the object that received the signal</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>user_data</p></td>
|
||
<td class="parameter_description"><p>user data set when the signal handler was connected.</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
<p>Flags: Action</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="GtkButton-enter"></a><h3>The <code class="literal">“enter”</code> signal</h3>
|
||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||
user_function (<a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> *button,
|
||
<span class="type">gpointer</span> user_data)</pre>
|
||
<p>Emitted when the pointer enters the button.</p>
|
||
<div class="warning">
|
||
<p><code class="literal">GtkButton::enter</code> has been deprecated since version 2.8 and should not be used in newly-written code.</p>
|
||
<p>Use the <a class="link" href="GtkWidget.html#GtkWidget-enter-notify-event" title="The “enter-notify-event” signal"><span class="type">“enter-notify-event”</span></a> signal.</p>
|
||
</div>
|
||
<div class="refsect3">
|
||
<a name="GtkButton-enter.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody>
|
||
<tr>
|
||
<td class="parameter_name"><p>button</p></td>
|
||
<td class="parameter_description"><p>the object that received the signal</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>user_data</p></td>
|
||
<td class="parameter_description"><p>user data set when the signal handler was connected.</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
<p>Flags: Run First</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="GtkButton-leave"></a><h3>The <code class="literal">“leave”</code> signal</h3>
|
||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||
user_function (<a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> *button,
|
||
<span class="type">gpointer</span> user_data)</pre>
|
||
<p>Emitted when the pointer leaves the button.</p>
|
||
<div class="warning">
|
||
<p><code class="literal">GtkButton::leave</code> has been deprecated since version 2.8 and should not be used in newly-written code.</p>
|
||
<p>Use the <a class="link" href="GtkWidget.html#GtkWidget-leave-notify-event" title="The “leave-notify-event” signal"><span class="type">“leave-notify-event”</span></a> signal.</p>
|
||
</div>
|
||
<div class="refsect3">
|
||
<a name="GtkButton-leave.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody>
|
||
<tr>
|
||
<td class="parameter_name"><p>button</p></td>
|
||
<td class="parameter_description"><p>the object that received the signal</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>user_data</p></td>
|
||
<td class="parameter_description"><p>user data set when the signal handler was connected.</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
<p>Flags: Run First</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="GtkButton-pressed"></a><h3>The <code class="literal">“pressed”</code> signal</h3>
|
||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||
user_function (<a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> *button,
|
||
<span class="type">gpointer</span> user_data)</pre>
|
||
<p>Emitted when the button is pressed.</p>
|
||
<div class="warning">
|
||
<p><code class="literal">GtkButton::pressed</code> has been deprecated since version 2.8 and should not be used in newly-written code.</p>
|
||
<p>Use the <a class="link" href="GtkWidget.html#GtkWidget-button-press-event" title="The “button-press-event” signal"><span class="type">“button-press-event”</span></a> signal.</p>
|
||
</div>
|
||
<div class="refsect3">
|
||
<a name="GtkButton-pressed.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody>
|
||
<tr>
|
||
<td class="parameter_name"><p>button</p></td>
|
||
<td class="parameter_description"><p>the object that received the signal</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>user_data</p></td>
|
||
<td class="parameter_description"><p>user data set when the signal handler was connected.</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
<p>Flags: Run First</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="GtkButton-released"></a><h3>The <code class="literal">“released”</code> signal</h3>
|
||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||
user_function (<a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> *button,
|
||
<span class="type">gpointer</span> user_data)</pre>
|
||
<p>Emitted when the button is released.</p>
|
||
<div class="warning">
|
||
<p><code class="literal">GtkButton::released</code> has been deprecated since version 2.8 and should not be used in newly-written code.</p>
|
||
<p>Use the <a class="link" href="GtkWidget.html#GtkWidget-button-release-event" title="The “button-release-event” signal"><span class="type">“button-release-event”</span></a> signal.</p>
|
||
</div>
|
||
<div class="refsect3">
|
||
<a name="GtkButton-released.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody>
|
||
<tr>
|
||
<td class="parameter_name"><p>button</p></td>
|
||
<td class="parameter_description"><p>the object that received the signal</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>user_data</p></td>
|
||
<td class="parameter_description"><p>user data set when the signal handler was connected.</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
<p>Flags: Run First</p>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="footer">
|
||
<hr>Generated by GTK-Doc V1.33.1</div>
|
||
</body>
|
||
</html> |