|
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17 System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64 User : nobody ( 99) PHP Version : 5.2.17 Disable Function : NONE Directory : /usr/share/gtk-doc/html/gtk/ |
Upload File : |
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>GtkFontSelectionDialog</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
<link rel="start" href="index.html" title="GTK+ Reference Manual">
<link rel="up" href="SelectorWidgets.html" title="Selectors (File/Font/Color/Input Devices)">
<link rel="prev" href="GtkFontSelection.html" title="GtkFontSelection">
<link rel="next" href="GtkInputDialog.html" title="GtkInputDialog">
<meta name="generator" content="GTK-Doc V1.6 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
<link rel="part" href="gtk.html" title="Part I. GTK+ Overview">
<link rel="part" href="gtkbase.html" title="Part II. GTK+ Core Reference">
<link rel="part" href="gtkobjects.html" title="Part III. GTK+ Widgets and Objects">
<link rel="chapter" href="ch01.html" title="Object Hierarchy">
<link rel="chapter" href="ch02.html" title="Widget Gallery">
<link rel="chapter" href="WindowWidgets.html" title="Windows">
<link rel="chapter" href="DisplayWidgets.html" title="Display Widgets">
<link rel="chapter" href="ButtonWidgets.html" title="Buttons and Toggles">
<link rel="chapter" href="NumericEntry.html" title="Numeric/Text Data Entry">
<link rel="chapter" href="TextWidgetObjects.html" title="Multiline Text Editor">
<link rel="chapter" href="TreeWidgetObjects.html" title="Tree, List and Icon Grid Widgets">
<link rel="chapter" href="MenusAndCombos.html" title="Menus, Combo Box, Toolbar">
<link rel="chapter" href="Actions.html" title="Action-based menus and toolbars">
<link rel="chapter" href="SelectorWidgets.html" title="Selectors (File/Font/Color/Input Devices)">
<link rel="chapter" href="LayoutContainers.html" title="Layout Containers">
<link rel="chapter" href="Ornaments.html" title="Ornaments">
<link rel="chapter" href="ScrollingWidgets.html" title="Scrolling">
<link rel="chapter" href="Printing.html" title="Printing">
<link rel="chapter" href="MiscObjects.html" title="Miscellaneous">
<link rel="chapter" href="AbstractObjects.html" title="Abstract Base Classes">
<link rel="chapter" href="PlugSocket.html" title="Cross-process Embedding">
<link rel="chapter" href="SpecialObjects.html" title="Special-purpose features">
<link rel="chapter" href="RecentDocuments.html" title="Recently Used Documents">
<link rel="chapter" href="DeprecatedObjects.html" title="Deprecated">
<link rel="part" href="migrating.html" title="Part IV. Migrating from Previous Versions of GTK+">
<link rel="chapter" href="gtk-migrating-checklist.html" title="Migration Checklist">
<link rel="chapter" href="gtk-migrating-GtkFileChooser.html" title="Migrating from GtkFileSelection to GtkFileChooser">
<link rel="chapter" href="gtk-migrating-GtkAction.html" title="Migrating from old menu and toolbar systems to GtkAction">
<link rel="chapter" href="gtk-migrating-GtkComboBox.html" title="Migrating from GtkOptionMenu and GtkCombo to GtkComboBox and
GtkComboBoxEntry">
<link rel="chapter" href="gtk-migrating-GtkIconView.html" title="Migrating from GnomeIconList to GtkIconView">
<link rel="chapter" href="gtk-migrating-GtkAboutDialog.html" title="Migrating from GnomeAbout to GtkAboutDialog">
<link rel="chapter" href="gtk-migrating-GtkColorButton.html" title="Migrating from GnomeColorPicker to GtkColorButton">
<link rel="chapter" href="gtk-migrating-GtkAssistant.html" title="Migrating from GnomeDruid to GtkAssistant">
<link rel="chapter" href="gtk-migrating-GtkRecentChooser.html" title="Migrating from EggRecent to GtkRecentChooser">
<link rel="chapter" href="gtk-migrating-GtkLinkButton.html" title="Migrating from GnomeHRef to GtkLinkButton">
<link rel="part" href="pt05.html" title="Part V. GTK+ Tools">
<link rel="glossary" href="glossary.html" title="Glossary">
<link rel="index" href="ix01.html" title="Index">
<link rel="index" href="ix02.html" title="Index of deprecated symbols">
<link rel="index" href="ix03.html" title="Index of new symbols in 2.2">
<link rel="index" href="ix04.html" title="Index of new symbols in 2.4">
<link rel="index" href="ix05.html" title="Index of new symbols in 2.6">
<link rel="index" href="ix06.html" title="Index of new symbols in 2.8">
<link rel="index" href="ix07.html" title="Index of new symbols in 2.10">
</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="2">
<tr valign="middle">
<td><a accesskey="p" href="GtkFontSelection.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="SelectorWidgets.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">GTK+ Reference Manual</th>
<td><a accesskey="n" href="GtkInputDialog.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts"><nobr><a href="#id3445475" class="shortcut">Top</a>
 | 
