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.17.1 (XML mode)">
11
<meta name="generator" content="GTK-Doc V1.17 (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
<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>);
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
<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>);
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 <span class="type">gchar</span> *text</code></em>);
58
<span class="returnvalue">PangoFontFace</span> * <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 <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>);
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
<span class="returnvalue">PangoFontFamily</span> * <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>);
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>);
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>);
69
69
<div class="refsect1">
70
70
<a name="GtkFontSelection.object-hierarchy"></a><h2>Object Hierarchy</h2>
71
71
<pre class="synopsis">
73
+----GInitiallyUnowned
72
<a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
73
+----<a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GInitiallyUnowned">GInitiallyUnowned</a>
74
74
+----<a class="link" href="GtkObject.html" title="GtkObject">GtkObject</a>
75
75
+----<a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a>
76
76
+----<a class="link" href="GtkContainer.html" title="GtkContainer">GtkContainer</a>
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>" <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
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>" <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
96
96
<div class="refsect1">
143
143
<div class="refsect2">
144
144
<a name="gtk-font-selection-get-font"></a><h3>gtk_font_selection_get_font ()</h3>
145
<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>
145
<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>
146
146
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
147
147
<h3 class="title">Warning</h3>
148
148
<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>
177
177
<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
178
178
normalize font names and thus return a string with a different structure.
179
179
For example, "Helvetica Italic Bold 12" could be normalized to
180
"Helvetica Bold Italic 12". Use <code class="function">pango_font_description_equal()</code>
180
"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>
181
181
if you want to compare two font descriptions.
183
183
<div class="variablelist"><table border="0">
192
192
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
193
<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
194
no font is selected. You must free this string with <code class="function">g_free()</code>.</td>
193
<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
194
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>
200
200
<div class="refsect2">
201
201
<a name="gtk-font-selection-set-font-name"></a><h3>gtk_font_selection_set_font_name ()</h3>
202
<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>,
203
<em class="parameter"><code>const <span class="type">gchar</span> *fontname</code></em>);</pre>
202
<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>,
203
<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>
205
205
Sets the currently-selected font.
259
259
<div class="refsect2">
260
260
<a name="gtk-font-selection-set-preview-text"></a><h3>gtk_font_selection_set_preview_text ()</h3>
261
261
<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>,
262
<em class="parameter"><code>const <span class="type">gchar</span> *text</code></em>);</pre>
262
<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>
264
264
Sets the text displayed in the preview area.
265
265
The <em class="parameter"><code>text</code></em> is used to show how the selected font looks.
283
283
<div class="refsect2">
284
284
<a name="gtk-font-selection-get-face"></a><h3>gtk_font_selection_get_face ()</h3>
285
<pre class="programlisting"><span class="returnvalue">PangoFontFace</span> * 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>
285
<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>
287
Gets the <span class="type">PangoFontFace</span> representing the selected font group
287
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
288
288
details (i.e. family, slant, weight, width, etc).
290
290
<div class="variablelist"><table border="0">
299
299
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
300
<td>A <span class="type">PangoFontFace</span> representing the
300
<td>A <a href="/usr/share/gtk-doc/html/pango/pango-Fonts.html#PangoFontFace"><span class="type">PangoFontFace</span></a> representing the
301
301
selected font group details. The returned object is owned by
302
302
<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>
335
335
<div class="refsect2">
336
336
<a name="gtk-font-selection-get-family"></a><h3>gtk_font_selection_get_family ()</h3>
337
<pre class="programlisting"><span class="returnvalue">PangoFontFamily</span> * 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>
337
<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>
339
Gets the <span class="type">PangoFontFamily</span> representing the selected font family.
339
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.
341
341
<div class="variablelist"><table border="0">
342
342
<col align="left" valign="top">
350
350
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
351
<td>A <span class="type">PangoFontFamily</span> representing the
351
<td>A <a href="/usr/share/gtk-doc/html/pango/pango-Fonts.html#PangoFontFamily"><span class="type">PangoFontFamily</span></a> representing the
352
352
selected font family. Font families are a collection of font
353
353
faces. The returned object is owned by <em class="parameter"><code>fontsel</code></em> and must not
354
354
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>
486
486
<a name="GtkFontSelection.property-details"></a><h2>Property Details</h2>
487
487
<div class="refsect2">
488
488
<a name="GtkFontSelection--font"></a><h3>The <code class="literal">"font"</code> property</h3>
489
<pre class="programlisting"> "font" <a href="../gdk/gdk-Fonts.html#GdkFont"><span class="type">GdkFont</span></a>* : Read</pre>
489
<pre class="programlisting"> "font" <a href="http://library.gnome.org/devel/gdk3/gdk-Fonts.html#GdkFont"><span class="type">GdkFont</span></a>* : Read</pre>
490
490
<p>The GdkFont that is currently selected.</p>
493
493
<div class="refsect2">
494
494
<a name="GtkFontSelection--font-name"></a><h3>The <code class="literal">"font-name"</code> property</h3>
495
<pre class="programlisting"> "font-name" <span class="type">gchar</span>* : Read / Write</pre>
495
<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>
496
496
<p>The string that represents this font.</p>
497
497
<p>Default value: "Sans 10"</p>
500
500
<div class="refsect2">
501
501
<a name="GtkFontSelection--preview-text"></a><h3>The <code class="literal">"preview-text"</code> property</h3>
502
<pre class="programlisting"> "preview-text" <span class="type">gchar</span>* : Read / Write</pre>
502
<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>
503
503
<p>The text to display in order to demonstrate the selected font.</p>
504
504
<p>Default value: "abcdefghijk ABCDEFGHIJK"</p>