<html> <head><title>Gtk-- Reference: Gtk::FontSelection</title></head> <body bgcolor="#F0F0F0" text="#000000" link="#0000FF" vlink="#000077" alink="#FF0000"> <table align=center border=0 cellspacing=10> <tr> <td><a href="class_index.html">Class Index</a></td> <td><a href="cross_index.html">Cross Index</a></td> <td><a href="name_index.html">Namespace Index</a></td> </table> <h1 align=center>Class Gtk::FontSelection</h1><p> <b> A widget for selecting fonts.</b><br> Contained in: <a href="Gtk.html">Gtk</a><br> Derived from: <a href="Gtk%3A%3ANotebook.html">Gtk::Notebook</a> <br> Derived by: <i>none</i> <p> #include <gtk--/fontselection.h> <p> <hr noshade> <table border=0> <tr><td colspan=3><h3>public function member index:</h3></td> <tr valign=top><td align=right><tt></tt> </td><td align=right><a href="Gtk%3A%3AFontSelection.html#1514"><tt><font color=blue><b>FontSelection</b></font></tt></a></td><td><tt>()</tt>;</td> <tr valign=top><td align=right><tt><a href="Gtk%3A%3AEntry.html"><tt><font color=navy><b>Entry</b></font></tt></a>*</tt> </td><td align=right><a href="Gtk%3A%3AFontSelection.html#1537"><tt><font color=blue><b>get_actual_font_name</b></font></tt></a></td><td><tt>() <tt>const</tt></tt>;</td> <tr valign=top><td align=right><tt><a href="Gtk%3A%3ABox.html"><tt><font color=navy><b>Box</b></font></tt></a>*</tt> </td><td align=right><a href="Gtk%3A%3AFontSelection.html#1538"><tt><font color=blue><b>get_filter_box</b></font></tt></a></td><td><tt>() <tt>const</tt></tt>;</td> <tr valign=top><td align=right><tt><a href="Gtk%3A%3AButton.html"><tt><font color=navy><b>Button</b></font></tt></a>*</tt> </td><td align=right><a href="Gtk%3A%3AFontSelection.html#1532"><tt><font color=blue><b>get_filter_button</b></font></tt></a></td><td><tt>() <tt>const</tt></tt>;</td> <tr valign=top><td align=right><tt><a href="Gtk%3A%3ACList.html"><tt><font color=navy><b>CList</b></font></tt></a>*</tt> </td><td align=right><a href="Gtk%3A%3AFontSelection.html#1542"><tt><font color=blue><b>get_filter_list</b></font></tt></a></td><td><tt>(<tt><font color=navy>PropertyType</font></tt> <tt><font color=blue>p</font></tt>)</tt>;</td> <tr valign=top><td align=right><tt><tt><font color=navy>Gdk_Font</font></tt></tt> </td><td align=right><a href="Gtk%3A%3AFontSelection.html#1516"><tt><font color=blue><b>get_font</b></font></tt></a></td><td><tt>() <tt>const</tt></tt>;</td> <tr valign=top><td align=right><tt><a href="Gtk%3A%3ABox.html"><tt><font color=navy><b>Box</b></font></tt></a>*</tt> </td><td align=right><a href="Gtk%3A%3AFontSelection.html#1521"><tt><font color=blue><b>get_font_box</b></font></tt></a></td><td><tt>() <tt>const</tt></tt>;</td> <tr valign=top><td align=right><tt><a href="Gtk%3A%3AEntry.html"><tt><font color=navy><b>Entry</b></font></tt></a>*</tt> </td><td align=right><a href="Gtk%3A%3AFontSelection.html#1523"><tt><font color=blue><b>get_font_entry</b></font></tt></a></td><td><tt>() <tt>const</tt></tt>;</td> <tr valign=top><td align=right><tt><a href="Gtk%3A%3ALabel.html"><tt><font color=navy><b>Label</b></font></tt></a>*</tt> </td><td align=right><a href="Gtk%3A%3AFontSelection.html#1522"><tt><font color=blue><b>get_font_label</b></font></tt></a></td><td><tt>() <tt>const</tt></tt>;</td> <tr valign=top><td align=right><tt><a href="Gtk%3A%3ACList.html"><tt><font color=navy><b>CList</b></font></tt></a>*</tt> </td><td align=right><a href="Gtk%3A%3AFontSelection.html#1527"><tt><font color=blue><b>get_font_list</b></font></tt></a></td><td><tt>() <tt>const</tt></tt>;</td> <tr valign=top><td align=right><tt><tt><font color=navy>string</font></tt></tt> </td><td align=right><a href="Gtk%3A%3AFontSelection.html#1515"><tt><font color=blue><b>get_font_name</b></font></tt></a></td><td><tt>() <tt>const</tt></tt>;</td> <tr valign=top><td align=right><tt><a href="Gtk%3A%3AEntry.html"><tt><font color=navy><b>Entry</b></font></tt></a>*</tt> </td><td align=right><a href="Gtk%3A%3AFontSelection.html#1524"><tt><font color=blue><b>get_font_style_entry</b></font></tt></a></td><td><tt>() <tt>const</tt></tt>;</td> <tr valign=top><td align=right><tt><a href="Gtk%3A%3ACList.html"><tt><font color=navy><b>CList</b></font></tt></a>*</tt> </td><td align=right><a href="Gtk%3A%3AFontSelection.html#1528"><tt><font color=blue><b>get_font_style_list</b></font></tt></a></td><td><tt>() <tt>const</tt></tt>;</td> <tr valign=top><td align=right><tt><a href="Gtk%3A%3ABox.html"><tt><font color=navy><b>Box</b></font></tt></a>*</tt> </td><td align=right><a href="Gtk%3A%3AFontSelection.html#1534"><tt><font color=blue><b>get_info_box</b></font></tt></a></td><td><tt>() <tt>const</tt></tt>;</td> <tr valign=top><td align=right><tt><a href="Gtk%3A%3ACList.html"><tt><font color=navy><b>CList</b></font></tt></a>*</tt> </td><td align=right><a href="Gtk%3A%3AFontSelection.html#1535"><tt><font color=blue><b>get_info_list</b></font></tt></a></td><td><tt>() <tt>const</tt></tt>;</td> <tr valign=top><td align=right><tt><a href="Gtk%3A%3ALabel.html"><tt><font color=navy><b>Label</b></font></tt></a>*</tt> </td><td align=right><a href="Gtk%3A%3AFontSelection.html#1533"><tt><font color=blue><b>get_message_label</b></font></tt></a></td><td><tt>() <tt>const</tt></tt>;</td> <tr valign=top><td align=right><tt><a href="Gtk%3A%3ARadioButton.html"><tt><font color=navy><b>RadioButton</b></font></tt></a>*</tt> </td><td align=right><a href="Gtk%3A%3AFontSelection.html#1530"><tt><font color=blue><b>get_pixels_button</b></font></tt></a></td><td><tt>() <tt>const</tt></tt>;</td> <tr valign=top><td align=right><tt><a href="Gtk%3A%3ARadioButton.html"><tt><font color=navy><b>RadioButton</b></font></tt></a>*</tt> </td><td align=right><a href="Gtk%3A%3AFontSelection.html#1531"><tt><font color=blue><b>get_points_button</b></font></tt></a></td><td><tt>() <tt>const</tt></tt>;</td> <tr valign=top><td align=right><tt><a href="Gtk%3A%3AEntry.html"><tt><font color=navy><b>Entry</b></font></tt></a>*</tt> </td><td align=right><a href="Gtk%3A%3AFontSelection.html#1526"><tt><font color=blue><b>get_preview_entry</b></font></tt></a></td><td><tt>() <tt>const</tt></tt>;</td> <tr valign=top><td align=right><tt><tt><font color=navy>string</font></tt></tt> </td><td align=right><a href="Gtk%3A%3AFontSelection.html#1519"><tt><font color=blue><b>get_preview_text</b></font></tt></a></td><td><tt>() <tt>const</tt></tt>;</td> <tr valign=top><td align=right><tt><a href="Gtk%3A%3AEntry.html"><tt><font color=navy><b>Entry</b></font></tt></a>*</tt> </td><td align=right><a href="Gtk%3A%3AFontSelection.html#1536"><tt><font color=blue><b>get_requested_font_name</b></font></tt></a></td><td><tt>() <tt>const</tt></tt>;</td> <tr valign=top><td align=right><tt><a href="Gtk%3A%3AEntry.html"><tt><font color=navy><b>Entry</b></font></tt></a>*</tt> </td><td align=right><a href="Gtk%3A%3AFontSelection.html#1525"><tt><font color=blue><b>get_size_entry</b></font></tt></a></td><td><tt>() <tt>const</tt></tt>;</td> <tr valign=top><td align=right><tt><a href="Gtk%3A%3ACList.html"><tt><font color=navy><b>CList</b></font></tt></a>*</tt> </td><td align=right><a href="Gtk%3A%3AFontSelection.html#1529"><tt><font color=blue><b>get_size_list</b></font></tt></a></td><td><tt>() <tt>const</tt></tt>;</td> <tr valign=top><td align=right><tt><a href="Gtk%3A%3ACheckButton.html"><tt><font color=navy><b>CheckButton</b></font></tt></a>*</tt> </td><td align=right><a href="Gtk%3A%3AFontSelection.html#1539"><tt><font color=blue><b>get_type_bitmaps_button</b></font></tt></a></td><td><tt>() <tt>const</tt></tt>;</td> <tr valign=top><td align=right><tt><a href="Gtk%3A%3ACheckButton.html"><tt><font color=navy><b>CheckButton</b></font></tt></a>*</tt> </td><td align=right><a href="Gtk%3A%3AFontSelection.html#1540"><tt><font color=blue><b>get_type_scalable_button</b></font></tt></a></td><td><tt>() <tt>const</tt></tt>;</td> <tr valign=top><td align=right><tt><a href="Gtk%3A%3ACheckButton.html"><tt><font color=navy><b>CheckButton</b></font></tt></a>*</tt> </td><td align=right><a href="Gtk%3A%3AFontSelection.html#1541"><tt><font color=blue><b>get_type_scaled_bitmaps_button</b></font></tt></a></td><td><tt>() <tt>const</tt></tt>;</td> <tr valign=top><td align=right><tt><tt><font color=navy>GtkFontSelection</font></tt>*</tt> </td><td align=right><a href="Gtk%3A%3AFontSelection.html#1510"><tt><font color=blue><b>gtkobj</b></font></tt></a></td><td><tt>()</tt>;</td> <tr valign=top><td align=right><tt><tt>const</tt> <tt><font color=navy>GtkFontSelection</font></tt>*</tt> </td><td align=right><a href="Gtk%3A%3AFontSelection.html#1511"><tt><font color=blue><b>gtkobj</b></font></tt></a></td><td><tt>() <tt>const</tt></tt>;</td> <tr valign=top><td align=right><tt><tt>static</tt> <tt><font color=purple>bool</font></tt></tt> </td><td align=right><a href="Gtk%3A%3AFontSelection.html#1512"><tt><font color=blue><b>isA</b></font></tt></a></td><td><tt>(<a href="Gtk%3A%3AObject.html"><tt><font color=navy><b>Object</b></font></tt></a>* <tt><font color=blue>object</font></tt>)</tt>;</td> <tr valign=top><td align=right><tt><tt><font color=purple>void</font></tt></tt> </td><td align=right><a href="Gtk%3A%3AFontSelection.html#1518"><tt><font color=blue><b>set_filter</b></font></tt></a></td><td><tt>(<tt><font color=navy>GtkFontFilterType</font></tt> <tt><font color=blue>filter_type</font></tt>, <tt><font color=navy>GtkFontType</font></tt> <tt><font color=blue>font_type</font></tt>, <tt>const</tt> <a href="Gtk%3A%3ASArray.html"><tt><font color=navy><b>SArray</b></font></tt></a>& <tt><font color=blue>foundries</font></tt>, <tt>const</tt> <a href="Gtk%3A%3ASArray.html"><tt><font color=navy><b>SArray</b></font></tt></a>& <tt><font color=blue>weights</font></tt>, <tt>const</tt> <a href="Gtk%3A%3ASArray.html"><tt><font color=navy><b>SArray</b></font></tt></a>& <tt><font color=blue>slants</font></tt>, <tt>const</tt> <a href="Gtk%3A%3ASArray.html"><tt><font color=navy><b>SArray</b></font></tt></a>& <tt><font color=blue>setwidths</font></tt>, <tt>const</tt> <a href="Gtk%3A%3ASArray.html"><tt><font color=navy><b>SArray</b></font></tt></a>& <tt><font color=blue>spacings</font></tt>, <tt>const</tt> <a href="Gtk%3A%3ASArray.html"><tt><font color=navy><b>SArray</b></font></tt></a>& <tt><font color=blue>charsets</font></tt>)</tt>;</td> <tr valign=top><td align=right><tt><tt><font color=purple>bool</font></tt></tt> </td><td align=right><a href="Gtk%3A%3AFontSelection.html#1517"><tt><font color=blue><b>set_font_name</b></font></tt></a></td><td><tt>(<tt>const</tt> <tt><font color=navy>string</font></tt>& <tt><font color=blue>fontname</font></tt>)</tt>;</td> <tr valign=top><td align=right><tt><tt><font color=purple>void</font></tt></tt> </td><td align=right><a href="Gtk%3A%3AFontSelection.html#1520"><tt><font color=blue><b>set_preview_text</b></font></tt></a></td><td><tt>(<tt>const</tt> <tt><font color=navy>string</font></tt>& <tt><font color=blue>fontname</font></tt>)</tt>;</td> <tr valign=top><td align=right><tt><tt>virtual</tt> </tt> </td><td align=right><a href="Gtk%3A%3AFontSelection.html#1513"><tt><font color=blue><b>~FontSelection</b></font></tt></a></td><td><tt>()</tt>;</td> <tr><td> </td></table> <hr noshade> <h2>Description:</h2> The <tt><font color=navy><b>Gtk::FontSelection</b></font></tt> widget lists the available fonts, styles and sizes, allowing the user to select a font. It is used in the <tt><font color=navy><b>Gtk::FontSelectionDialog</b></font></tt> widget to provide a dialog box for selecting fonts. <P> To set the font which is initially selected, use <a href="Gtk%3A%3AFontSelection.html#1517"><tt><font color=blue><b>set_font_name</b></font></tt></a>. <P> To get the selected font use <a href="Gtk%3A%3AFontSelection.html#1516"><tt><font color=blue><b>get_font</b></font></tt></a> or <a href="Gtk%3A%3AFontSelection.html#1515"><tt><font color=blue><b>get_font_name</b></font></tt></a>. <P> To change the text which is shown in the preview area, use <a href="Gtk%3A%3AFontSelection.html#1520"><tt><font color=blue><b>set_preview_text</b></font></tt></a>. <P> Filters can be used to limit the fonts shown. There are 2 filters in the <tt><font color=navy><b>Gtk::FontSelection</b></font></tt> - a base filter and a user filter. The base filter can not be changed by the user, so this can be used when the user must choose from the restricted set of fonts (e.g. for a terminal-type application you may want to force the user to select a fixed-width font). The user filter can be changed or reset by the user, by using the 'Reset Filter' button or changing the options on the 'Filter' page of the widget.<br> <p> <hr noshade> <h2>Function Member Descriptions:</h2> <a name="1516"><font size=+1><b>Gtk::FontSelection::get_font</b></font></a> - Gets the currently-selected font.<br> <hr size="1" width="70%" align="left" noshade="noshade"><tt><tt><font color=navy>Gdk_Font</font></tt></tt> <a href="Gtk%3A%3AFontSelection.html#1516"><tt><font color=blue><b>get_font</b></font></tt></a><tt>() <tt>const</tt></tt>;<br><blockquote> Returns: The currently-selected font, or NULL if no font is selected.</blockquote> <br><br> <a name="1515"><font size=+1><b>Gtk::FontSelection::get_font_name</b></font></a> - Gets the currently-selected font name.<br> <hr size="1" width="70%" align="left" noshade="noshade"><tt><tt><font color=navy>string</font></tt></tt> <a href="Gtk%3A%3AFontSelection.html#1515"><tt><font color=blue><b>get_font_name</b></font></tt></a><tt>() <tt>const</tt></tt>;<br><br> <a name="1519"><font size=+1><b>Gtk::FontSelection::get_preview_text</b></font></a> - Gets the text displayed in the preview area.<br> <hr size="1" width="70%" align="left" noshade="noshade"><tt><tt><font color=navy>string</font></tt></tt> <a href="Gtk%3A%3AFontSelection.html#1519"><tt><font color=blue><b>get_preview_text</b></font></tt></a><tt>() <tt>const</tt></tt>;<br><blockquote> Returns: The text displayed in the preview area.</blockquote> <br><br> <a name="1510"><font size=+1><b>Gtk::FontSelection::gtkobj</b></font></a> - Returns the underlaying gtk+ object.<br> <hr size="1" width="70%" align="left" noshade="noshade"><tt><tt><font color=navy>GtkFontSelection</font></tt>*</tt> <a href="Gtk%3A%3AFontSelection.html#1510"><tt><font color=blue><b>gtkobj</b></font></tt></a><tt>()</tt>;<br><br> <a name="1512"><font size=+1><b>Gtk::FontSelection::isA</b></font></a> - Returns true if object is this type.<br> <hr size="1" width="70%" align="left" noshade="noshade"><tt><tt>static</tt> <tt><font color=purple>bool</font></tt></tt> <a href="Gtk%3A%3AFontSelection.html#1512"><tt><font color=blue><b>isA</b></font></tt></a><tt>(<a href="Gtk%3A%3AObject.html"><tt><font color=navy><b>Object</b></font></tt></a>* <tt><font color=blue>object</font></tt>)</tt>;<br><br> <a name="1518"><font size=+1><b>Gtk::FontSelection::set_filter</b></font></a> - Sets one of the two font filters, to limit the fonts shown.<br> <hr size="1" width="70%" align="left" noshade="noshade"><tt><tt><font color=purple>void</font></tt></tt> <a href="Gtk%3A%3AFontSelection.html#1518"><tt><font color=blue><b>set_filter</b></font></tt></a><tt>(<tt><font color=navy>GtkFontFilterType</font></tt> <tt><font color=blue>filter_type</font></tt>, <tt><font color=navy>GtkFontType</font></tt> <tt><font color=blue>font_type</font></tt>, <tt>const</tt> <a href="Gtk%3A%3ASArray.html"><tt><font color=navy><b>SArray</b></font></tt></a>& <tt><font color=blue>foundries</font></tt>, <tt>const</tt> <a href="Gtk%3A%3ASArray.html"><tt><font color=navy><b>SArray</b></font></tt></a>& <tt><font color=blue>weights</font></tt>, <tt>const</tt> <a href="Gtk%3A%3ASArray.html"><tt><font color=navy><b>SArray</b></font></tt></a>& <tt><font color=blue>slants</font></tt>, <tt>const</tt> <a href="Gtk%3A%3ASArray.html"><tt><font color=navy><b>SArray</b></font></tt></a>& <tt><font color=blue>setwidths</font></tt>, <tt>const</tt> <a href="Gtk%3A%3ASArray.html"><tt><font color=navy><b>SArray</b></font></tt></a>& <tt><font color=blue>spacings</font></tt>, <tt>const</tt> <a href="Gtk%3A%3ASArray.html"><tt><font color=navy><b>SArray</b></font></tt></a>& <tt><font color=blue>charsets</font></tt>)</tt>;<br><blockquote> filter_type: Which of the two font filters to set, either <tt><font color=green>GTK_FONT_FILTER_BASE</font></tt> or <tt><font color=green>GTK_FONT_FILTER_USER</font></tt>. The user filter can be changed by the user, but the base filter is permanent. <P> font_type: The types of font to be shown. This is a bitwise combination of <tt><font color=green>GTK_FONT_BITMAP</font></tt>, <tt><font color=green>GTK_FONT_SCALABLE</font></tt> and <tt><font color=green>GTK_FONT_SCALABLE_BITMAP</font></tt>, or <tt><font color=green>GTK_FONT_ALL</font></tt> to show all three font types. <P> foundries: A NULL-terminated array of strings containing foundry names which will be shown, or NULL to show all foundries. <P> weights: A NULL-terminated array of strings containing weight names which will be shown, or NULL to show all weights. <P> slants: A NULL-terminated array of strings containing slant names which will be shown, or NULL to show all slants. <P> setwidths: A NULL-terminated array of strings containing setwidth names which will be shown, or NULL to show all setwidths. <P> spacings: A NULL-terminated array of strings containing spacings which will be shown, or NULL to show all spacings. <P> charsets: A NULL-terminated array of strings containing charset names which will be shown, or NULL to show all charsets.</blockquote> <br><br> <a name="1517"><font size=+1><b>Gtk::FontSelection::set_font_name</b></font></a> - Sets the currently-selected font.<br> <hr size="1" width="70%" align="left" noshade="noshade"><tt><tt><font color=purple>bool</font></tt></tt> <a href="Gtk%3A%3AFontSelection.html#1517"><tt><font color=blue><b>set_font_name</b></font></tt></a><tt>(<tt>const</tt> <tt><font color=navy>string</font></tt>& <tt><font color=blue>fontname</font></tt>)</tt>;<br><blockquote> fontname: A fontname. <P> Returns: TRUE if the font was found.</blockquote> <br><br> <a name="1520"><font size=+1><b>Gtk::FontSelection::set_preview_text</b></font></a> - Sets the text displayed in the preview area.<br> <hr size="1" width="70%" align="left" noshade="noshade"><tt><tt><font color=purple>void</font></tt></tt> <a href="Gtk%3A%3AFontSelection.html#1520"><tt><font color=blue><b>set_preview_text</b></font></tt></a><tt>(<tt>const</tt> <tt><font color=navy>string</font></tt>& <tt><font color=blue>fontname</font></tt>)</tt>;<br><blockquote> text: The text to display in the preview area.</blockquote> <br><br> <hr noshade> </html>