# Gdk::RGBA Class Reference

TODO. More...

List of all members.

## Public Member Functions

| RGBA (GdkRGBA* gobject, bool make_a_copy=true)
| RGBA (const RGBA& other)
RGBA& | operator= (const RGBA& other)
| ~RGBA ()
void | swap (RGBA& other)
GdkRGBA* | gobj ()
| Provides access to the underlying C instance.
const GdkRGBA* | gobj () const
| Provides access to the underlying C instance.
GdkRGBA* | gobj_copy () const
| Provides access to the underlying C instance. The caller is responsible for freeing it. Use when directly setting fields in structs.
| RGBA ()
| Instantiate a new Gdk::RGBA.
| RGBA (const Glib::ustring&value)
| Instantiate a new Gdk::RGBA.
void | set_grey (gushort value)
| Set a grey color, by using the same value for all color components.
void | set_grey_p (double g)
void | set_rgb (gushort red_, gushort green_, gushort blue_)
| Set the color, by specifying red, green, and blue color component values.
void | set_rgb_p (double red_, double green_, double blue_)
| Set the color, by specifying red, green, and blue color component values, as percentages.
void | set_hsv (double h, double s, double v)
void | set_hsl (double h, double s, double l)
bool | set (const Glib::ustring&value)
| Parses a textual specification of a color and fills in the red, green, and blue values.
gushort | get_red () const
| Get the red component of the color.
gushort | get_green () const
| Get the green component of the color.
gushort | get_blue () const
| Get the blue component of the color.
void | set_red (gushort value)
| Set the red component of the color.
void | set_green (gushort value)
| Set the green component of the color.
void | set_blue (gushort value)
| Set the blue component of the color.
double | get_red_p () const
| Get the red component of the color, as a percentage.
double | get_green_p () const
| Get the green component of the color, as a percentage.
double | get_blue_p () const
| Get the blue component of the color, as a percentage.
Glib::ustring | to_string () const

## Protected Attributes

GdkRGBA* | gobject_

## Related Functions

(Note that these are not member functions.)
bool | operator== (const RGBA& lhs, const RGBA& rhs)
bool | operator!= (const RGBA& lhs, const RGBA& rhs)
void | swap (RGBA& lhs, RGBA& rhs)
Gdk::RGBA | wrap (GdkRGBA* object, bool take_copy=false)
| A Glib::wrap() method for this object.

## Detailed Description

TODO.

## Constructor & Destructor Documentation

Gdk::RGBA::RGBA | ( | GdkRGBA * | gobject,
|  | bool | make_a_copy = `true` |
| ) |  |  | `[explicit]`

Gdk::RGBA::RGBA | ( | const RGBA& | other | ) |

Gdk::RGBA::~RGBA | ( |  | ) |

Gdk::RGBA::RGBA | ( |  | ) |

Instantiate a new Gdk::RGBA.

Gdk::RGBA::RGBA | ( | const Glib::ustring & | value | ) | `[explicit]`

Instantiate a new Gdk::RGBA.

The text string can be in any of the forms accepted by XParseRGBA; these include names for a color from rgb.txt, such as DarkSlateGray, or a hex specification such as 305050.

Parameters:

  | value | the string specifying the color..

## Member Function Documentation

gushort Gdk::RGBA::get_blue | ( |  | ) | const

Get the blue component of the color.

Returns:
  The blue component of the color.

double Gdk::RGBA::get_blue_p | ( |  | ) | const

Get the blue component of the color, as a percentage.

Returns:
  The blue component of the color, as a percentage.

gushort Gdk::RGBA::get_green | ( |  | ) | const

Get the green component of the color.

Returns:
  The green component of the color.

double Gdk::RGBA::get_green_p | ( |  | ) | const

Get the green component of the color, as a percentage.

Returns:
  The green component of the color, as a percentage.

gushort Gdk::RGBA::get_red | ( |  | ) | const

Get the red component of the color.

Returns:
  The red component of the color.

