Xfce Foundation Classes
Main Page | Index | Namespace List | Alphabetical List | Class List | File List

# Xfc::Pango::AttrSize Class Reference

Pango size C++ wrapper class. More...

`#include <xfc/pango/attributes.hh>`

Inheritance diagram for Xfc::Pango::AttrSize:

List of all members.

## Public Member Functions

Constructors

- AttrSize (int size, bool absolute=false)
    Construct a new font-size attribute.

Accessors

- PangoAttrSize * pango_attr_size () const
    Get a pointer to the PangoAttrSize structure.
- int size () const
    Returns the font size.
- bool absolute () const
    Returns false if the font size is in fractional units and true if it's in device units.

Methods

- void set_size (int size)
    Sets the font size.
- void set_absolute (bool absolute)
    Sets whether the font size is in fractional units or device units.

## Detailed Description

Pango size C++ wrapper class.

AttrSize wraps the size attribute (ATTR_SIZE).

## Constructor & Destructor Documentation

Xfc::Pango::AttrSize::AttrSize | ( | int | size,
|  | bool | absolute = `false`
| ) | `[explicit]`

Construct a new font-size attribute.

Parameters:

  | size | The font size.
  | absolute | Set false if size is in points and true if size is in device units.

If absolute is false the font size is in PANGO_SCALEths of a point and the font-size attribute created is in fractional units. If absolute is true the font size is in PANGO_SCALEths of a device unit and the font-size attribute created is in device units.

The PANGO_SCALE macro represents the scale between dimensions used for Pango distances and device units. (The definition of device units is dependent on the output device; it will typically be pixels for a screen, and points for a printer.) PANGO_SCALE is currently 1024, but this may be changed in the future.

When setting font sizes, device units are always considered to be points (as in "12 point font"), rather than pixels.

## Member Function Documentation

void Xfc::Pango::AttrSize::set_absolute | ( | bool | absolute | ) |

Sets whether the font size is in fractional units or device units.

Parameters:

  | absolute | Set false if the size is in points and true if it's in device units.

void Xfc::Pango::AttrSize::set_size | ( | int | size | ) |

Sets the font size.

Parameters:

  | size | The new font size.

The documentation for this class was generated from the following file:

- attributes.hh

Xfce Foundation Classes

Copyright © 2004-2005 The XFC Development Team | XFC 4.3