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

# Xfc::Gtk::RcStyle Class Reference

A GtkRcStyle C++ wrapper class. More...

`#include <xfc/gtk/rc.hh>`

Inheritance diagram for Xfc::Gtk::RcStyle:

List of all members.

## Public Member Functions

Constructors

- RcStyle ()
    Constructs a new RcStyle with no fields set and a reference count of 1 that the caller owns.
- virtual ~RcStyle ()
    Destructor.

Accessors

- GtkRcStyle * gtk_rc_style () const
    Get a pointer to the GtkRcStyle structure.
- operator GtkRcStyle * () const
    Conversion operator; safely converts a RcStyle to a GtkRcStyle pointer.
- String name () const
    Gets the name of the RC style.
- String bg_pixmap_name (StateType state_type) const
    Gets the name of the pixmap used as the background for state_type.
- Pointer< Pango::FontDescription > font_description () const
    Gets the font description for the RC style.
- Gdk::Color fg (StateType state_type) const
    Gets the foreground color for state_type.
- bool fg_set (StateType state) const
    Determines whether the foreground color for state_type is set.
- Gdk::Color bg (StateType state_type) const
    Gets the background color for state_type.
- bool bg_set (StateType state) const
    Determines whether the background color for state_type is set.
- Gdk::Color text (StateType state_type) const
    Gets the text color for state_type.
- bool text_set (StateType state) const
    Determines whether the text color for state_type is set.
- Gdk::Color base (StateType state_type) const
    Gets the base color for state_type.
- bool base_set (StateType state) const
    Determines whether the base color for state_type is set.
- int xthickness () const
    Obtains the current value used for various horizontal padding values in GTK+, such as frame and bevel size.
- int ythickness () const
    Obtains the current value used for various vertical padding values in GTK+, such as frame and bevel size.

Methods

- Pointer< RcStyle > copy () const
    Makes a copy of the specified RcStyle.
- void set_name (const String &name)
    Sets the name of the RC style.
- void set_bg_pixmap_name (StateType state_type, const String &name)
    Sets the name of the pixmap to use as the background for state_type.
- void set_font_description (const Pango::FontDescription *font_desc) const
    Sets the font description for the RC style.
- void set_fg (StateType state_type, const Gdk::Color &color)
    Sets the foreground color for state_type.
- void unset_fg (StateType state_type)
    Unsets the foreground color for state_type.
- void set_bg (StateType state_type, const Gdk::Color &color)
    Sets the background color for state_type.
- void unset_bg (StateType state_type)
    Unsets the background color for state_type.
- void set_text (StateType state_type, const Gdk::Color &color)
    Sets the text color for state_type.
- void unset_text (StateType state_type)
    Unsets the text color for state_type.
- void set_base (StateType state_type, const Gdk::Color &color)
    Sets the base color for state_type.
- void unset_base (StateType state_type)
    Unsets the base color for state_type.
- void set_xthickness (int size)
    Sets the current value used for various horizontal padding values in GTK+, such as frame and bevel size.
- void set_ythickness (int size)
    Sets the current value used for various vertical padding values in GTK+, such as frame and bevel size.

## Protected Member Functions

Constructors

- RcStyle (GtkRcStyle *rc_style, bool owns_reference=true)
    Construct a new RcStyle from an existing GtkRcStyle.

## Detailed Description

A GtkRcStyle C++ wrapper class.

The RcStyle structure is used to represent a set of information about the appearance of a widget. This can later be composited together with other RcStyle structures to form a Style.

Note: dynamically allocated objects must either be unreferenced or assigned to a smart pointer. Stack objects are automatically unreferenced when they go out of scope.

## Constructor & Destructor Documentation

Xfc::Gtk::RcStyle::RcStyle | ( | GtkRcStyle * | rc_style,
|  | bool | owns_reference = `true`
| ) | `[explicit, protected]`

Construct a new RcStyle from an existing GtkRcStyle.

Parameters:

  | rc_style | A pointer to a GtkRcStyle.
  | owns_reference | Set false if the initial reference count is floating, set true if it's not.

The rc_style can be a newly created GtkRcStyle or an existing GtkRcStyle (see G::Object::Object).

## Member Function Documentation

Gdk::Color Xfc::Gtk::RcStyle::base | ( | StateType | state_type | ) | const

Gets the base color for state_type.

Parameters:

  | state_type | One of the values in the Gtk::StateType enumeration.

Returns:
  The Gdk::Color for state_type.

bool Xfc::Gtk::RcStyle::base_set | ( | StateType | state | ) | const

Determines whether the base color for state_type is set.

Returns:
  true if the base color is set.

Gdk::Color Xfc::Gtk::RcStyle::bg | ( | StateType | state_type | ) | const

Gets the background color for state_type.

Parameters:

  | state_type | One of the values in the Gtk::StateType enumeration.

Returns:
  The Gdk::Color for state_type.

String Xfc::Gtk::RcStyle::bg_pixmap_name | ( | StateType | state_type | ) | const

Gets the name of the pixmap used as the background for state_type.

Parameters:

  | state_type | One of the values in the Gtk::StateType enumeration.

Returns:
  The name of the background pixmap, or a null string if a pixmap name has not been set.