double Gdk::RGBA::get_red_p | ( |  | ) | const

Get the red component of the color, as a percentage.

Returns:
  The red component of the color, as a percentage.

const GdkRGBA* Gdk::RGBA::gobj | ( |  | ) | const`[inline]`

Provides access to the underlying C instance.

GdkRGBA* Gdk::RGBA::gobj | ( |  | ) | `[inline]`

Provides access to the underlying C instance.

GdkRGBA* Gdk::RGBA::gobj_copy | ( |  | ) | const

Provides access to the underlying C instance. The caller is responsible for freeing it. Use when directly setting fields in structs.

RGBA& Gdk::RGBA::operator= | ( | const RGBA& | other | ) |

bool Gdk::RGBA::set | ( | const Glib::ustring & | value | ) |

Parses a textual specification of a color and fills in the red, green, and blue values.

The text string can be in any of the forms accepted by XParseRGBA; these include names for a color from rgb.txt, such as DarkSlateGray, or a hex specification such as 305050.

Parameters:

  | value | the string specifying the color.

Returns:
  true if the parsing succeeded.

void Gdk::RGBA::set_blue | ( | gushort | value | ) |

Set the blue component of the color.

Parameters:

  | value | The blue component of the color.

void Gdk::RGBA::set_green | ( | gushort | value | ) |

Set the green component of the color.

Parameters:

  | value | The green component of the color.

void Gdk::RGBA::set_grey | ( | gushort | value | ) |

Set a grey color, by using the same value for all color components.

Parameters:

  | value | The value to be used for the red, green, and blue components.

void Gdk::RGBA::set_grey_p | ( | double | g | ) |

void Gdk::RGBA::set_hsl | ( | double | h,
|  | double | s,
|  | double | l |
| ) |  |  |

void Gdk::RGBA::set_hsv | ( | double | h,
|  | double | s,
|  | double | v |
| ) |  |  |

void Gdk::RGBA::set_red | ( | gushort | value | ) |

Set the red component of the color.

Parameters:

  | value | The red component of the color.

void Gdk::RGBA::set_rgb | ( | gushort | red_,
|  | gushort | green_,
|  | gushort | blue_ |
| ) |  |  |

Set the color, by specifying red, green, and blue color component values.

Parameters:

  | red_ | The red component of the color.
  | green_ | The green component of the color.
  | blue_ | The blue component of the color.

void Gdk::RGBA::set_rgb_p | ( | double | red_,
|  | double | green_,
|  | double | blue_ |
| ) |  |  |

Set the color, by specifying red, green, and blue color component values, as percentages.

Parameters:

  | red_ | The red component of the color, as a percentage.
  | green_ | The green component of the color, as a percentage.
  | blue_ | The blue component of the color, as a percentage.

void Gdk::RGBA::swap | ( | RGBA& | other | ) |

Glib::ustring Gdk::RGBA::to_string | ( |  | ) | const

## Friends And Related Function Documentation

bool operator!= | ( | const RGBA& | lhs,
|  | const RGBA& | rhs |
| ) |  |  | `[related]`

Parameters:

  | lhs | The left-hand side
  | rhs | The right-hand side

Returns:
  The result

bool operator== | ( | const RGBA& | lhs,
|  | const RGBA& | rhs |
| ) |  |  | `[related]`

Parameters:

  | lhs | The left-hand side
  | rhs | The right-hand side

Returns:
  The result

void swap | ( | RGBA& | lhs,
|  | RGBA& | rhs |
| ) |  |  | `[related]`

Parameters:

  | lhs | The left-hand side
  | rhs | The right-hand side

Gdk::RGBA wrap | ( | GdkRGBA * | object,
|  | bool | take_copy = `false` |
| ) |  |  | `[related]`

A Glib::wrap() method for this object.

Parameters:

  | 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.

Returns:
  A C++ instance that wraps this C instance.

## Member Data Documentation

GdkRGBA* Gdk::RGBA::gobject_`[protected]`

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

- gdkmm/rgba.h