![]() |

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.
Public Member Functions | |
| FontSelection () | |
| const Button* | get_filter_button () const |
| Button* | get_filter_button () |
| const Entry* | get_font_entry () const |
| Entry* | get_font_entry () |
| Glib::ustring | get_font_name () const |
| Gets the currently-selected font name. | |
| const Entry* | get_font_style_entry () const |
| Entry* | get_font_style_entry () |
| const RadioButton* | get_pixels_button () const |
| RadioButton* | get_pixels_button () |
| const RadioButton* | get_points_button () const |
| RadioButton* | get_points_button () |
| const Entry* | get_preview_entry () const |
| Entry* | get_preview_entry () |
| Glib::ustring | get_preview_text () const |
| const Entry* | get_size_entry () const |
| Entry* | get_size_entry () |
| const GtkFontSelection* | gobj () const |
| Provides access to the underlying C GtkObject. | |
| GtkFontSelection* | gobj () |
| Provides access to the underlying C GtkObject. | |
| Glib::PropertyProxy_ReadOnly< Glib::ustring > | property_font_name () const |
| The X string that represents this font. | |
| Glib::PropertyProxy<Glib::ustring> | property_font_name () |
| The X string that represents this font. | |
| Glib::PropertyProxy_ReadOnly< Glib::ustring > | property_preview_text () const |
| The text to display in order to demonstrate the selected font. | |
| Glib::PropertyProxy<Glib::ustring> | property_preview_text () |
| The text to display in order to demonstrate the selected font. | |
| bool | set_font_name (const Glib::ustring& fontname) |
| Sets the currently-selected font. | |
| void | set_preview_text (const Glib::ustring& fontname) |
| virtual | ~FontSelection () |
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. | |
| virtual Gtk::FontSelection::~FontSelection | ( | ) | [virtual] |
| Gtk::FontSelection::FontSelection | ( | ) |
| const Button* Gtk::FontSelection::get_filter_button | ( | ) | const |
| Button* Gtk::FontSelection::get_filter_button | ( | ) |
| const Entry* Gtk::FontSelection::get_font_entry | ( | ) | const |
| Entry* Gtk::FontSelection::get_font_entry | ( | ) |
| Glib::ustring Gtk::FontSelection::get_font_name | ( | ) | const |
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.
0 if no font is selected. You must free this string with Glib::free(). | const Entry* Gtk::FontSelection::get_font_style_entry | ( | ) | const |
| Entry* Gtk::FontSelection::get_font_style_entry | ( | ) |
| const RadioButton* Gtk::FontSelection::get_pixels_button | ( | ) | const |
| RadioButton* Gtk::FontSelection::get_pixels_button | ( | ) |
| const RadioButton* Gtk::FontSelection::get_points_button | ( | ) | const |
| RadioButton* Gtk::FontSelection::get_points_button | ( | ) |
| const Entry* Gtk::FontSelection::get_preview_entry | ( | ) | const |
| Entry* Gtk::FontSelection::get_preview_entry | ( | ) |
| Glib::ustring Gtk::FontSelection::get_preview_text | ( | ) | const |
| const Entry* Gtk::FontSelection::get_size_entry | ( | ) | const |
| Entry* Gtk::FontSelection::get_size_entry | ( | ) |
| const GtkFontSelection* Gtk::FontSelection::gobj | ( | ) | const [inline] |
| GtkFontSelection* Gtk::FontSelection::gobj | ( | ) | [inline] |
| Glib::PropertyProxy_ReadOnly<Glib::ustring> Gtk::FontSelection::property_font_name | ( | ) | const |
The X string that represents this font.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
| Glib::PropertyProxy<Glib::ustring> Gtk::FontSelection::property_font_name | ( | ) |
The X string that represents this font.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
| Glib::PropertyProxy_ReadOnly<Glib::ustring> Gtk::FontSelection::property_preview_text | ( | ) | const |
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.
| Glib::PropertyProxy<Glib::ustring> Gtk::FontSelection::property_preview_text | ( | ) |
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.
| 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.
| fontname | A font name like "Helvetica 12" or "Times Bold 18". |
true if the font could be set successfully; #false if 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 | ) |
| Gtk::FontSelection* wrap | ( | GtkFontSelection * | object, | |
| bool | take_copy = false | |||
| ) | [related] |
A Glib::wrap() method for this object.
| 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. |