⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gtkbutton.html

📁 最新gtk中文资料集
💻 HTML
📖 第 1 页 / 共 5 页
字号:
<p>The position of the image relative to the text inside the button.</p><p></p><p>Default value: GTK_POS_LEFT</p><p>Since  2.10</p></div><hr><div class="refsect2" lang="en"><a name="id3494671"></a><h3><a name="GtkButton--label"></a>The <code class="literal">"label"</code> property</h3><a class="indexterm" name="id3494686"></a><pre class="programlisting">  "label"                    <ahref="/usr/share/gtk-doc/html/gobject/gobject-Standard-Parameter-and-Value-Types.html#gchararray">gchararray</a>            : Read / Write / Construct</pre><p>Text of the label widget inside the button, if the button contains a label widget.</p><p>Default value: NULL</p></div><hr><div class="refsect2" lang="en"><a name="id3494714"></a><h3><a name="GtkButton--relief"></a>The <code class="literal">"relief"</code> property</h3><a class="indexterm" name="id3494730"></a><pre class="programlisting">  "relief"                   <a class="link" href="gtk-Standard-Enumerations.html#GtkReliefStyle">GtkReliefStyle</a>        : Read / Write</pre><p>The border relief style.</p><p>Default value: GTK_RELIEF_NORMAL</p></div><hr><div class="refsect2" lang="en"><a name="id3494758"></a><h3><a name="GtkButton--use-stock"></a>The <code class="literal">"use-stock"</code> property</h3><a class="indexterm" name="id3494774"></a><pre class="programlisting">  "use-stock"                <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a>              : Read / Write / Construct</pre><p>If set, the label is used to pick a stock item instead of being displayed.</p><p>Default value: FALSE</p></div><hr><div class="refsect2" lang="en"><a name="id3494802"></a><h3><a name="GtkButton--use-underline"></a>The <code class="literal">"use-underline"</code> property</h3><a class="indexterm" name="id3494818"></a><pre class="programlisting">  "use-underline"            <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a>              : Read / Write / Construct</pre><p>If set, an underline in the text indicates the next character should be used for the mnemonic accelerator key.</p><p>Default value: FALSE</p></div><hr><div class="refsect2" lang="en"><a name="id3494847"></a><h3><a name="GtkButton--xalign"></a>The <code class="literal">"xalign"</code> property</h3><a class="indexterm" name="id3494863"></a><pre class="programlisting">  "xalign"                   <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gfloat">gfloat</a>                : Read / Write</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 it's horizontal alignment. 0.0 is left aligned, 1.0 is right aligned.</p><p></p><p>Allowed values: [0,1]</p><p>Default value: 0.5</p><p>Since  2.4</p></div><hr><div class="refsect2" lang="en"><a name="id3494921"></a><h3><a name="GtkButton--yalign"></a>The <code class="literal">"yalign"</code> property</h3><a class="indexterm" name="id3494937"></a><pre class="programlisting">  "yalign"                   <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gfloat">gfloat</a>                : Read / Write</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 it's vertical alignment. 0.0 is top aligned, 1.0 is bottom aligned.</p><p></p><p>Allowed values: [0,1]</p><p>Default value: 0.5</p><p>Since  2.4</p></div></div><div class="refsect1" lang="en"><a name="id3494996"></a><h2>Style Property Details</h2><div class="refsect2" lang="en"><a name="id3495007"></a><h3><a name="GtkButton--child-displacement-x"></a>The <code class="literal">"child-displacement-x"</code> style property</h3><a class="indexterm" name="id3495024"></a><pre class="programlisting">  "child-displacement-x"     <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a>                  : Read</pre><p>How far in the x direction to move the child when the button is depressed.</p><p>Default value: 0</p></div><hr><div class="refsect2" lang="en"><a name="id3495052"></a><h3><a name="GtkButton--child-displacement-y"></a>The <code class="literal">"child-displacement-y"</code> style property</h3><a class="indexterm" name="id3495069"></a><pre class="programlisting">  "child-displacement-y"     <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a>                  : Read</pre><p>How far in the y direction to move the child when the button is depressed.</p><p>Default value: 0</p></div><hr><div class="refsect2" lang="en"><a name="id3495096"></a><h3><a name="GtkButton--default-border"></a>The <code class="literal">"default-border"</code> style property</h3><a class="indexterm" name="id3495112"></a><pre class="programlisting">  "default-border"           <a class="link" href="GtkStyle.html#GtkBorder">GtkBorder</a>             : Read</pre><p>Extra space to add for CAN_DEFAULT buttons.</p></div><hr><div class="refsect2" lang="en"><a name="id3495135"></a><h3><a name="GtkButton--default-outside-border"></a>The <code class="literal">"default-outside-border"</code> style property</h3><a class="indexterm" name="id3495152"></a><pre class="programlisting">  "default-outside-border"   <a class="link" href="GtkStyle.html#GtkBorder">GtkBorder</a>             : Read</pre><p>Extra space to add for CAN_DEFAULT buttons that is always drawn outside the border.</p></div><hr><div class="refsect2" lang="en"><a name="id3495176"></a><h3><a name="GtkButton--displace-focus"></a>The <code class="literal">"displace-focus"</code> style property</h3><a class="indexterm" name="id3495193"></a><pre class="programlisting">  "displace-focus"           <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a>              : Read</pre><p>Whether the child_displacement_x/child_displacement_y properties should also affect the focus rectangle.</p><p></p><p>Default value: FALSE</p><p>Since  2.6</p></div><hr><div class="refsect2" lang="en"><a name="id3495230"></a><h3><a name="GtkButton--image-spacing"></a>The <code class="literal">"image-spacing"</code> style property</h3><a class="indexterm" name="id3495246"></a><pre class="programlisting">  "image-spacing"            <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a>                  : Read</pre><p>Spacing in pixels between the image and label.</p><p>Allowed values: &gt;= 0</p><p>Default value: 2</p></div><hr><div class="refsect2" lang="en"><a name="id3495276"></a><h3><a name="GtkButton--inner-border"></a>The <code class="literal">"inner-border"</code> style property</h3><a class="indexterm" name="id3495293"></a><pre class="programlisting">  "inner-border"             <a class="link" href="GtkStyle.html#GtkBorder">GtkBorder</a>             : Read</pre><p>Sets the border between the button edges and child.</p><p></p><p>Since  2.10</p></div></div><div class="refsect1" lang="en"><a name="id3495326"></a><h2>Signal Details</h2><div class="refsect2" lang="en"><a name="id3495337"></a><h3><a name="GtkButton-activate"></a>The <code class="literal">"activate"</code> signal</h3><a class="indexterm" name="id3495352"></a><pre class="programlisting">void                user_function                      (<a class="link" href="GtkButton.html" title="GtkButton">GtkButton</a> *widget,                                                        <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer">gpointer</a>   user_data)      : Run First / Action</pre><p>The ::activate signal on GtkButton is an action signal andemitting 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"><span class="type">"clicked"</span></a> signal.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>widget</code></em>&#160;:</span></p></td><td> the object which received the signal.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em>&#160;:</span></p></td><td>user data set when the signal handler was connected.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3495436"></a><h3><a name="GtkButton-clicked"></a>The <code class="literal">"clicked"</code> signal</h3><a class="indexterm" name="id3495451"></a><pre class="programlisting">void                user_function                      (<a class="link" href="GtkButton.html" title="GtkButton">GtkButton</a> *button,                                                        <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer">gpointer</a>   user_data)      : Run First / Action</pre><p>Emitted when the button has been activated (pressed and released).</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>button</code></em>&#160;:</span></p></td><td> the object that received the signal</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em>&#160;:</span></p></td><td>user data set when the signal handler was connected.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3495524"></a><h3><a name="GtkButton-enter"></a>The <code class="literal">"enter"</code> signal</h3><a class="indexterm" name="id3495540"></a><pre class="programlisting">void                user_function                      (<a class="link" href="GtkButton.html" title="GtkButton">GtkButton</a> *button,                                                        <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer">gpointer</a>   user_data)      : Run First</pre><p>Emitted when the pointer enters the button.</p><p><em class="parameter"><code>Deprecated</code></em>: Use the <a class="link" href="GtkWidget.html#GtkWidget-enter-notify-event"><span class="type">"enter-notify-event"</span></a> signal.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>button</code></em>&#160;:</span></p></td><td> the object that received the signal</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em>&#160;:</span></p></td><td>user data set when the signal handler was connected.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3495632"></a><h3><a name="GtkButton-leave"></a>The <code class="literal">"leave"</code> signal</h3><a class="indexterm" name="id3495648"></a><pre class="programlisting">void                user_function                      (<a class="link" href="GtkBu

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -