Reference Manual

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

# Inti::Pango::AttrColor Class Reference

A PangoAttrColor C++ wrapper class. More...

`#include <inti/pango/attributes.h>`

Inheritance diagram for Inti::Pango::AttrColor:

List of all members.

## Public Member Functions

Accessors

- PangoAttrColor * pango_attr_color () const
    Get a pointer to the PangoAttrColor structure.
- unsigned short red () const
    Returns the red value (ranging from 0 to 65535).
- unsigned short green () const
    Returns the green value (ranging from 0 to 65535).
- unsigned short blue () const
    Returns the blue value (ranging from 0 to 65535).

Methods

- void set_color (unsigned short red, unsigned short green, unsigned short blue)
    Sets the red, green and blue values.
- void set_grey (unsigned short value)
    Sets a grey scale color with the red, green and blue values set to value.
- void set_red (unsigned short value)
    Sets the red value.
- void set_green (unsigned short value)
    Sets the green value.
- void set_blue (unsigned short value)
    Sets the blue value.

## Protected Member Functions

Constructors

- AttrColor (PangoAttribute *attr, bool copy)
    Construct a new color attribute from an existing color PangoAttribute.

## Detailed Description

A PangoAttrColor C++ wrapper class.

AttrColor is the base class for the foreground and background color attributes.

## Constructor & Destructor Documentation

Inti::Pango::AttrColor::AttrColor | ( | PangoAttribute * | attr,
|  | bool | copy
| ) | `[explicit, protected]`

Construct a new color attribute from an existing color PangoAttribute.

Parameters:

  attr | An color PangoAttribute.
  copy | Set true if a copy of attr should be used.

If copy is true attr is copied. If false attr is assumed to be a valid color attribute that must be freed. Either way AttrColor will own the PangoAttribute and free it when it's no longer required.

## Member Function Documentation

void Inti::Pango::AttrColor::set_blue | ( | unsigned short | value | ) |

Sets the blue value.

Parameters:

  value | The blue value.

void Inti::Pango::AttrColor::set_color | ( | unsigned short | red,
|  | unsigned short | green,
|  | unsigned short | blue
| ) |

Sets the red, green and blue values.

Parameters:

  red | The red value (ranging from 0 to 65535).
  green | The green value.
  blue | The blue value.

void Inti::Pango::AttrColor::set_green | ( | unsigned short | value | ) |

Sets the green value.

Parameters:

  value | The green value.

void Inti::Pango::AttrColor::set_grey | ( | unsigned short | value | ) |

Sets a grey scale color with the red, green and blue values set to value.

Parameters:

  value | The grey value.

void Inti::Pango::AttrColor::set_red | ( | unsigned short | value | ) |

Sets the red value.

Parameters:

  value | The red value.

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

- attributes.h

Main Page - Footer