<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <title>glibmm: Gio::Icon Class Reference</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <link href="doxygen.css" rel="stylesheet" type="text/css"/> </head> <body> <!-- Generated by Doxygen 1.6.1 --> <div class="navigation" id="top"> <div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li><a href="modules.html"><span>Modules</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li class="current"><a href="annotated.html"><span>Classes</span></a></li> <li><a href="examples.html"><span>Examples</span></a></li> </ul> </div> <div class="tabs"> <ul> <li><a href="annotated.html"><span>Class List</span></a></li> <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> <li><a href="functions.html"><span>Class Members</span></a></li> </ul> </div> <div class="navpath"><a class="el" href="namespaceGio.html">Gio</a>::<a class="el" href="classGio_1_1Icon.html">Icon</a> </div> </div> <div class="contents"> <h1>Gio::Icon Class Reference</h1><!-- doxytag: class="Gio::Icon" --><!-- doxytag: inherits="Glib::Interface" --> <p>This is a very minimal interface for icons. <a href="#_details">More...</a></p> <p>Inherits <a class="el" href="classGlib_1_1Interface.html">Glib::Interface</a>.</p> <p>Inherited by <a class="el" href="classGio_1_1Emblem.html">Gio::Emblem</a>, <a class="el" href="classGio_1_1EmblemedIcon.html">Gio::EmblemedIcon</a>, <a class="el" href="classGio_1_1LoadableIcon.html">Gio::LoadableIcon</a>, and <a class="el" href="classGio_1_1ThemedIcon.html">Gio::ThemedIcon</a>.</p> <div class="dynheader"> Collaboration diagram for Gio::Icon:</div> <div class="dynsection"> <div class="center"><img src="classGio_1_1Icon__coll__graph.png" border="0" usemap="#Gio_1_1Icon_coll__map" alt="Collaboration graph"/></div> <map name="Gio_1_1Icon_coll__map" id="Gio_1_1Icon_coll__map"> <area shape="rect" href="classGlib_1_1Interface.html" title="Glib::Interface" alt="" coords="13,160,117,189"/><area shape="rect" href="classGlib_1_1ObjectBase.html" title="Glib::ObjectBase is a common base class for Objects and Interfaces." alt="" coords="5,83,125,112"/><area shape="rect" href="../../../libsigc++-2.0/reference/html/structsigc_1_1trackable.html" title="sigc::trackable" alt="" coords="12,5,119,35"/></map> <center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div> <p><a href="classGio_1_1Icon-members.html">List of all members.</a></p> <table border="0" cellpadding="0" cellspacing="0"> <tr><td colspan="2"><h2>Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1Icon.html#a860156dd8f8c9143cce6fba134e5d7cb">~Icon</a> ()</td></tr> <tr><td class="memItemLeft" align="right" valign="top">GIcon* </td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1Icon.html#a02ef784d9a07a205ce1d7daac39d2054">gobj</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Provides access to the underlying C GObject. <a href="#a02ef784d9a07a205ce1d7daac39d2054"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">const GIcon* </td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1Icon.html#a94b7e4b63ce6c1c0f05673dd8b4adf94">gobj</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Provides access to the underlying C GObject. <a href="#a94b7e4b63ce6c1c0f05673dd8b4adf94"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">guint </td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1Icon.html#acbcfcaa91ff4d50f700267e2928a61ae">hash</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Gets a hash for an icon. <a href="#acbcfcaa91ff4d50f700267e2928a61ae"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1Icon.html#a7b0d721c852d1e5b0f9cd875769fabd7">to_string</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Generates a textual representation of <em>icon</em> that can be used for serialization such as when passing <em>icon</em> to a different process or saving it to persistent storage. <a href="#a7b0d721c852d1e5b0f9cd875769fabd7"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1Icon.html#a90820057c0e8974d43d2597df18efb20">equal</a> (const <a class="el" href="classGlib_1_1RefPtr.html">Glib::RefPtr</a>< <a class="el" href="classGio_1_1Icon.html">Icon</a> >& other) const </td></tr> <tr><td colspan="2"><h2>Static Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1Icon.html#abd37e490fdf4da67eb3bbe2561c16ee3">add_interface</a> (GType gtype_implementer)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classGlib_1_1RefPtr.html">Glib::RefPtr</a>< <a class="el" href="classGio_1_1Icon.html">Icon</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1Icon.html#a8ae9b8e7b8159620eea7f9215cac83ab">create</a> (const <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a>& str)</td></tr> <tr><td colspan="2"><h2>Related Functions</h2></td></tr> <tr><td colspan="2"><p>(Note that these are not member functions.) </p> <br/><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classGlib_1_1RefPtr.html">Glib::RefPtr</a>< <a class="el" href="classGio_1_1Icon.html">Gio::Icon</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1Icon.html#a9f6d4523888318e40c362de6eea23004">wrap</a> (GIcon* object, bool take_copy=false)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">A <a class="el" href="namespaceGlib.html#a671306f4a3a0cae5ab4d7a9d54886592">Glib::wrap()</a> method for this object. <a href="#a9f6d4523888318e40c362de6eea23004"></a><br/></td></tr> </table> <hr/><a name="_details"></a><h2>Detailed Description</h2> <p>This is a very minimal interface for icons. </p> <p>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 <a class="el" href="classGio_1_1Icon.html" title="This is a very minimal interface for icons.">Icon</a> may contain the name of an icon (see <a class="el" href="classGio_1_1ThemedIcon.html" title="Icon theming support ThemedIcon is an implementation of Gio::Icon that supports icon...">ThemedIcon</a>), or the path to an icon (see <a class="el" href="classGio_1_1LoadableIcon.html" title="Extends the Icon interface and adds the ability to load icons from streams.">LoadableIcon</a>).</p> <p>To obtain a hash of an <a class="el" href="classGio_1_1Icon.html" title="This is a very minimal interface for icons.">Icon</a> instance, see <a class="el" href="classGio_1_1Icon.html#acbcfcaa91ff4d50f700267e2928a61ae" title="Gets a hash for an icon.">hash()</a>.</p> <p>To check if two <a class="el" href="classGio_1_1Icon.html" title="This is a very minimal interface for icons.">Icon</a> instances are equal, see <a class="el" href="classGio_1_1Icon.html#a90820057c0e8974d43d2597df18efb20">equal()</a>.</p> <dl class="since_2_16"><dt><b><a class="el" href="since_2_16.html#_since_2_16000035">Since glibmm 2.16:</a></b></dt><dd></dd></dl> <hr/><h2>Constructor & Destructor Documentation</h2> <a class="anchor" id="a860156dd8f8c9143cce6fba134e5d7cb"></a><!-- doxytag: member="Gio::Icon::~Icon" ref="a860156dd8f8c9143cce6fba134e5d7cb" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual Gio::Icon::~Icon </td> <td>(</td> <td class="paramname"></td> <td> ) </td> <td><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> </div> </div> <hr/><h2>Member Function Documentation</h2> <a class="anchor" id="abd37e490fdf4da67eb3bbe2561c16ee3"></a><!-- doxytag: member="Gio::Icon::add_interface" ref="abd37e490fdf4da67eb3bbe2561c16ee3" args="(GType gtype_implementer)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static void Gio::Icon::add_interface </td> <td>(</td> <td class="paramtype">GType </td> <td class="paramname"> <em>gtype_implementer</em></td> <td> ) </td> <td><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Reimplemented in <a class="el" href="classGio_1_1LoadableIcon.html#aac15ee4e49c92f2822760cc774f908d8">Gio::LoadableIcon</a>.</p> </div> </div> <a class="anchor" id="a8ae9b8e7b8159620eea7f9215cac83ab"></a><!-- doxytag: member="Gio::Icon::create" ref="a8ae9b8e7b8159620eea7f9215cac83ab" args="(const std::string &str)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static <a class="el" href="classGlib_1_1RefPtr.html">Glib::RefPtr</a><<a class="el" href="classGio_1_1Icon.html">Icon</a>> Gio::Icon::create </td> <td>(</td> <td class="paramtype">const <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a> & </td> <td class="paramname"> <em>str</em></td> <td> ) </td> <td><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> </div> </div> <a class="anchor" id="a90820057c0e8974d43d2597df18efb20"></a><!-- doxytag: member="Gio::Icon::equal" ref="a90820057c0e8974d43d2597df18efb20" args="(const Glib::RefPtr< Icon > &other) const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool Gio::Icon::equal </td> <td>(</td> <td class="paramtype">const <a class="el" href="classGlib_1_1RefPtr.html">Glib::RefPtr</a>< <a class="el" href="classGio_1_1Icon.html">Icon</a> >& </td> <td class="paramname"> <em>other</em></td> <td> ) </td> <td> const</td> </tr> </table> </div> <div class="memdoc"> </div> </div> <a class="anchor" id="a94b7e4b63ce6c1c0f05673dd8b4adf94"></a><!-- doxytag: member="Gio::Icon::gobj" ref="a94b7e4b63ce6c1c0f05673dd8b4adf94" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">const GIcon* Gio::Icon::gobj </td> <td>(</td> <td class="paramname"></td> <td> ) </td> <td> const<code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Provides access to the underlying C GObject. </p> <p>Reimplemented from <a class="el" href="classGlib_1_1Interface.html#a70a443071a69d3372c2cdd7128a91ed1">Glib::Interface</a>.</p> <p>Reimplemented in <a class="el" href="classGio_1_1Emblem.html#aedc2ab1a8682aff33ba0dbdaf5d05afb">Gio::Emblem</a>, <a class="el" href="classGio_1_1EmblemedIcon.html#a2b4a572414232927365ade6bf7bd1d5d">Gio::EmblemedIcon</a>, <a class="el" href="classGio_1_1FileIcon.html#a018eb170dea43e7bf697baa73070e195">Gio::FileIcon</a>, <a class="el" href="classGio_1_1LoadableIcon.html#a50a6f22519524e14d36d070cd2cb1c89">Gio::LoadableIcon</a>, and <a class="el" href="classGio_1_1ThemedIcon.html#ac962dc5a62c1d2b19611a497d92671ba">Gio::ThemedIcon</a>.</p> </div> </div> <a class="anchor" id="a02ef784d9a07a205ce1d7daac39d2054"></a><!-- doxytag: member="Gio::Icon::gobj" ref="a02ef784d9a07a205ce1d7daac39d2054" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">GIcon* Gio::Icon::gobj </td> <td>(</td> <td class="paramname"></td> <td> ) </td> <td><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Provides access to the underlying C GObject. </p> <p>Reimplemented from <a class="el" href="classGlib_1_1Interface.html#a969e9396f75132a9577428f4fa932d42">Glib::Interface</a>.</p> <p>Reimplemented in <a class="el" href="classGio_1_1Emblem.html#a18a84361942885e0b75a82ffbc342947">Gio::Emblem</a>, <a class="el" href="classGio_1_1EmblemedIcon.html#ad19779f46ff62261df8b924f2e218f00">Gio::EmblemedIcon</a>, <a class="el" href="classGio_1_1FileIcon.html#a0461feec986f30a389d7db0bfbc55673">Gio::FileIcon</a>, <a class="el" href="classGio_1_1LoadableIcon.html#aa590b3b76843c19f5dbf51448f30e9f7">Gio::LoadableIcon</a>, and <a class="el" href="classGio_1_1ThemedIcon.html#aa179d9788f6a17df73a258c6f89049fd">Gio::ThemedIcon</a>.</p> </div> </div> <a class="anchor" id="acbcfcaa91ff4d50f700267e2928a61ae"></a><!-- doxytag: member="Gio::Icon::hash" ref="acbcfcaa91ff4d50f700267e2928a61ae" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">guint Gio::Icon::hash </td> <td>(</td> <td class="paramname"></td> <td> ) </td> <td> const</td> </tr> </table> </div> <div class="memdoc"> <p>Gets a hash for an icon. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>icon</em> </td><td>gconstpointer to an icon object. </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>A <code>unsigned int</code> containing a hash for the <em>icon</em>, suitable for use in a HashTable or similar data structure. </dd></dl> </div> </div> <a class="anchor" id="a7b0d721c852d1e5b0f9cd875769fabd7"></a><!-- doxytag: member="Gio::Icon::to_string" ref="a7b0d721c852d1e5b0f9cd875769fabd7" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00971.html#a32db3d9898c44d3b3a578b560f7758cc">std::string</a> Gio::Icon::to_string </td> <td>(</td> <td class="paramname"></td> <td> ) </td> <td> const</td> </tr> </table> </div> <div class="memdoc"> <p>Generates a textual representation of <em>icon</em> that can be used for serialization such as when passing <em>icon</em> to a different process or saving it to persistent storage. </p> <p>Use g_icon_new_for_string() to get <em>icon</em> back from the returned string.</p> <p>The encoding of the returned string is proprietary to <a class="el" href="classGio_1_1Icon.html" title="This is a very minimal interface for icons.">Icon</a> except in the following two cases</p> <p><itemizedlist> <listitem></p> <p>If <em>icon</em> is a <a class="el" href="classGio_1_1FileIcon.html" title="FileIcon specifies an icon by pointing to an image file to be used as icon.">FileIcon</a>, the returned string is a native path (such as <literal>/path/to/my icon.png</literal>) without escaping if the <a class="el" href="classGio_1_1File.html" title="File and directory handling.">File</a> for <em>icon</em> is a native file. If the file is not native, the returned string is the result of g_file_get_uri() (such as <literal>sftp://path/to/my%20icon.png</literal>). </p> <p></listitem> <listitem></p> <p>If <em>icon</em> is a <a class="el" href="classGio_1_1ThemedIcon.html" title="Icon theming support ThemedIcon is an implementation of Gio::Icon that supports icon...">ThemedIcon</a> with exactly one name, the encoding is simply the name (such as <literal>network-server</literal>). </p> <p></listitem> </itemizedlist> </p> <dl class="return"><dt><b>Returns:</b></dt><dd>An allocated NUL-terminated UTF8 string or <code>0</code> if <em>icon</em> can't be serialized. Use Glib::free() to free.</dd></dl> <dl class="since_2_20"><dt><b><a class="el" href="since_2_20.html#_since_2_20000010">Since glibmm 2.20:</a></b></dt><dd></dd></dl> </div> </div> <hr/><h2>Friends And Related Function Documentation</h2> <a class="anchor" id="a9f6d4523888318e40c362de6eea23004"></a><!-- doxytag: member="Gio::Icon::wrap" ref="a9f6d4523888318e40c362de6eea23004" args="(GIcon *object, bool take_copy=false)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classGlib_1_1RefPtr.html">Glib::RefPtr</a>< <a class="el" href="classGio_1_1Icon.html">Gio::Icon</a> > wrap </td> <td>(</td> <td class="paramtype">GIcon * </td> <td class="paramname"> <em>object</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">bool </td> <td class="paramname"> <em>take_copy</em> = <code>false</code></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [related]</code></td> </tr> </table> </div> <div class="memdoc"> <p>A <a class="el" href="namespaceGlib.html#a671306f4a3a0cae5ab4d7a9d54886592">Glib::wrap()</a> method for this object. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>object</em> </td><td>The C instance. </td></tr> <tr><td valign="top"></td><td valign="top"><em>take_copy</em> </td><td>False if the result should take ownership of the C instance. True if it should take a new copy or ref. </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>A C++ instance that wraps this C instance. </dd></dl> </div> </div> <hr/>The documentation for this class was generated from the following file:<ul> <li>giomm/icon.h</li> </ul> </div> <hr size="1"/><address style="text-align: right;"><small>Generated on Mon Sep 21 11:07:23 2009 for glibmm by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address> </body> </html>