gtk3/docs/reference/gtk/html/GtkFontButton.html
2017-12-21 20:47:04 -05:00

789 lines
39 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GtkFontButton: 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="SelectorWidgets.html" title="Selector Widgets and Dialogs">
<link rel="prev" href="GtkFontChooser.html" title="GtkFontChooser">
<link rel="next" href="GtkFontChooserWidget.html" title="GtkFontChooserWidget">
<meta name="generator" content="GTK-Doc V1.25.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="#GtkFontButton.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
<a href="#GtkFontButton.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_interfaces">  <span class="dim">|</span> 
<a href="#GtkFontButton.implemented-interfaces" class="shortcut">Implemented Interfaces</a></span><span id="nav_properties">  <span class="dim">|</span> 
<a href="#GtkFontButton.properties" class="shortcut">Properties</a></span><span id="nav_signals">  <span class="dim">|</span> 
<a href="#GtkFontButton.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="SelectorWidgets.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="GtkFontChooser.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="GtkFontChooserWidget.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="GtkFontButton"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="GtkFontButton.top_of_page"></a>GtkFontButton</span></h2>
<p>GtkFontButton — A button to launch a font chooser dialog</p>
</td>
<td class="gallery_image" valign="top" align="right"><img src="font-button.png"></td>
</tr></table></div>
<div class="refsect1">
<a name="GtkFontButton.functions"></a><h2>Functions</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="functions_return">
<col class="functions_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="GtkFontButton.html#gtk-font-button-new" title="gtk_font_button_new ()">gtk_font_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="GtkFontButton.html#gtk-font-button-new-with-font" title="gtk_font_button_new_with_font ()">gtk_font_button_new_with_font</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="GtkFontButton.html#gtk-font-button-set-font-name" title="gtk_font_button_set_font_name ()">gtk_font_button_set_font_name</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
</td>
<td class="function_name">
<a class="link" href="GtkFontButton.html#gtk-font-button-get-font-name" title="gtk_font_button_get_font_name ()">gtk_font_button_get_font_name</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="GtkFontButton.html#gtk-font-button-set-show-style" title="gtk_font_button_set_show_style ()">gtk_font_button_set_show_style</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="GtkFontButton.html#gtk-font-button-get-show-style" title="gtk_font_button_get_show_style ()">gtk_font_button_get_show_style</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="GtkFontButton.html#gtk-font-button-set-show-size" title="gtk_font_button_set_show_size ()">gtk_font_button_set_show_size</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="GtkFontButton.html#gtk-font-button-get-show-size" title="gtk_font_button_get_show_size ()">gtk_font_button_get_show_size</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="GtkFontButton.html#gtk-font-button-set-use-font" title="gtk_font_button_set_use_font ()">gtk_font_button_set_use_font</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="GtkFontButton.html#gtk-font-button-get-use-font" title="gtk_font_button_get_use_font ()">gtk_font_button_get_use_font</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="GtkFontButton.html#gtk-font-button-set-use-size" title="gtk_font_button_set_use_size ()">gtk_font_button_set_use_size</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="GtkFontButton.html#gtk-font-button-get-use-size" title="gtk_font_button_get_use_size ()">gtk_font_button_get_use_size</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="GtkFontButton.html#gtk-font-button-set-title" title="gtk_font_button_set_title ()">gtk_font_button_set_title</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
</td>
<td class="function_name">
<a class="link" href="GtkFontButton.html#gtk-font-button-get-title" title="gtk_font_button_get_title ()">gtk_font_button_get_title</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GtkFontButton.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">
<a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *</td>
<td class="property_name"><a class="link" href="GtkFontButton.html#GtkFontButton--font-name" title="The “font-name” property">font-name</a></td>
<td class="property_flags">Read / Write</td>
</tr>
<tr>
<td class="property_type"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></td>
<td class="property_name"><a class="link" href="GtkFontButton.html#GtkFontButton--show-size" title="The “show-size” property">show-size</a></td>
<td class="property_flags">Read / Write</td>
</tr>
<tr>
<td class="property_type"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></td>
<td class="property_name"><a class="link" href="GtkFontButton.html#GtkFontButton--show-style" title="The “show-style” property">show-style</a></td>
<td class="property_flags">Read / Write</td>
</tr>
<tr>
<td class="property_type">
<a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *</td>
<td class="property_name"><a class="link" href="GtkFontButton.html#GtkFontButton--title" title="The “title” property">title</a></td>
<td class="property_flags">Read / Write</td>
</tr>
<tr>
<td class="property_type"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></td>
<td class="property_name"><a class="link" href="GtkFontButton.html#GtkFontButton--use-font" title="The “use-font” property">use-font</a></td>
<td class="property_flags">Read / Write</td>
</tr>
<tr>
<td class="property_type"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></td>
<td class="property_name"><a class="link" href="GtkFontButton.html#GtkFontButton--use-size" title="The “use-size” property">use-size</a></td>
<td class="property_flags">Read / Write</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GtkFontButton.signals"></a><h2>Signals</h2>
<div class="informaltable"><table class="informaltable" border="0">
<colgroup>
<col width="150px" class="signals_return">
<col width="300px" class="signals_name">
<col width="200px" class="signals_flags">
</colgroup>
<tbody><tr>
<td class="signal_type"><span class="returnvalue">void</span></td>
<td class="signal_name"><a class="link" href="GtkFontButton.html#GtkFontButton-font-set" title="The “font-set” signal">font-set</a></td>
<td class="signal_flags"><a href="../gobject/gobject-Signals.html#G-SIGNAL-RUN-FIRST:CAPS">Run First</a></td>
</tr></tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GtkFontButton.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="name">
<col class="description">
</colgroup>
<tbody><tr>
<td class="datatype_keyword">struct</td>
<td class="function_name"><a class="link" href="GtkFontButton.html#GtkFontButton-struct" title="struct GtkFontButton">GtkFontButton</a></td>
</tr></tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GtkFontButton.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="screen"> <a href="../gobject/gobject-The-Base-Object-Type.html#GObject-struct">GObject</a>
<span class="lineart">╰──</span> <a href="../gobject/gobject-The-Base-Object-Type.html#GInitiallyUnowned">GInitiallyUnowned</a>
<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> <a class="link" href="GtkButton.html" title="GtkButton">GtkButton</a>
<span class="lineart">╰──</span> GtkFontButton
</pre>
</div>
<div class="refsect1">
<a name="GtkFontButton.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
<p>
GtkFontButton implements
AtkImplementorIface, <a class="link" href="GtkBuildable.html" title="GtkBuildable">GtkBuildable</a>, <a class="link" href="GtkActionable.html" title="GtkActionable">GtkActionable</a>, <a class="link" href="GtkActivatable.html" title="GtkActivatable">GtkActivatable</a> and <a class="link" href="GtkFontChooser.html" title="GtkFontChooser">GtkFontChooser</a>.</p>
</div>
<div class="refsect1">
<a name="GtkFontButton.includes"></a><h2>Includes</h2>
<pre class="synopsis">#include &lt;gtk/gtk.h&gt;
</pre>
</div>
<div class="refsect1">
<a name="GtkFontButton.description"></a><h2>Description</h2>
<p>The <a class="link" href="GtkFontButton.html" title="GtkFontButton"><span class="type">GtkFontButton</span></a> is a button which displays the currently selected
font an allows to open a font chooser dialog to change the font.
It is suitable widget for selecting a font in a preference dialog.</p>
<div class="refsect2">
<a name="id-1.3.14.13.10.3"></a><h3>CSS nodes</h3>
<p>GtkFontButton has a single CSS node with name button and style class .font.</p>
</div>
</div>
<div class="refsect1">
<a name="GtkFontButton.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="gtk-font-button-new"></a><h3>gtk_font_button_new ()</h3>
<pre class="programlisting"><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *
gtk_font_button_new (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Creates a new font picker widget.</p>
<div class="refsect3">
<a name="gtk-font-button-new.returns"></a><h4>Returns</h4>
<p> a new font picker widget.</p>
</div>
<p class="since">Since: 2.4</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-font-button-new-with-font"></a><h3>gtk_font_button_new_with_font ()</h3>
<pre class="programlisting"><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *
gtk_font_button_new_with_font (<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *fontname</code></em>);</pre>
<p>Creates a new font picker widget.</p>
<div class="refsect3">
<a name="gtk-font-button-new-with-font.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>fontname</p></td>
<td class="parameter_description"><p>Name of font to display in font chooser dialog</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-font-button-new-with-font.returns"></a><h4>Returns</h4>
<p> a new font picker widget.</p>
</div>
<p class="since">Since: 2.4</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-font-button-set-font-name"></a><h3>gtk_font_button_set_font_name ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
gtk_font_button_set_font_name (<em class="parameter"><code><a class="link" href="GtkFontButton.html" title="GtkFontButton"><span class="type">GtkFontButton</span></a> *font_button</code></em>,
<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *fontname</code></em>);</pre>
<p>Sets or updates the currently-displayed font in font picker dialog.</p>
<div class="refsect3">
<a name="gtk-font-button-set-font-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>font_button</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkFontButton.html" title="GtkFontButton"><span class="type">GtkFontButton</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>fontname</p></td>
<td class="parameter_description"><p>Name of font to display in font chooser dialog</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-font-button-set-font-name.returns"></a><h4>Returns</h4>
<p> <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a></p>
</div>
<p class="since">Since: 2.4</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-font-button-get-font-name"></a><h3>gtk_font_button_get_font_name ()</h3>
<pre class="programlisting">const <a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
gtk_font_button_get_font_name (<em class="parameter"><code><a class="link" href="GtkFontButton.html" title="GtkFontButton"><span class="type">GtkFontButton</span></a> *font_button</code></em>);</pre>
<p>Retrieves the name of the currently selected font. This name includes
style and size information as well. If you want to render something
with the font, use this string with <a href="../pango/pango-Fonts.html#pango-font-description-from-string"><code class="function">pango_font_description_from_string()</code></a> .
If youre interested in peeking certain values (family name,
style, size, weight) just query these properties from the
<a href="../pango/pango-Fonts.html#PangoFontDescription-struct"><span class="type">PangoFontDescription</span></a> object.</p>
<div class="refsect3">
<a name="gtk-font-button-get-font-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>font_button</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkFontButton.html" title="GtkFontButton"><span class="type">GtkFontButton</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-font-button-get-font-name.returns"></a><h4>Returns</h4>
<p> an internal copy of the font name which must not be freed.</p>
</div>
<p class="since">Since: 2.4</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-font-button-set-show-style"></a><h3>gtk_font_button_set_show_style ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gtk_font_button_set_show_style (<em class="parameter"><code><a class="link" href="GtkFontButton.html" title="GtkFontButton"><span class="type">GtkFontButton</span></a> *font_button</code></em>,
<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> show_style</code></em>);</pre>
<p>If <em class="parameter"><code>show_style</code></em>
is <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>, the font style will be displayed along with name of the selected font.</p>
<div class="refsect3">
<a name="gtk-font-button-set-show-style.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>font_button</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkFontButton.html" title="GtkFontButton"><span class="type">GtkFontButton</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>show_style</p></td>
<td class="parameter_description"><p><a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if font style should be displayed in label.</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-font-button-get-show-style"></a><h3>gtk_font_button_get_show_style ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
gtk_font_button_get_show_style (<em class="parameter"><code><a class="link" href="GtkFontButton.html" title="GtkFontButton"><span class="type">GtkFontButton</span></a> *font_button</code></em>);</pre>
<p>Returns whether the name of the font style will be shown in the label.</p>
<div class="refsect3">
<a name="gtk-font-button-get-show-style.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>font_button</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkFontButton.html" title="GtkFontButton"><span class="type">GtkFontButton</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-font-button-get-show-style.returns"></a><h4>Returns</h4>
<p> whether the font style will be shown in the label.</p>
</div>
<p class="since">Since: 2.4</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-font-button-set-show-size"></a><h3>gtk_font_button_set_show_size ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gtk_font_button_set_show_size (<em class="parameter"><code><a class="link" href="GtkFontButton.html" title="GtkFontButton"><span class="type">GtkFontButton</span></a> *font_button</code></em>,
<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> show_size</code></em>);</pre>
<p>If <em class="parameter"><code>show_size</code></em>
is <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>, the font size will be displayed along with the name of the selected font.</p>
<div class="refsect3">
<a name="gtk-font-button-set-show-size.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>font_button</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkFontButton.html" title="GtkFontButton"><span class="type">GtkFontButton</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>show_size</p></td>
<td class="parameter_description"><p><a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if font size should be displayed in dialog.</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-font-button-get-show-size"></a><h3>gtk_font_button_get_show_size ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
gtk_font_button_get_show_size (<em class="parameter"><code><a class="link" href="GtkFontButton.html" title="GtkFontButton"><span class="type">GtkFontButton</span></a> *font_button</code></em>);</pre>
<p>Returns whether the font size will be shown in the label.</p>
<div class="refsect3">
<a name="gtk-font-button-get-show-size.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>font_button</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkFontButton.html" title="GtkFontButton"><span class="type">GtkFontButton</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-font-button-get-show-size.returns"></a><h4>Returns</h4>
<p> whether the font size will be shown in the label.</p>
</div>
<p class="since">Since: 2.4</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-font-button-set-use-font"></a><h3>gtk_font_button_set_use_font ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gtk_font_button_set_use_font (<em class="parameter"><code><a class="link" href="GtkFontButton.html" title="GtkFontButton"><span class="type">GtkFontButton</span></a> *font_button</code></em>,
<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> use_font</code></em>);</pre>
<p>If <em class="parameter"><code>use_font</code></em>
is <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>, the font name will be written using the selected font.</p>
<div class="refsect3">
<a name="gtk-font-button-set-use-font.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>font_button</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkFontButton.html" title="GtkFontButton"><span class="type">GtkFontButton</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>use_font</p></td>
<td class="parameter_description"><p>If <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>, font name will be written using font chosen.</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-font-button-get-use-font"></a><h3>gtk_font_button_get_use_font ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
gtk_font_button_get_use_font (<em class="parameter"><code><a class="link" href="GtkFontButton.html" title="GtkFontButton"><span class="type">GtkFontButton</span></a> *font_button</code></em>);</pre>
<p>Returns whether the selected font is used in the label.</p>
<div class="refsect3">
<a name="gtk-font-button-get-use-font.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>font_button</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkFontButton.html" title="GtkFontButton"><span class="type">GtkFontButton</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-font-button-get-use-font.returns"></a><h4>Returns</h4>
<p> whether the selected font is used in the label.</p>
</div>
<p class="since">Since: 2.4</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-font-button-set-use-size"></a><h3>gtk_font_button_set_use_size ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gtk_font_button_set_use_size (<em class="parameter"><code><a class="link" href="GtkFontButton.html" title="GtkFontButton"><span class="type">GtkFontButton</span></a> *font_button</code></em>,
<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> use_size</code></em>);</pre>
<p>If <em class="parameter"><code>use_size</code></em>
is <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>, the font name will be written using the selected size.</p>
<div class="refsect3">
<a name="gtk-font-button-set-use-size.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>font_button</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkFontButton.html" title="GtkFontButton"><span class="type">GtkFontButton</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>use_size</p></td>
<td class="parameter_description"><p>If <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>, font name will be written using the selected size.</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-font-button-get-use-size"></a><h3>gtk_font_button_get_use_size ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
gtk_font_button_get_use_size (<em class="parameter"><code><a class="link" href="GtkFontButton.html" title="GtkFontButton"><span class="type">GtkFontButton</span></a> *font_button</code></em>);</pre>
<p>Returns whether the selected size is used in the label.</p>
<div class="refsect3">
<a name="gtk-font-button-get-use-size.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>font_button</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkFontButton.html" title="GtkFontButton"><span class="type">GtkFontButton</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-font-button-get-use-size.returns"></a><h4>Returns</h4>
<p> whether the selected size is used in the label.</p>
</div>
<p class="since">Since: 2.4</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-font-button-set-title"></a><h3>gtk_font_button_set_title ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gtk_font_button_set_title (<em class="parameter"><code><a class="link" href="GtkFontButton.html" title="GtkFontButton"><span class="type">GtkFontButton</span></a> *font_button</code></em>,
<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *title</code></em>);</pre>
<p>Sets the title for the font chooser dialog.</p>
<div class="refsect3">
<a name="gtk-font-button-set-title.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>font_button</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkFontButton.html" title="GtkFontButton"><span class="type">GtkFontButton</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>title</p></td>
<td class="parameter_description"><p>a string containing the font chooser dialog title</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-font-button-get-title"></a><h3>gtk_font_button_get_title ()</h3>
<pre class="programlisting">const <a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
gtk_font_button_get_title (<em class="parameter"><code><a class="link" href="GtkFontButton.html" title="GtkFontButton"><span class="type">GtkFontButton</span></a> *font_button</code></em>);</pre>
<p>Retrieves the title of the font chooser dialog.</p>
<div class="refsect3">
<a name="gtk-font-button-get-title.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>font_button</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkFontButton.html" title="GtkFontButton"><span class="type">GtkFontButton</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-font-button-get-title.returns"></a><h4>Returns</h4>
<p> an internal copy of the title string which must not be freed.</p>
</div>
<p class="since">Since: 2.4</p>
</div>
</div>
<div class="refsect1">
<a name="GtkFontButton.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="GtkFontButton-struct"></a><h3>struct GtkFontButton</h3>
<pre class="programlisting">struct GtkFontButton;</pre>
</div>
</div>
<div class="refsect1">
<a name="GtkFontButton.property-details"></a><h2>Property Details</h2>
<div class="refsect2">
<a name="GtkFontButton--font-name"></a><h3>The <code class="literal">“font-name”</code> property</h3>
<pre class="programlisting"> “font-name” <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *</pre>
<p>The name of the currently selected font.</p>
<p>Flags: Read / Write</p>
<p>Default value: "Sans 12"</p>
<p class="since">Since: 2.4</p>
</div>
<hr>
<div class="refsect2">
<a name="GtkFontButton--show-size"></a><h3>The <code class="literal">“show-size”</code> property</h3>
<pre class="programlisting"> “show-size” <a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></pre>
<p>If this property is set to <a href="../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>Flags: Read / Write</p>
<p>Default value: TRUE</p>
<p class="since">Since: 2.4</p>
</div>
<hr>
<div class="refsect2">
<a name="GtkFontButton--show-style"></a><h3>The <code class="literal">“show-style”</code> property</h3>
<pre class="programlisting"> “show-style” <a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></pre>
<p>If this property is set to <a href="../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>Flags: Read / Write</p>
<p>Default value: TRUE</p>
<p class="since">Since: 2.4</p>
</div>
<hr>
<div class="refsect2">
<a name="GtkFontButton--title"></a><h3>The <code class="literal">“title”</code> property</h3>
<pre class="programlisting"> “title” <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *</pre>
<p>The title of the font chooser dialog.</p>
<p>Flags: Read / Write</p>
<p>Default value: "Pick a Font"</p>
<p class="since">Since: 2.4</p>
</div>
<hr>
<div class="refsect2">
<a name="GtkFontButton--use-font"></a><h3>The <code class="literal">“use-font”</code> property</h3>
<pre class="programlisting"> “use-font” <a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></pre>
<p>If this property is set to <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>, the label will be drawn
in the selected font.</p>
<p>Flags: Read / Write</p>
<p>Default value: FALSE</p>
<p class="since">Since: 2.4</p>
</div>
<hr>
<div class="refsect2">
<a name="GtkFontButton--use-size"></a><h3>The <code class="literal">“use-size”</code> property</h3>
<pre class="programlisting"> “use-size” <a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></pre>
<p>If this property is set to <a href="../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>Flags: Read / Write</p>
<p>Default value: FALSE</p>
<p class="since">Since: 2.4</p>
</div>
</div>
<div class="refsect1">
<a name="GtkFontButton.signal-details"></a><h2>Signal Details</h2>
<div class="refsect2">
<a name="GtkFontButton-font-set"></a><h3>The <code class="literal">“font-set”</code> signal</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
user_function (<a class="link" href="GtkFontButton.html" title="GtkFontButton"><span class="type">GtkFontButton</span></a> *widget,
<a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data)</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" title="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 user
changes the font. If you need to react to programmatic font changes
as well, use the notify::font-name signal.</p>
<div class="refsect3">
<a name="GtkFontButton-font-set.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: <a href="../gobject/gobject-Signals.html#G-SIGNAL-RUN-FIRST:CAPS">Run First</a></p>
<p class="since">Since: 2.4</p>
</div>
</div>
<div class="refsect1">
<a name="GtkFontButton.see-also"></a><h2>See Also</h2>
<p><a class="link" href="GtkFontChooserDialog.html" title="GtkFontChooserDialog"><span class="type">GtkFontChooserDialog</span></a>, <a class="link" href="GtkColorButton.html" title="GtkColorButton"><span class="type">GtkColorButton</span></a>.</p>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.25.1</div>
</body>
</html>