bool Xfc::Gtk::RcStyle::bg_set | ( | StateType | state | ) | const

Determines whether the background color for state_type is set.

Returns:
  true if the background color is set.

Pointer<RcStyle> Xfc::Gtk::RcStyle::copy | ( |  | ) | const

| Makes a copy of the specified RcStyle. This method will correctly copy an RC style that is a member of a class derived from RcStyle.

Gdk::Color Xfc::Gtk::RcStyle::fg | ( | StateType | state_type | ) | const

Gets the foreground color for state_type.

Parameters:

  | state_type | One of the values in the Gtk::StateType enumeration.

Returns:
  The Gdk::Color for state_type.

bool Xfc::Gtk::RcStyle::fg_set | ( | StateType | state | ) | const

Determines whether the foreground color for state_type is set.

Returns:
  true if the foreground color is set.

Pointer<Pango::FontDescription> Xfc::Gtk::RcStyle::font_description | ( |  | ) | const

Gets the font description for the RC style.

Returns:
  A Pango::FontDescription.

String Xfc::Gtk::RcStyle::name | ( |  | ) | const

Gets the name of the RC style.

Returns:
  The name of the RC style, or a null string if a name has not been set.

void Xfc::Gtk::RcStyle::set_base | ( | StateType | state_type,
|  | const Gdk::Color & | color
| ) |

Sets the base color for state_type.

Parameters:

  | state_type | One of the values in the Gtk::StateType enumeration.
  | color | The Gdk::Color for state_type.

void Xfc::Gtk::RcStyle::set_bg | ( | StateType | state_type,
|  | const Gdk::Color & | color
| ) |

Sets the background color for state_type.

Parameters:

  | state_type | One of the values in the Gtk::StateType enumeration.
  | color | The Gdk::Color for state_type.

void Xfc::Gtk::RcStyle::set_bg_pixmap_name | ( | StateType | state_type,
|  | const String & | name
| ) |

Sets the name of the pixmap to use as the background for state_type.

Parameters:

  | state_type | One of the values in the Gtk::StateType enumeration.
  | name | The new pixmap name, or null to unset the current pixmap name.

void Xfc::Gtk::RcStyle::set_fg | ( | StateType | state_type,
|  | const Gdk::Color & | color
| ) |

Sets the foreground color for state_type.

Parameters:

  | state_type | One of the values in the Gtk::StateType enumeration.
  | color | The Gdk::Color for state_type.

void Xfc::Gtk::RcStyle::set_font_description | ( | const Pango::FontDescription * | font_desc | ) | const

Sets the font description for the RC style.

Parameters:

  | font_desc | The new font description, or null to unset the current font description.

void Xfc::Gtk::RcStyle::set_name | ( | const String & | name | ) |

Sets the name of the RC style.

Parameters:

  | name | The new name for the RC style, or null to unset the current name.

void Xfc::Gtk::RcStyle::set_text | ( | StateType | state_type,
|  | const Gdk::Color & | color
| ) |

Sets the text color for state_type.

Parameters:

  | state_type | One of the values in the Gtk::StateType enumeration.
  | color | The Gdk::Color for state_type.

void Xfc::Gtk::RcStyle::set_xthickness | ( | int | size | ) |

Sets the current value used for various horizontal padding values in GTK+, such as frame and bevel size.

Parameters:

  | size | The new horizontal padding value.

void Xfc::Gtk::RcStyle::set_ythickness | ( | int | size | ) |

Sets the current value used for various vertical padding values in GTK+, such as frame and bevel size.

Parameters:

  | size | The new vertical padding value.

Gdk::Color Xfc::Gtk::RcStyle::text | ( | StateType | state_type | ) | const

Gets the text color for state_type.

Parameters:

  | state_type | One of the values in the Gtk::StateType enumeration.

Returns:
  The Gdk::Color for state_type.

bool Xfc::Gtk::RcStyle::text_set | ( | StateType | state | ) | const

Determines whether the text color for state_type is set.

Returns:
  true if the text color is set.

void Xfc::Gtk::RcStyle::unset_base | ( | StateType | state_type | ) |

Unsets the base color for state_type.

Parameters:

  | state_type | One of the values in the Gtk::StateType enumeration.

void Xfc::Gtk::RcStyle::unset_bg | ( | StateType | state_type | ) |

Unsets the background color for state_type.

Parameters:

  | state_type | One of the values in the Gtk::StateType enumeration.

void Xfc::Gtk::RcStyle::unset_fg | ( | StateType | state_type | ) |

Unsets the foreground color for state_type.

Parameters:

  | state_type | One of the values in the Gtk::StateType enumeration.

void Xfc::Gtk::RcStyle::unset_text | ( | StateType | state_type | ) |

Unsets the text color for state_type.

Parameters:

  | state_type | One of the values in the Gtk::StateType enumeration.

int Xfc::Gtk::RcStyle::xthickness | ( |  | ) | const

Obtains the current value used for various horizontal padding values in GTK+, such as frame and bevel size.

Returns:
  The current horizontal padding value.

int Xfc::Gtk::RcStyle::ythickness | ( |  | ) | const

Obtains the current value used for various vertical padding values in GTK+, such as frame and bevel size.

Returns:
  The current vertical padding value.

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

- rc.hh

Xfce Foundation Classes

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