<a href="#id3445757" class="shortcut">Description</a>
 | 
<a href="#id3445657" class="shortcut">Object Hierarchy</a>
 | 
<a href="#id3445734" class="shortcut">Implemented Interfaces</a></nobr></td></tr>
</table>
<div class="refentry" lang="en">
<a name="GtkFontSelectionDialog"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2>
<a name="id3445475"></a><span class="refentrytitle">GtkFontSelectionDialog</span>
</h2>
<p>GtkFontSelectionDialog — A dialog box for selecting fonts</p>
</td>
<td valign="top" align="right"><img src="fontsel.png"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<h2>Synopsis</h2>
<pre class="synopsis">
#include <gtk/gtk.h>
<a href="GtkFontSelectionDialog.html#GtkFontSelectionDialog-struct">GtkFontSelectionDialog</a>;
<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a>* <a href="GtkFontSelectionDialog.html#gtk-font-selection-dialog-new">gtk_font_selection_dialog_new</a> (const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *title);
<a
href="../gdk/gdk-Fonts.html#GdkFont"
>GdkFont</a>* <a href="GtkFontSelectionDialog.html#gtk-font-selection-dialog-get-font">gtk_font_selection_dialog_get_font</a>
(<a href="GtkFontSelectionDialog.html" title="GtkFontSelectionDialog">GtkFontSelectionDialog</a> *fsd);
<a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a>* <a href="GtkFontSelectionDialog.html#gtk-font-selection-dialog-get-font-name">gtk_font_selection_dialog_get_font_name</a>
(<a href="GtkFontSelectionDialog.html" title="GtkFontSelectionDialog">GtkFontSelectionDialog</a> *fsd);
<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> <a href="GtkFontSelectionDialog.html#gtk-font-selection-dialog-set-font-name">gtk_font_selection_dialog_set_font_name</a>
(<a href="GtkFontSelectionDialog.html" title="GtkFontSelectionDialog">GtkFontSelectionDialog</a> *fsd,
const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *fontname);
const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a>* <a href="GtkFontSelectionDialog.html#gtk-font-selection-dialog-get-preview-text">gtk_font_selection_dialog_get_preview_text</a>
(<a href="GtkFontSelectionDialog.html" title="GtkFontSelectionDialog">GtkFontSelectionDialog</a> *fsd);
void <a href="GtkFontSelectionDialog.html#gtk-font-selection-dialog-set-preview-text">gtk_font_selection_dialog_set_preview_text</a>
(<a href="GtkFontSelectionDialog.html" title="GtkFontSelectionDialog">GtkFontSelectionDialog</a> *fsd,
const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *text);
</pre>
</div>
<div class="refsect1" lang="en">
<a name="id3445657"></a><h2>Object Hierarchy</h2>
<pre class="synopsis">
<a
href="../gobject/gobject-The-Base-Object-Type.html#GObject"
>GObject</a>
+----<a
href="../gobject/gobject-The-Base-Object-Type.html#GInitiallyUnowned"
>GInitiallyUnowned</a>
+----<a href="GtkObject.html" title="GtkObject">GtkObject</a>
+----<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a>
+----<a href="GtkContainer.html" title="GtkContainer">GtkContainer</a>
+----<a href="GtkBin.html" title="GtkBin">GtkBin</a>
+----<a href="GtkWindow.html" title="GtkWindow">GtkWindow</a>
+----<a href="GtkDialog.html" title="GtkDialog">GtkDialog</a>
+----GtkFontSelectionDialog
</pre>
</div>
<div class="refsect1" lang="en">
<a name="id3445734"></a><h2>Implemented Interfaces</h2>
<p>
GtkFontSelectionDialog implements
AtkImplementorIface.</p>
</div>
<div class="refsect1" lang="en">
<a name="id3445757"></a><h2>Description</h2>
<p>
The <a href="GtkFontSelectionDialog.html" title="GtkFontSelectionDialog"><span class="type">GtkFontSelectionDialog</span></a> widget is a dialog box for selecting a font.
</p>
<p>
To set the font which is initially selected, use
<a href="GtkFontSelectionDialog.html#gtk-font-selection-dialog-set-font-name"><code class="function">gtk_font_selection_dialog_set_font_name()</code></a>.
</p>
<p>
To get the selected font use <a href="GtkFontSelectionDialog.html#gtk-font-selection-dialog-get-font-name"><code class="function">gtk_font_selection_dialog_get_font_name()</code></a>.
</p>
<p>
To change the text which is shown in the preview area, use
<a href="GtkFontSelectionDialog.html#gtk-font-selection-dialog-set-preview-text"><code class="function">gtk_font_selection_dialog_set_preview_text()</code></a>.
</p>
</div>
<div class="refsect1" lang="en">
<a name="id3445829"></a><h2>Details</h2>
<div class="refsect2" lang="en">
<a name="id3445839"></a><h3>
<a name="GtkFontSelectionDialog-struct"></a>GtkFontSelectionDialog</h3>
<a class="indexterm" name="id3445854"></a><pre class="programlisting">typedef struct {
GtkWidget *ok_button;
GtkWidget *apply_button;
GtkWidget *cancel_button;
} GtkFontSelectionDialog;
</pre>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *<em class="structfield"><code>ok_button</code></em>;</span></td>
<td>The OK button of the dialog
</td>
</tr>
<tr>
<td>
<span class="term"><a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *<em class="structfield"><code>apply_button</code></em>;</span></td>
<td>The Apply button of the dialog. This button is hidden
by default but you can show/hide it
</td>
</tr>
<tr>
<td>
<span class="term"><a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *<em class="structfield"><code>cancel_button</code></em>;</span></td>
<td>The Cancel button of the dialog
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3445935"></a><h3>
<a name="gtk-font-selection-dialog-new"></a>gtk_font_selection_dialog_new ()</h3>
<a class="indexterm" name="id3445949"></a><pre class="programlisting"><a href="GtkWidget.html" title="GtkWidget">GtkWidget</a>* gtk_font_selection_dialog_new (const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *title);</pre>
<p>
Creates a new <a href="GtkFontSelectionDialog.html" title="GtkFontSelectionDialog"><span class="type">GtkFontSelectionDialog</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>title</code></em> :</span></td>
<td>the title of the dialog box.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td>a new <a href="GtkFontSelectionDialog.html" title="GtkFontSelectionDialog"><span class="type">GtkFontSelectionDialog</span></a>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3446023"></a><h3>
<a name="gtk-font-selection-dialog-get-font"></a>gtk_font_selection_dialog_get_font ()</h3>
<a class="indexterm" name="id3446040"></a><pre class="programlisting"><a
href="../gdk/gdk-Fonts.html#GdkFont"
>GdkFont</a>* gtk_font_selection_dialog_get_font
(<a href="GtkFontSelectionDialog.html" title="GtkFontSelectionDialog">GtkFontSelectionDialog</a> *fsd);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gtk_font_selection_dialog_get_font</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
Gets the currently-selected font.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>fsd</code></em> :</span></td>
<td>a <a href="GtkFontSelectionDialog.html" title="GtkFontSelectionDialog"><span class="type">GtkFontSelectionDialog</span></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td>the currently-selected font, or <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a> if no font is selected.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3446130"></a><h3>
<a name="gtk-font-selection-dialog-get-font-name"></a>gtk_font_selection_dialog_get_font_name ()</h3>
<a class="indexterm" name="id3446144"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a>* gtk_font_selection_dialog_get_font_name
(<a href="GtkFontSelectionDialog.html" title="GtkFontSelectionDialog">GtkFontSelectionDialog</a> *fsd);</pre>
<p>
Gets the currently-selected font name. Note that this can be a different
string than what you set with <a href="GtkFontSelectionDialog.html#gtk-font-selection-dialog-set-font-name"><code class="function">gtk_font_selection_dialog_set_font_name()</code></a>, as
the font selection widget may normalize font names and thus return a string
with a different structure. For example, "Helvetica Italic Bold 12" could be
normalized to "Helvetica Bold Italic 12". Use <a
href="../pango/pango-Fonts.html#pango-font-description-equal"
><code class="function">pango_font_description_equal()</code></a>
if you want to compare two font descriptions.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>fsd</code></em> :</span></td>
<td> a <a href="GtkFontSelectionDialog.html" title="GtkFontSelectionDialog"><span class="type">GtkFontSelectionDialog</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> A string with the name of the current font, or <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><span class="type">NULL</span></a> if no font
is selected. You must free this string with <a
href="../glib/glib-Memory-Allocation.html#g-free"
><code class="function">g_free()</code></a>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3446263"></a><h3>
<a name="gtk-font-selection-dialog-set-font-name"></a>gtk_font_selection_dialog_set_font_name ()</h3>
<a class="indexterm" name="id3446277"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> gtk_font_selection_dialog_set_font_name
(<a href="GtkFontSelectionDialog.html" title="GtkFontSelectionDialog">GtkFontSelectionDialog</a> *fsd,
const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *fontname);</pre>
<p>
Sets the currently-selected font.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>fsd</code></em> :</span></td>
<td>a <a href="GtkFontSelectionDialog.html" title="GtkFontSelectionDialog"><span class="type">GtkFontSelectionDialog</span></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>fontname</code></em> :</span></td>
<td>a fontname.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td>
<a
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> if the font was found.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3446375"></a><h3>
<a name="gtk-font-selection-dialog-get-preview-text"></a>gtk_font_selection_dialog_get_preview_text ()</h3>
<a class="indexterm" name="id3446390"></a><pre class="programlisting">const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a>* gtk_font_selection_dialog_get_preview_text
(<a href="GtkFontSelectionDialog.html" title="GtkFontSelectionDialog">GtkFontSelectionDialog</a> *fsd);</pre>
<p>
Gets the text displayed in the preview area.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>fsd</code></em> :</span></td>
<td>a <a href="GtkFontSelectionDialog.html" title="GtkFontSelectionDialog"><span class="type">GtkFontSelectionDialog</span></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td>the text displayed in the preview area. This string is owned
by the widget and should not be modified or freed.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3446460"></a><h3>
<a name="gtk-font-selection-dialog-set-preview-text"></a>gtk_font_selection_dialog_set_preview_text ()</h3>
<a class="indexterm" name="id3446475"></a><pre class="programlisting">void gtk_font_selection_dialog_set_preview_text
(<a href="GtkFontSelectionDialog.html" title="GtkFontSelectionDialog">GtkFontSelectionDialog</a> *fsd,
const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *text);</pre>
<p>
Sets the text displayed in the preview area.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>fsd</code></em> :</span></td>
<td>a <a href="GtkFontSelectionDialog.html" title="GtkFontSelectionDialog"><span class="type">GtkFontSelectionDialog</span></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>text</code></em> :</span></td>
<td>the text to display in the preview area.
</td>
</tr>
</tbody>
</table></div>
</div>
</div>
<div class="refsect1" lang="en">
<a name="id3446554"></a><h2>See Also</h2>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td>
<span class="term"><a href="GtkFontSelection.html" title="GtkFontSelection"><span class="type">GtkFontSelection</span></a>, </span><span class="term"><a href="GtkDialog.html" title="GtkDialog"><span class="type">GtkDialog</span></a></span></td>
<td>
<p>the underlying widget for selecting
fonts.</p>
<p>the parent class of GtkFontSelectionDialog</p>
</td>
</tr></tbody>
</table></div>
<p>
</p>
</div>
</div>
</body>
</html>