Icon theming support ThemedIcon is an implementation of Gio::Icon that supports icon themes. More...
#include <giomm/themedicon.h>
Public Member Functions | |
virtual | ~ThemedIcon () |
GThemedIcon* | gobj () |
Provides access to the underlying C GObject. | |
const GThemedIcon* | gobj () const |
Provides access to the underlying C GObject. | |
GThemedIcon* | gobj_copy () |
Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. | |
void | prepend_name (const std::string& iconname) |
Prepend a name to the list of icons from within icon. | |
void | append_name (const std::string& iconname) |
Append a name to the list of icons from within icon. | |
Glib::StringArrayHandle | get_names () const |
Glib::PropertyProxy_ReadOnly < bool > | property_use_default_fallbacks () const |
Whether to use default fallbacks found by shortening the name at '-' characters. | |
Static Public Member Functions | |
static Glib::RefPtr< ThemedIcon > | create (const std::string& iconname, bool use_default_callbacks=false) |
Protected Member Functions | |
ThemedIcon (const std::string& iconname, bool use_default_callbacks=false) | |
Related Functions | |
(Note that these are not member functions.) | |
Glib::RefPtr< Gio::ThemedIcon > | wrap (GThemedIcon* object, bool take_copy=false) |
A Glib::wrap() method for this object. |
Icon theming support ThemedIcon is an implementation of Gio::Icon that supports icon themes.
ThemedIcon contains a list of all of the icons present in an icon theme, so that icons can be looked up quickly. ThemedIcon does not provide actual pixmaps for icons, just the icon names. Ideally something like Gtk::IconTheme::choose_icon() should be used to resolve the list of names so that fallback icons work nicely with themes that inherit other themes.
virtual Gio::ThemedIcon::~ThemedIcon | ( | ) | [virtual] |
Gio::ThemedIcon::ThemedIcon | ( | const std::string & | iconname, | |
bool | use_default_callbacks = false | |||
) | [explicit, protected] |
void Gio::ThemedIcon::append_name | ( | const std::string & | iconname | ) |
Append a name to the list of icons from within icon.
<note>
Note that doing so invalidates the hash computed by prior calls to g_icon_hash().
</note>
iconname | Name of icon to append to list of icons from within icon. |
static Glib::RefPtr<ThemedIcon> Gio::ThemedIcon::create | ( | const std::string & | iconname, | |
bool | use_default_callbacks = false | |||
) | [static] |
Glib::StringArrayHandle Gio::ThemedIcon::get_names | ( | ) | const |
const GThemedIcon* Gio::ThemedIcon::gobj | ( | ) | const [inline] |
Provides access to the underlying C GObject.
Reimplemented from Gio::Icon.
GThemedIcon* Gio::ThemedIcon::gobj | ( | ) | [inline] |
Provides access to the underlying C GObject.
Reimplemented from Gio::Icon.
GThemedIcon* Gio::ThemedIcon::gobj_copy | ( | ) |
Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
void Gio::ThemedIcon::prepend_name | ( | const std::string & | iconname | ) |
Prepend a name to the list of icons from within icon.
<note>
Note that doing so invalidates the hash computed by prior calls to g_icon_hash().
</note>
iconname | Name of icon to prepend to list of icons from within icon. |
Glib::PropertyProxy_ReadOnly<bool> Gio::ThemedIcon::property_use_default_fallbacks | ( | ) | const |
Whether to use default fallbacks found by shortening the name at '-' characters.
Ignores names after the first if multiple names are given.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::RefPtr< Gio::ThemedIcon > wrap | ( | GThemedIcon * | object, | |
bool | take_copy = false | |||
) | [related] |
A Glib::wrap() method for this object.
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. |