📄 gtkfontbutton.html
字号:
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>font_button</code></em> :</span></p></td><td> a <a class="link" href="GtkFontButton.html" title="GtkFontButton"><span class="type">GtkFontButton</span></a></td></tr><tr><td><p><span class="term"><em class="parameter"><code>use_size</code></em> :</span></p></td><td> If <ahref="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>, font name will be written using the selected size.</td></tr></tbody></table></div><p class="since">Since 2.4</p></div><hr><div class="refsect2" lang="en"><a name="id4047211"></a><h3><a name="gtk-font-button-get-use-size"></a>gtk_font_button_get_use_size ()</h3><a class="indexterm" name="id4047227"></a><pre class="programlisting"><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a> gtk_font_button_get_use_size (<a class="link" href="GtkFontButton.html" title="GtkFontButton">GtkFontButton</a> *font_button);</pre><p>Returns whether the selected size is used in the label.</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>font_button</code></em> :</span></p></td><td> a <a class="link" href="GtkFontButton.html" title="GtkFontButton"><span class="type">GtkFontButton</span></a></td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> whether the selected size is used in the label.</td></tr></tbody></table></div><p class="since">Since 2.4</p></div><hr><div class="refsect2" lang="en"><a name="id4047304"></a><h3><a name="gtk-font-button-set-title"></a>gtk_font_button_set_title ()</h3><a class="indexterm" name="id4047320"></a><pre class="programlisting">void gtk_font_button_set_title (<a class="link" href="GtkFontButton.html" title="GtkFontButton">GtkFontButton</a> *font_button, const <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar">gchar</a> *title);</pre><p>Sets the title for the font selection dialog.</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>font_button</code></em> :</span></p></td><td> a <a class="link" href="GtkFontButton.html" title="GtkFontButton"><span class="type">GtkFontButton</span></a></td></tr><tr><td><p><span class="term"><em class="parameter"><code>title</code></em> :</span></p></td><td> a string containing the font selection dialog title</td></tr></tbody></table></div><p class="since">Since 2.4</p></div><hr><div class="refsect2" lang="en"><a name="id4047408"></a><h3><a name="gtk-font-button-get-title"></a>gtk_font_button_get_title ()</h3><a class="indexterm" name="id4047424"></a><pre class="programlisting">const <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar">gchar</a>* gtk_font_button_get_title (<a class="link" href="GtkFontButton.html" title="GtkFontButton">GtkFontButton</a> *font_button);</pre><p>Retrieves the title of the font selection dialog.</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>font_button</code></em> :</span></p></td><td> a <a class="link" href="GtkFontButton.html" title="GtkFontButton"><span class="type">GtkFontButton</span></a></td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> an internal copy of the title string which must not be freed.</td></tr></tbody></table></div><p class="since">Since 2.4</p></div></div><div class="refsect1" lang="en"><a name="id4047503"></a><h2>Property Details</h2><div class="refsect2" lang="en"><a name="id4047514"></a><h3><a name="GtkFontButton--font-name"></a>The <code class="literal">"font-name"</code> property</h3><a class="indexterm" name="id4047530"></a><pre class="programlisting"> "font-name" <ahref="/usr/share/gtk-doc/html/gobject/gobject-Standard-Parameter-and-Value-Types.html#gchararray">gchararray</a> : Read / Write</pre><p>The name of the currently selected font.</p><p></p><p>Default value: "Sans 12"</p><p>Since 2.4</p></div><hr><div class="refsect2" lang="en"><a name="id4047566"></a><h3><a name="GtkFontButton--show-size"></a>The <code class="literal">"show-size"</code> property</h3><a class="indexterm" name="id4047582"></a><pre class="programlisting"> "show-size" <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a> : Read / Write</pre><p>If this property is set to <ahref="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>, the selected font size will be shown in the label. For a more WYSIWYG way to show the selected size, see the ::use-size property.</p><p></p><p>Default value: TRUE</p><p>Since 2.4</p></div><hr><div class="refsect2" lang="en"><a name="id4047630"></a><h3><a name="GtkFontButton--show-style"></a>The <code class="literal">"show-style"</code> property</h3><a class="indexterm" name="id4047646"></a><pre class="programlisting"> "show-style" <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a> : Read / Write</pre><p>If this property is set to <ahref="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>, the name of the selected font style will be shown in the label. For a more WYSIWYG way to show the selected style, see the ::use-font property.</p><p></p><p>Default value: TRUE</p><p>Since 2.4</p></div><hr><div class="refsect2" lang="en"><a name="id4047694"></a><h3><a name="GtkFontButton--title"></a>The <code class="literal">"title"</code> property</h3><a class="indexterm" name="id4047710"></a><pre class="programlisting"> "title" <ahref="/usr/share/gtk-doc/html/gobject/gobject-Standard-Parameter-and-Value-Types.html#gchararray">gchararray</a> : Read / Write</pre><p>The title of the font selection dialog.</p><p></p><p>Default value: "Pick a Font"</p><p>Since 2.4</p></div><hr><div class="refsect2" lang="en"><a name="id4047747"></a><h3><a name="GtkFontButton--use-font"></a>The <code class="literal">"use-font"</code> property</h3><a class="indexterm" name="id4047763"></a><pre class="programlisting"> "use-font" <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a> : Read / Write</pre><p>If this property is set to <ahref="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>, the label will be drawn in the selected font.</p><p></p><p>Default value: FALSE</p><p>Since 2.4</p></div><hr><div class="refsect2" lang="en"><a name="id4047809"></a><h3><a name="GtkFontButton--use-size"></a>The <code class="literal">"use-size"</code> property</h3><a class="indexterm" name="id4047825"></a><pre class="programlisting"> "use-size" <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a> : Read / Write</pre><p>If this property is set to <ahref="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>, the label will be drawn with the selected font size.</p><p></p><p>Default value: FALSE</p><p>Since 2.4</p></div></div><div class="refsect1" lang="en"><a name="id4047873"></a><h2>Signal Details</h2><div class="refsect2" lang="en"><a name="id4047883"></a><h3><a name="GtkFontButton-font-set"></a>The <code class="literal">"font-set"</code> signal</h3><a class="indexterm" name="id4047899"></a><pre class="programlisting">void user_function (<a class="link" href="GtkFontButton.html" title="GtkFontButton">GtkFontButton</a> *widget, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer">gpointer</a> user_data) : Run First</pre><p>The ::font-set signal is emitted when the user selects a font. When handling this signal, use <a class="link" href="GtkFontButton.html#gtk-font-button-get-font-name"><code class="function">gtk_font_button_get_font_name()</code></a> to find out which font was just selected.</p><p>Note that this signal is only emitted when the <span class="emphasis"><em>user</em></span>changes the font. If you need to react to programmatic font changesas well, use the notify::font-name 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> :</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> :</span></p></td><td>user data set when the signal handler was connected.</td></tr></tbody></table></div><p>Since 2.4</p></div></div><div class="refsect1" lang="en"><a name="id4048001"></a><h2>See Also</h2><p><a class="link" href="GtkFontSelectionDialog.html" title="GtkFontSelectionDialog"><span class="type">GtkFontSelectionDialog</span></a>, <a class="link" href="GtkColorButton.html" title="GtkColorButton"><span class="type">GtkColorButton</span></a>.</p></div><div class="refsect1" lang="en"><a name="id4048027"></a><div class="refsect2" lang="en"><a name="id4048028"></a></div><hr><div class="refsect2" lang="en"><a name="id4048030"></a></div></div></div></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -