GFC Logo GFC Title Logo
Reference Manual
Main Page  |  Namespace List  |  Alphabetical List  |  Class List  |  File List

GFC::Pango::FontMetrics Class Reference

A PangoFontMetrics C++ wrapper class. More...

#include <gfc/pango/font.hh>

Inheritance diagram for GFC::Pango::FontMetrics:

GFC::G::Boxed GFC::Object GFC::Trackable List of all members.

Public Member Functions

Constructors
Accessors

Detailed Description

A PangoFontMetrics C++ wrapper class.

FontMetrics structure holds the overall metric information for a font.


Constructor & Destructor Documentation

GFC::Pango::FontMetrics::FontMetrics PangoFontMetrics *  metrics  )  [explicit]
 

Construct a new font metrics from an existing PangoFontMetrics.

Parameters:
metrics A pointer to a PangoFontMetrics.

The metrics can be a newly created PangoFontMetrics or an existing PangoFontMetrics. The font metrics object created is a temporary object. It doesn't take over the ownership of PangoFontMetrics and PangoFontMetrics is not freed by the destructor.

GFC::Pango::FontMetrics::FontMetrics PangoFontMetrics *  metrics,
bool  copy
 

Construct a new font metrics from an existing PangoFontMetrics.

Parameters:
metrics A pointer to a PangoFontMetrics.
copy Whether the FontMetrics object should make a copy of PangoFontMetrics or not.

The metrics can be a newly created PangoFontMetrics or an existing PangoFontMetrics. If copy is true FontMetrics will make a copy of PangoFontMetrics. If copy is false FontMetrics wont make a copy but instead takes over the ownership of PangoFontMetrics. Either way, the destructor will free PangoFontMetrics when the FontMetrics object is destroyed. This constructor is used by G::Boxed::wrap() to wrap PangoFontMetrics objects in a C++ wrapper.

GFC::Pango::FontMetrics::FontMetrics const FontMetrics src  ) 
 

Copy constructor.

Parameters:
src The source FontMetrics.


Member Function Documentation

int GFC::Pango::FontMetrics::get_approximate_char_width  )  const
 

Gets the approximate character width for the font metrics structure.

Returns:
The character width, in pango units. (1 point == PANGO_SCALE pango units.)

This is merely a representative value useful, for example, for determining the initial size for a window. Actual characters in text will be wider and narrower than this.

int GFC::Pango::FontMetrics::get_approximate_digit_width  )  const
 

Gets the approximate digit width for the font metrics structure.

Returns:
The digit width, in pango units. (1 point == PANGO_SCALE pango units.)

This is merely a representative value useful, for example, for determining the initial size for a window. Actual digits in text can be wider and narrower than this.

int GFC::Pango::FontMetrics::get_ascent  )  const
 

Returns the ascent from a font metrics structure.

Returns:
The ascent, in pango units. (1 point == PANGO_SCALE pango units.)

The ascent is the distance from the baseline to the logical top of a line of text. (The logical top may be above or below the top of the actual drawn ink. It is necessary to lay out the text to figure where the ink will be.)

int GFC::Pango::FontMetrics::get_descent  )  const
 

Gets the descent from a font metrics structure.

Returns:
The descent, in pango units. (1 point == PANGO_SCALE pango units.)

The descent is the distance from the baseline to the logical bottom of a line of text. (The logical bottom may be above or below the bottom of the actual drawn ink. It is necessary to lay out the text to figure where the ink will be.)

FontMetrics& GFC::Pango::FontMetrics::operator= const FontMetrics src  ) 
 

Assignment operator.

Parameters:
src The source FontMetrics.


The documentation for this class was generated from the following file:
Generated on Tue Aug 24 00:34:45 2004 for GFC-UI by doxygen 1.3.8