8
8
<link rel="up" href="SelectorWidgets.html" title="Selectors (File/Font/Color/Input Devices)">
9
9
<link rel="prev" href="GtkFontButton.html" title="GtkFontButton">
10
10
<link rel="next" href="GtkFontSelectionDialog.html" title="GtkFontSelectionDialog">
11
<meta name="generator" content="GTK-Doc V1.18 (XML mode)">
11
<meta name="generator" content="GTK-Doc V1.18.1 (XML mode)">
12
12
<link rel="stylesheet" href="style.css" type="text/css">
14
14
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
49
49
struct <a class="link" href="GtkFontSelection.html#GtkFontSelection-struct" title="struct GtkFontSelection">GtkFontSelection</a>;
50
50
<a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> * <a class="link" href="GtkFontSelection.html#gtk-font-selection-new" title="gtk_font_selection_new ()">gtk_font_selection_new</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
51
<a href="../gdk/gdk-Fonts.html#GdkFont"><span class="returnvalue">GdkFont</span></a> * <a class="link" href="GtkFontSelection.html#gtk-font-selection-get-font" title="gtk_font_selection_get_font ()">gtk_font_selection_get_font</a> (<em class="parameter"><code><a class="link" href="GtkFontSelection.html" title="GtkFontSelection"><span class="type">GtkFontSelection</span></a> *fontsel</code></em>);
52
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * <a class="link" href="GtkFontSelection.html#gtk-font-selection-get-font-name" title="gtk_font_selection_get_font_name ()">gtk_font_selection_get_font_name</a> (<em class="parameter"><code><a class="link" href="GtkFontSelection.html" title="GtkFontSelection"><span class="type">GtkFontSelection</span></a> *fontsel</code></em>);
53
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="GtkFontSelection.html#gtk-font-selection-set-font-name" title="gtk_font_selection_set_font_name ()">gtk_font_selection_set_font_name</a> (<em class="parameter"><code><a class="link" href="GtkFontSelection.html" title="GtkFontSelection"><span class="type">GtkFontSelection</span></a> *fontsel</code></em>,
54
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *fontname</code></em>);
55
const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * <a class="link" href="GtkFontSelection.html#gtk-font-selection-get-preview-text" title="gtk_font_selection_get_preview_text ()">gtk_font_selection_get_preview_text</a> (<em class="parameter"><code><a class="link" href="GtkFontSelection.html" title="GtkFontSelection"><span class="type">GtkFontSelection</span></a> *fontsel</code></em>);
51
<a href="http://library.gnome.org/devel/gdk3/gdk-Fonts.html#GdkFont"><span class="returnvalue">GdkFont</span></a> * <a class="link" href="GtkFontSelection.html#gtk-font-selection-get-font" title="gtk_font_selection_get_font ()">gtk_font_selection_get_font</a> (<em class="parameter"><code><a class="link" href="GtkFontSelection.html" title="GtkFontSelection"><span class="type">GtkFontSelection</span></a> *fontsel</code></em>);
52
<span class="returnvalue">gchar</span> * <a class="link" href="GtkFontSelection.html#gtk-font-selection-get-font-name" title="gtk_font_selection_get_font_name ()">gtk_font_selection_get_font_name</a> (<em class="parameter"><code><a class="link" href="GtkFontSelection.html" title="GtkFontSelection"><span class="type">GtkFontSelection</span></a> *fontsel</code></em>);
53
<span class="returnvalue">gboolean</span> <a class="link" href="GtkFontSelection.html#gtk-font-selection-set-font-name" title="gtk_font_selection_set_font_name ()">gtk_font_selection_set_font_name</a> (<em class="parameter"><code><a class="link" href="GtkFontSelection.html" title="GtkFontSelection"><span class="type">GtkFontSelection</span></a> *fontsel</code></em>,
54
<em class="parameter"><code>const <span class="type">gchar</span> *fontname</code></em>);
55
const <span class="returnvalue">gchar</span> * <a class="link" href="GtkFontSelection.html#gtk-font-selection-get-preview-text" title="gtk_font_selection_get_preview_text ()">gtk_font_selection_get_preview_text</a> (<em class="parameter"><code><a class="link" href="GtkFontSelection.html" title="GtkFontSelection"><span class="type">GtkFontSelection</span></a> *fontsel</code></em>);
56
56
<span class="returnvalue">void</span> <a class="link" href="GtkFontSelection.html#gtk-font-selection-set-preview-text" title="gtk_font_selection_set_preview_text ()">gtk_font_selection_set_preview_text</a> (<em class="parameter"><code><a class="link" href="GtkFontSelection.html" title="GtkFontSelection"><span class="type">GtkFontSelection</span></a> *fontsel</code></em>,
57
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *text</code></em>);
58
<a href="/usr/share/gtk-doc/html/pango/pango-Fonts.html#PangoFontFace"><span class="returnvalue">PangoFontFace</span></a> * <a class="link" href="GtkFontSelection.html#gtk-font-selection-get-face" title="gtk_font_selection_get_face ()">gtk_font_selection_get_face</a> (<em class="parameter"><code><a class="link" href="GtkFontSelection.html" title="GtkFontSelection"><span class="type">GtkFontSelection</span></a> *fontsel</code></em>);
57
<em class="parameter"><code>const <span class="type">gchar</span> *text</code></em>);
58
<a href="/home/mclasen/gnome/share/gtk-doc/html/pango/pango-Fonts.html#PangoFontFace"><span class="returnvalue">PangoFontFace</span></a> * <a class="link" href="GtkFontSelection.html#gtk-font-selection-get-face" title="gtk_font_selection_get_face ()">gtk_font_selection_get_face</a> (<em class="parameter"><code><a class="link" href="GtkFontSelection.html" title="GtkFontSelection"><span class="type">GtkFontSelection</span></a> *fontsel</code></em>);
59
59
<a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> * <a class="link" href="GtkFontSelection.html#gtk-font-selection-get-face-list" title="gtk_font_selection_get_face_list ()">gtk_font_selection_get_face_list</a> (<em class="parameter"><code><a class="link" href="GtkFontSelection.html" title="GtkFontSelection"><span class="type">GtkFontSelection</span></a> *fontsel</code></em>);
60
<a href="/usr/share/gtk-doc/html/pango/pango-Fonts.html#PangoFontFamily"><span class="returnvalue">PangoFontFamily</span></a> * <a class="link" href="GtkFontSelection.html#gtk-font-selection-get-family" title="gtk_font_selection_get_family ()">gtk_font_selection_get_family</a> (<em class="parameter"><code><a class="link" href="GtkFontSelection.html" title="GtkFontSelection"><span class="type">GtkFontSelection</span></a> *fontsel</code></em>);
61
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a> <a class="link" href="GtkFontSelection.html#gtk-font-selection-get-size" title="gtk_font_selection_get_size ()">gtk_font_selection_get_size</a> (<em class="parameter"><code><a class="link" href="GtkFontSelection.html" title="GtkFontSelection"><span class="type">GtkFontSelection</span></a> *fontsel</code></em>);
60
<a href="/home/mclasen/gnome/share/gtk-doc/html/pango/pango-Fonts.html#PangoFontFamily"><span class="returnvalue">PangoFontFamily</span></a> * <a class="link" href="GtkFontSelection.html#gtk-font-selection-get-family" title="gtk_font_selection_get_family ()">gtk_font_selection_get_family</a> (<em class="parameter"><code><a class="link" href="GtkFontSelection.html" title="GtkFontSelection"><span class="type">GtkFontSelection</span></a> *fontsel</code></em>);
61
<span class="returnvalue">gint</span> <a class="link" href="GtkFontSelection.html#gtk-font-selection-get-size" title="gtk_font_selection_get_size ()">gtk_font_selection_get_size</a> (<em class="parameter"><code><a class="link" href="GtkFontSelection.html" title="GtkFontSelection"><span class="type">GtkFontSelection</span></a> *fontsel</code></em>);
62
62
<a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> * <a class="link" href="GtkFontSelection.html#gtk-font-selection-get-family-list" title="gtk_font_selection_get_family_list ()">gtk_font_selection_get_family_list</a> (<em class="parameter"><code><a class="link" href="GtkFontSelection.html" title="GtkFontSelection"><span class="type">GtkFontSelection</span></a> *fontsel</code></em>);
63
63
<a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> * <a class="link" href="GtkFontSelection.html#gtk-font-selection-get-preview-entry" title="gtk_font_selection_get_preview_entry ()">gtk_font_selection_get_preview_entry</a>
64
64
(<em class="parameter"><code><a class="link" href="GtkFontSelection.html" title="GtkFontSelection"><span class="type">GtkFontSelection</span></a> *fontsel</code></em>);
88
88
<div class="refsect1">
89
89
<a name="GtkFontSelection.properties"></a><h2>Properties</h2>
90
90
<pre class="synopsis">
91
"<a class="link" href="GtkFontSelection.html#GtkFontSelection--font" title='The "font" property'>font</a>" <a href="../gdk/gdk-Fonts.html#GdkFont"><span class="type">GdkFont</span></a>* : Read
92
"<a class="link" href="GtkFontSelection.html#GtkFontSelection--font-name" title='The "font-name" property'>font-name</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>* : Read / Write
93
"<a class="link" href="GtkFontSelection.html#GtkFontSelection--preview-text" title='The "preview-text" property'>preview-text</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>* : Read / Write
91
"<a class="link" href="GtkFontSelection.html#GtkFontSelection--font" title='The "font" property'>font</a>" <a href="http://library.gnome.org/devel/gdk3/gdk-Fonts.html#GdkFont"><span class="type">GdkFont</span></a>* : Read
92
"<a class="link" href="GtkFontSelection.html#GtkFontSelection--font-name" title='The "font-name" property'>font-name</a>" <span class="type">gchar</span>* : Read / Write
93
"<a class="link" href="GtkFontSelection.html#GtkFontSelection--preview-text" title='The "preview-text" property'>preview-text</a>" <span class="type">gchar</span>* : Read / Write
96
96
<div class="refsect1">
146
146
<div class="refsect2">
147
147
<a name="gtk-font-selection-get-font"></a><h3>gtk_font_selection_get_font ()</h3>
148
<pre class="programlisting"><a href="../gdk/gdk-Fonts.html#GdkFont"><span class="returnvalue">GdkFont</span></a> * gtk_font_selection_get_font (<em class="parameter"><code><a class="link" href="GtkFontSelection.html" title="GtkFontSelection"><span class="type">GtkFontSelection</span></a> *fontsel</code></em>);</pre>
148
<pre class="programlisting"><a href="http://library.gnome.org/devel/gdk3/gdk-Fonts.html#GdkFont"><span class="returnvalue">GdkFont</span></a> * gtk_font_selection_get_font (<em class="parameter"><code><a class="link" href="GtkFontSelection.html" title="GtkFontSelection"><span class="type">GtkFontSelection</span></a> *fontsel</code></em>);</pre>
149
149
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
150
150
<h3 class="title">Warning</h3>
151
151
<p><code class="literal">gtk_font_selection_get_font</code> has been deprecated since version 2.0 and should not be used in newly-written code. Use <a class="link" href="GtkFontSelection.html#gtk-font-selection-get-font-name" title="gtk_font_selection_get_font_name ()"><code class="function">gtk_font_selection_get_font_name()</code></a> instead.</p>
183
183
<a class="link" href="GtkFontSelection.html#gtk-font-selection-set-font-name" title="gtk_font_selection_set_font_name ()"><code class="function">gtk_font_selection_set_font_name()</code></a>, as the font selection widget may
184
184
normalize font names and thus return a string with a different structure.
185
185
For example, "Helvetica Italic Bold 12" could be normalized to
186
"Helvetica Bold Italic 12". Use <a href="/usr/share/gtk-doc/html/pango/pango-Fonts.html#pango-font-description-equal"><code class="function">pango_font_description_equal()</code></a>
186
"Helvetica Bold Italic 12". Use <a href="/home/mclasen/gnome/share/gtk-doc/html/pango/pango-Fonts.html#pango-font-description-equal"><code class="function">pango_font_description_equal()</code></a>
187
187
if you want to compare two font descriptions.
189
189
<div class="variablelist"><table border="0" class="variablelist">
201
201
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
202
<td>A string with the name of the current font, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if
203
no font is selected. You must free this string with <a href="http://library.gnome.org/devel/glib/unstable/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a>.</td>
202
<td>A string with the name of the current font, or <a href="/home/mclasen/gnome/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a> if
203
no font is selected. You must free this string with <code class="function">g_free()</code>.</td>
209
209
<div class="refsect2">
210
210
<a name="gtk-font-selection-set-font-name"></a><h3>gtk_font_selection_set_font_name ()</h3>
211
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> gtk_font_selection_set_font_name (<em class="parameter"><code><a class="link" href="GtkFontSelection.html" title="GtkFontSelection"><span class="type">GtkFontSelection</span></a> *fontsel</code></em>,
212
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *fontname</code></em>);</pre>
211
<pre class="programlisting"><span class="returnvalue">gboolean</span> gtk_font_selection_set_font_name (<em class="parameter"><code><a class="link" href="GtkFontSelection.html" title="GtkFontSelection"><span class="type">GtkFontSelection</span></a> *fontsel</code></em>,
212
<em class="parameter"><code>const <span class="type">gchar</span> *fontname</code></em>);</pre>
214
214
Sets the currently-selected font.
274
274
<div class="refsect2">
275
275
<a name="gtk-font-selection-set-preview-text"></a><h3>gtk_font_selection_set_preview_text ()</h3>
276
276
<pre class="programlisting"><span class="returnvalue">void</span> gtk_font_selection_set_preview_text (<em class="parameter"><code><a class="link" href="GtkFontSelection.html" title="GtkFontSelection"><span class="type">GtkFontSelection</span></a> *fontsel</code></em>,
277
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *text</code></em>);</pre>
277
<em class="parameter"><code>const <span class="type">gchar</span> *text</code></em>);</pre>
279
279
Sets the text displayed in the preview area.
280
280
The <em class="parameter"><code>text</code></em> is used to show how the selected font looks.
301
301
<div class="refsect2">
302
302
<a name="gtk-font-selection-get-face"></a><h3>gtk_font_selection_get_face ()</h3>
303
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/pango/pango-Fonts.html#PangoFontFace"><span class="returnvalue">PangoFontFace</span></a> * gtk_font_selection_get_face (<em class="parameter"><code><a class="link" href="GtkFontSelection.html" title="GtkFontSelection"><span class="type">GtkFontSelection</span></a> *fontsel</code></em>);</pre>
303
<pre class="programlisting"><a href="/home/mclasen/gnome/share/gtk-doc/html/pango/pango-Fonts.html#PangoFontFace"><span class="returnvalue">PangoFontFace</span></a> * gtk_font_selection_get_face (<em class="parameter"><code><a class="link" href="GtkFontSelection.html" title="GtkFontSelection"><span class="type">GtkFontSelection</span></a> *fontsel</code></em>);</pre>
305
Gets the <a href="/usr/share/gtk-doc/html/pango/pango-Fonts.html#PangoFontFace"><span class="type">PangoFontFace</span></a> representing the selected font group
305
Gets the <a href="/home/mclasen/gnome/share/gtk-doc/html/pango/pango-Fonts.html#PangoFontFace"><span class="type">PangoFontFace</span></a> representing the selected font group
306
306
details (i.e. family, slant, weight, width, etc).
308
308
<div class="variablelist"><table border="0" class="variablelist">
320
320
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
321
<td>A <a href="/usr/share/gtk-doc/html/pango/pango-Fonts.html#PangoFontFace"><span class="type">PangoFontFace</span></a> representing the
321
<td>A <a href="/home/mclasen/gnome/share/gtk-doc/html/pango/pango-Fonts.html#PangoFontFace"><span class="type">PangoFontFace</span></a> representing the
322
322
selected font group details. The returned object is owned by
323
323
<em class="parameter"><code>fontsel</code></em> and must not be modified or freed. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
359
359
<div class="refsect2">
360
360
<a name="gtk-font-selection-get-family"></a><h3>gtk_font_selection_get_family ()</h3>
361
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/pango/pango-Fonts.html#PangoFontFamily"><span class="returnvalue">PangoFontFamily</span></a> * gtk_font_selection_get_family (<em class="parameter"><code><a class="link" href="GtkFontSelection.html" title="GtkFontSelection"><span class="type">GtkFontSelection</span></a> *fontsel</code></em>);</pre>
361
<pre class="programlisting"><a href="/home/mclasen/gnome/share/gtk-doc/html/pango/pango-Fonts.html#PangoFontFamily"><span class="returnvalue">PangoFontFamily</span></a> * gtk_font_selection_get_family (<em class="parameter"><code><a class="link" href="GtkFontSelection.html" title="GtkFontSelection"><span class="type">GtkFontSelection</span></a> *fontsel</code></em>);</pre>
363
Gets the <a href="/usr/share/gtk-doc/html/pango/pango-Fonts.html#PangoFontFamily"><span class="type">PangoFontFamily</span></a> representing the selected font family.
363
Gets the <a href="/home/mclasen/gnome/share/gtk-doc/html/pango/pango-Fonts.html#PangoFontFamily"><span class="type">PangoFontFamily</span></a> representing the selected font family.
365
365
<div class="variablelist"><table border="0" class="variablelist">
377
377
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
378
<td>A <a href="/usr/share/gtk-doc/html/pango/pango-Fonts.html#PangoFontFamily"><span class="type">PangoFontFamily</span></a> representing the
378
<td>A <a href="/home/mclasen/gnome/share/gtk-doc/html/pango/pango-Fonts.html#PangoFontFamily"><span class="type">PangoFontFamily</span></a> representing the
379
379
selected font family. Font families are a collection of font
380
380
faces. The returned object is owned by <em class="parameter"><code>fontsel</code></em> and must not
381
381
be modified or freed. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
528
528
<a name="GtkFontSelection.property-details"></a><h2>Property Details</h2>
529
529
<div class="refsect2">
530
530
<a name="GtkFontSelection--font"></a><h3>The <code class="literal">"font"</code> property</h3>
531
<pre class="programlisting"> "font" <a href="../gdk/gdk-Fonts.html#GdkFont"><span class="type">GdkFont</span></a>* : Read</pre>
531
<pre class="programlisting"> "font" <a href="http://library.gnome.org/devel/gdk3/gdk-Fonts.html#GdkFont"><span class="type">GdkFont</span></a>* : Read</pre>
532
532
<p>The GdkFont that is currently selected.</p>
535
535
<div class="refsect2">
536
536
<a name="GtkFontSelection--font-name"></a><h3>The <code class="literal">"font-name"</code> property</h3>
537
<pre class="programlisting"> "font-name" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>* : Read / Write</pre>
537
<pre class="programlisting"> "font-name" <span class="type">gchar</span>* : Read / Write</pre>
538
538
<p>The string that represents this font.</p>
539
539
<p>Default value: "Sans 10"</p>
542
542
<div class="refsect2">
543
543
<a name="GtkFontSelection--preview-text"></a><h3>The <code class="literal">"preview-text"</code> property</h3>
544
<pre class="programlisting"> "preview-text" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>* : Read / Write</pre>
544
<pre class="programlisting"> "preview-text" <span class="type">gchar</span>* : Read / Write</pre>
545
545
<p>The text to display in order to demonstrate the selected font.</p>
546
546
<p>Default value: "abcdefghijk ABCDEFGHIJK"</p>