Xfce Foundation Classes
Main Page  | IndexNamespace List  |  Alphabetical List  |  Class List  |  File List


Xfc::Gtk::FontButton Class Reference

A GtkFontButton C++ wrapper class. More...

#include <xfc/gtk/fontbutton.hh>

Inheritance diagram for Xfc::Gtk::FontButton:

Xfc::Gtk::Button Xfc::Gtk::Bin Xfc::Gtk::Container Xfc::Gtk::Widget Xfc::Gtk::Object Xfc::Atk::Implementor Xfc::G::Object Xfc::G::TypeInterface Xfc::G::TypeInstance Xfc::G::TypeInstance Xfc::Trackable Xfc::Trackable List of all members.

Signal Prototypes

Public Member Functions

Accessors
Methods
Signal Proxies

Detailed Description

A GtkFontButton C++ wrapper class.

The FontButton object is a button which displays the currently selected font and when clicked, opens a font selection dialog to change the font. It is a suitable widget for selecting a font in a preference dialog.

See also: the Font Selection HOWTO and example.


Constructor & Destructor Documentation

Xfc::Gtk::FontButton::FontButton ( GtkFontButton *  font_button,
bool  owns_reference = false 
) [explicit, protected]

Construct a new FontButton from an existing GtkFontButton.

Parameters:
font_button A pointer to a GtkFontButton.
owns_reference Set false if the initial reference count is floating, set true if it's not.
The font_button can be a newly created GtkFontButton or an existing GtkFontButton (see G::Object::Object).

Xfc::Gtk::FontButton::FontButton ( const String fontname  )  [explicit]

Constructs a new font picker widget.

Parameters:
fontname The name of font to display in the font selection dialog.

Xfc::Gtk::FontButton::FontButton ( GtkFontButton *  font_button,
bool  owns_reference = false 
) [explicit, protected]

Construct a new FontButton from an existing GtkFontButton.

Parameters:
font_button A pointer to a GtkFontButton.
owns_reference Set false if the initial reference count is floating, set true if it's not.
The font_button can be a newly created GtkFontButton or an existing GtkFontButton (see G::Object::Object).

Xfc::Gtk::FontButton::FontButton ( const String fontname  )  [explicit]

Constructs a new font picker widget.

Parameters:
fontname The name of font to display in the font selection dialog.


Member Function Documentation

String Xfc::Gtk::FontButton::get_title (  )  const

Retrieves the title of the font selection dialog.

Returns:
The title string.

bool Xfc::Gtk::FontButton::get_use_font (  )  const

Determines whether the selected font is used in the label.

Returns:
Whether the selected font is used in the label.

bool Xfc::Gtk::FontButton::get_use_size (  )  const

Determines whether the selected size is used in the label.

Returns:
Whether the selected font is used in the label.

String Xfc::Gtk::FontButton::get_font_name (  )  const

Retrieves the name of the currently selected font.

Returns:
The font name.

bool Xfc::Gtk::FontButton::get_show_style (  )  const

Determines whether the name of the font style will be shown in the label.

Returns:
Whether the font style will be shown in the label.

bool Xfc::Gtk::FontButton::get_show_size (  )  const

Determines whether the font size will be shown in the label.

Returns:
Whether the font size will be shown in the label.

void Xfc::Gtk::FontButton::set_title ( const String title  ) 

Sets the title for the font selection dialog.

Parameters:
title A string containing the font selection dialog title.

void Xfc::Gtk::FontButton::set_use_font ( bool  use_font  ) 

If use_font is true, the font name will be written using the selected font.

Parameters:
use_font If true, the font name will be written using the font chosen.

void Xfc::Gtk::FontButton::set_use_size ( bool  use_size  ) 

If use_size is true, the font name will be written using the selected size.

Parameters:
use_size If true, then font name will be written using the selected size.

bool Xfc::Gtk::FontButton::set_font_name ( const String fontname  ) 

Sets or updates the currently displayed font in font picker dialog.

Parameters:
fontname The name of the font to display in font selection dialog.
Returns:
true if the font was found, otherwise false.

void Xfc::Gtk::FontButton::set_show_style ( bool  show_style  ) 

If show_style is true the font style will be displayed along with the name of the selected font.

Parameters:
show_style Set true if the font style should be displayed in the label.

void Xfc::Gtk::FontButton::set_show_size ( bool  show_size  ) 

If show_size is true, the font size will be displayed along with the name of the selected font.

Parameters:
show_size Set true if the font size should be displayed in dialog.

const FontSetSignalProxy Xfc::Gtk::FontButton::signal_font_set (  ) 

Connect to the font_set_signal; emitted when the user selects a font.

When handling this signal, use get_font_name() to find out which font was just selected.


Member Data Documentation

const FontSetSignalType Xfc::Gtk::FontButton::font_set_signal [static, protected]

Font set signal (see signal_font_set()).

Calls a slot with the signature:

< void function();
<


The documentation for this class was generated from the following file: Xfce Foundation Classes
Copyright © 2004-2005 The XFC Development Team XFC 4.3