glibmm 2.4: Gio::Icon Class Reference

Main Page glibmm Namespaces Book

# Gio::Icon Class Reference

This is a very minimal interface for icons. More...

Inheritance diagram for Gio::Icon:

[legend]

List of all members.

## Public Member Functions
virtual | ~Icon ()
GIcon* | gobj ()
| Provides access to the underlying C GObject.
const GIcon* | gobj () const
| Provides access to the underlying C GObject.
guint | hash () const
| Gets a hash for an icon.
bool | equal (const Glib::RefPtr<Icon>& other) const
## Static Public Member Functions
static void | add_interface (GType gtype_implementer)
## Related Functions
(Note that these are not member functions.)
Glib::RefPtr<Gio::Icon> | wrap (GIcon* object, bool take_copy=false)
| A Glib::wrap() method for this object.

## Detailed Description

This is a very minimal interface for icons.

It provides functions for checking the equality of two icons and hashing of icons. Glib::Icon does not provide the actual pixmap for the icon as this is out of GIO's scope. However implementations of Icon may contain the name of an icon (see ThemedIcon), or the path to an icon (see LoadableIcon).

To obtain a hash of an Icon instance, see hash().

To check if two Icon instances are equal, see equal().

Since glibmm 2.16:

## Constructor & Destructor Documentation

virtual Gio::Icon::~Icon | ( |  | ) | `[virtual]`

## Member Function Documentation

static void Gio::Icon::add_interface | ( | GType | gtype_implementer | ) | `[static]`

Reimplemented in Gio::LoadableIcon.

GIcon* Gio::Icon::gobj | ( |  | ) | `[inline]`

Provides access to the underlying C GObject.

Reimplemented from Glib::Interface.

Reimplemented in Gio::FileIcon, Gio::LoadableIcon, and Gio::ThemedIcon.

const GIcon* Gio::Icon::gobj | ( |  | ) | const`[inline]`

Provides access to the underlying C GObject.

Reimplemented from Glib::Interface.

Reimplemented in Gio::FileIcon, Gio::LoadableIcon, and Gio::ThemedIcon.

guint Gio::Icon::hash | ( |  | ) | const

Gets a hash for an icon.

Parameters:

  | icon | gconstpointer to an icon object.

Returns:
  A `unsigned int` containing a hash for the icon, suitable for use in a HashTable or similar data structure.

bool Gio::Icon::equal | ( | const Glib::RefPtr<Icon>& | other | ) | const

## Friends And Related Function Documentation

Glib::RefPtr<Gio::Icon> wrap | ( | GIcon * | 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.

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

- icon.h