gtkmm: Gtk::FontSelection Class Reference
A widget for selecting fonts. More...

Public Member Functions | |
| virtual | ~FontSelection () |
| GtkFontSelection* | gobj () |
| Provides access to the underlying C GtkObject. | |
| const GtkFontSelection* | gobj () const |
| Provides access to the underlying C GtkObject. | |
| FontSelection () | |
| TreeView* | get_family_list () |
| This returns the Gtk::TreeView that lists font families, for example, 'Sans', 'Serif', etc. | |
| const TreeView* | get_family_list () const |
| This returns the Gtk::TreeView that lists font families, for example, 'Sans', 'Serif', etc. | |
| TreeView* | get_face_list () |
| This returns the Gtk::TreeView which lists all styles available for the selected font. | |
| const TreeView* | get_face_list () const |
| This returns the Gtk::TreeView which lists all styles available for the selected font. | |
| Entry* | get_size_entry () |
| This returns the Gtk::Entry used to allow the user to edit the font number manually instead of selecting it from the list of font sizes. | |
| const Entry* | get_size_entry () const |
| This returns the Gtk::Entry used to allow the user to edit the font number manually instead of selecting it from the list of font sizes. | |
| TreeView* | get_size_list () |
| This returns the Gtk::TreeeView used to list font sizes. | |
| const TreeView* | get_size_list () const |
| This returns the Gtk::TreeeView used to list font sizes. | |
| Entry* | get_preview_entry () |
| This returns the Gtk::Entry used to display the font as a preview. | |
| const Entry* | get_preview_entry () const |
| This returns the Gtk::Entry used to display the font as a preview. | |
| Glib::RefPtr< Pango::FontFamily > | get_family () |
| Gets the Pango::FontFamily representing the selected font family. | |
| Glib::RefPtr< const Pango::FontFamily > | get_family () const |
| Gets the Pango::FontFamily representing the selected font family. | |
| Glib::RefPtr< Pango::FontFace > | get_face () |
| Gets the Pango::FontFace representing the selected font group details (i.e. family, slant, weight, width, etc). | |
| Glib::RefPtr< const Pango::FontFace > | get_face () const |
| Gets the Pango::FontFace representing the selected font group details (i.e. family, slant, weight, width, etc). | |
| int | get_size () const |
| The selected font size. | |
| Glib::ustring | get_font_name () const |
| Gets the currently-selected font name. | |
| bool | set_font_name (const Glib::ustring& fontname) |
| Sets the currently-selected font. | |
| Glib::ustring | get_preview_text () const |
| Gets the text displayed in the preview area. | |
| void | set_preview_text (const Glib::ustring& fontname) |
| Sets the text displayed in the preview area. | |
| Glib::PropertyProxy < Glib::ustring > | property_font_name () |
| The string that represents this font. | |
| Glib::PropertyProxy_ReadOnly < Glib::ustring > | property_font_name () const |
| The string that represents this font. | |
| Glib::PropertyProxy < Glib::ustring > | property_preview_text () |
| The text to display in order to demonstrate the selected font. | |
| Glib::PropertyProxy_ReadOnly < Glib::ustring > | property_preview_text () const |
| The text to display in order to demonstrate the selected font. | |
Related Functions | |
(Note that these are not member functions.) | |
| Gtk::FontSelection* | wrap (GtkFontSelection* object, bool take_copy=false) |
| A Glib::wrap() method for this object. | |
Detailed Description
A widget for selecting fonts.
The Gtk::FontSelection widget lists the available fonts, styles and sizes, allowing the user to select a font. It is used in the Gtk::FontSelectionDialog widget to provide a dialog box for selecting fonts.
- Deprecated:
- Use FontChooser instead.
Constructor & Destructor Documentation
| virtual Gtk::FontSelection::~FontSelection | ( | ) | [virtual] |
Member Function Documentation
Gets the Pango::FontFace representing the selected font group details (i.e. family, slant, weight, width, etc).
Deprecated: 3.2: Use Gtk::FontChooser
- Returns:
- A Pango::FontFace representing the selected font group details. The returned object is owned by fontsel and must not be modified or freed.
| Glib::RefPtr<const Pango::FontFace> Gtk::FontSelection::get_face | ( | ) | const |
Gets the Pango::FontFace representing the selected font group details (i.e. family, slant, weight, width, etc).
Deprecated: 3.2: Use Gtk::FontChooser
- Returns:
- A Pango::FontFace representing the selected font group details. The returned object is owned by fontsel and must not be modified or freed.
This returns the Gtk::TreeView which lists all styles available for the selected font.
For example, 'Regular', 'Bold', etc.
Deprecated: 3.2: Use Gtk::FontChooser
- Returns:
- A Gtk::Widget that is part of fontsel.
| const TreeView* Gtk::FontSelection::get_face_list | ( | ) | const |
This returns the Gtk::TreeView which lists all styles available for the selected font.
For example, 'Regular', 'Bold', etc.
Deprecated: 3.2: Use Gtk::FontChooser
- Returns:
- A Gtk::Widget that is part of fontsel.
Gets the Pango::FontFamily representing the selected font family.
Deprecated: 3.2: Use Gtk::FontChooser
- Returns:
- A Pango::FontFamily representing the selected font family. Font families are a collection of font faces. The returned object is owned by fontsel and must not be modified or freed.
| Glib::RefPtr<const Pango::FontFamily> Gtk::FontSelection::get_family | ( | ) | const |
Gets the Pango::FontFamily representing the selected font family.
Deprecated: 3.2: Use Gtk::FontChooser
- Returns:
- A Pango::FontFamily representing the selected font family. Font families are a collection of font faces. The returned object is owned by fontsel and must not be modified or freed.
This returns the Gtk::TreeView that lists font families, for example, 'Sans', 'Serif', etc.
Deprecated: 3.2: Use Gtk::FontChooser
- Returns:
- A Gtk::Widget that is part of fontsel.
| const TreeView* Gtk::FontSelection::get_family_list | ( | ) | const |
This returns the Gtk::TreeView that lists font families, for example, 'Sans', 'Serif', etc.
Deprecated: 3.2: Use Gtk::FontChooser
- Returns:
- A Gtk::Widget that is part of fontsel.
Gets the currently-selected font name.
Note that this can be a different string than what you set with set_font_name(), 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 pango_font_description_equal() if you want to compare two font descriptions.
Deprecated: 3.2: Use Gtk::FontChooser
- Returns:
- A string with the name of the current font, or
0if no font is selected. You must free this string with Glib::free().
This returns the Gtk::Entry used to display the font as a preview.
Deprecated: 3.2: Use Gtk::FontChooser
- Returns:
- A Gtk::Widget that is part of fontsel.
| const Entry* Gtk::FontSelection::get_preview_entry | ( | ) | const |
This returns the Gtk::Entry used to display the font as a preview.
Deprecated: 3.2: Use Gtk::FontChooser
- Returns:
- A Gtk::Widget that is part of fontsel.
Gets the text displayed in the preview area.
Deprecated: 3.2: Use Gtk::FontChooser
- Returns:
- The text displayed in the preview area. This string is owned by the widget and should not be modified or freed.
| int Gtk::FontSelection::get_size | ( | ) | const |
The selected font size.
Deprecated: 3.2: Use Gtk::FontChooser
- Returns:
- A n integer representing the selected font size, or -1 if no font size is selected.
This returns the Gtk::Entry used to allow the user to edit the font number manually instead of selecting it from the list of font sizes.
Deprecated: 3.2: Use Gtk::FontChooser
- Returns:
- A Gtk::Widget that is part of fontsel.
| const Entry* Gtk::FontSelection::get_size_entry | ( | ) | const |
This returns the Gtk::Entry used to allow the user to edit the font number manually instead of selecting it from the list of font sizes.
Deprecated: 3.2: Use Gtk::FontChooser
- Returns:
- A Gtk::Widget that is part of fontsel.
This returns the Gtk::TreeeView used to list font sizes.
Deprecated: 3.2: Use Gtk::FontChooser
- Returns:
- A Gtk::Widget that is part of fontsel.
| const TreeView* Gtk::FontSelection::get_size_list | ( | ) | const |
This returns the Gtk::TreeeView used to list font sizes.
Deprecated: 3.2: Use Gtk::FontChooser
- Returns:
- A Gtk::Widget that is part of fontsel.
| GtkFontSelection* Gtk::FontSelection::gobj | ( | ) | [inline] |
Provides access to the underlying C GtkObject.
Reimplemented from Gtk::VBox.
| const GtkFontSelection* Gtk::FontSelection::gobj | ( | ) | const [inline] |
Provides access to the underlying C GtkObject.
Reimplemented from Gtk::VBox.
The string that represents this font.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
- Returns:
- A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.
The string that represents this font.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
- Returns:
- A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.
The text to display in order to demonstrate the selected font.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
- Returns:
- A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.
The text to display in order to demonstrate the selected font.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
- Returns:
- A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.
| bool Gtk::FontSelection::set_font_name | ( | const Glib::ustring & | fontname | ) |
Sets the currently-selected font.
Note that the fontsel needs to know the screen in which it will appear for this to work; this can be guaranteed by simply making sure that the fontsel is inserted in a toplevel window before you call this function.
Deprecated: 3.2: Use Gtk::FontChooser
- Parameters:
-
fontname A font name like "Helvetica 12" or "Times Bold 18".
- Returns:
trueif the font could be set successfully;falseif no such font exists or if the fontsel doesn't belong to a particular screen yet.
| void Gtk::FontSelection::set_preview_text | ( | const Glib::ustring & | fontname | ) |
Sets the text displayed in the preview area.
The text is used to show how the selected font looks.
Deprecated: 3.2: Use Gtk::FontChooser
- Parameters:
-
text The text to display in the preview area.
Friends And Related Function Documentation
| Gtk::FontSelection* wrap | ( | GtkFontSelection * | object, |
| bool | take_copy = false |
||
| ) | [related] |
A Glib::wrap() method for this object.
- Parameters:
-
object The C instance. take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
- Returns:
- A C++ instance that wraps this C instance.
The documentation for this class was generated from the following file:
- gtkmm/fontselection.h
