<!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>gtkmm: Gtk::IconSize 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.7.3 --> <div id="top"> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">gtkmm <span id="projectnumber">2.24.4</span></div> </td> </tr> </tbody> </table> </div> <div id="navrow1" class="tabs"> <ul class="tablist"> <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> </ul> </div> <div id="navrow2" class="tabs2"> <ul class="tablist"> <li><a href="annotated.html"><span>Class List</span></a></li> <li><a href="classes.html"><span>Class Index</span></a></li> <li><a href="inherits.html"><span>Class Hierarchy</span></a></li> <li><a href="functions.html"><span>Class Members</span></a></li> </ul> </div> <div id="nav-path" class="navpath"> <ul> <li class="navelem"><a class="el" href="namespaceGtk.html">Gtk</a> </li> <li class="navelem"><a class="el" href="classGtk_1_1IconSize.html">IconSize</a> </li> </ul> </div> </div> <div class="header"> <div class="summary"> <a href="#pub-methods">Public Member Functions</a> | <a href="#pub-static-methods">Static Public Member Functions</a> </div> <div class="headertitle"> <h1>Gtk::IconSize Class Reference</h1> </div> </div> <div class="contents"> <!-- doxytag: class="Gtk::IconSize" --> <p>Represents registered icon sizes. <a href="#_details">More...</a></p> <p><a href="classGtk_1_1IconSize-members.html">List of all members.</a></p> <table class="memberdecls"> <tr><td colspan="2"><h2><a name="pub-methods"></a> Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1IconSize.html#a9980786a8c9b6c74098e7ab20f6c8e51">IconSize</a> ()</td></tr> <tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1IconSize.html#a8c20145e771b016ea6746eeac47c0505">IconSize</a> (<a class="el" href="group__gtkmmEnums.html#gaeb555deb523560fe697977c2f8adbb76">BuiltinIconSize</a> <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a01176.html#ga445a43f417432dd1b9aed90ef239c700">size</a>)</td></tr> <tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1IconSize.html#a0c689319928c65b522029abee2d90e15">IconSize</a> (int <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a01176.html#ga445a43f417432dd1b9aed90ef239c700">size</a>)</td></tr> <tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1IconSize.html#a50a53dddcda41ee2ebf07b64a82dd45d">operator int</a> () const </td></tr> <tr><td colspan="2"><h2><a name="pub-static-methods"></a> Static Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">static bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1IconSize.html#a93ac90db97f3e164d8698c249b546556">lookup</a> (<a class="el" href="classGtk_1_1IconSize.html">IconSize</a> <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a01176.html#ga445a43f417432dd1b9aed90ef239c700">size</a>, int& width, int& height)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Obtains the pixel size of a semantic icon size, possibly modified by user preferences for the default <a class="el" href="classGtk_1_1Settings.html" title="Sharing settings between applications.">Gtk::Settings</a>. <a href="#a93ac90db97f3e164d8698c249b546556"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">static bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1IconSize.html#adefa53779fe7acd7bfd42f9e07fe98ad">lookup</a> (<a class="el" href="classGtk_1_1IconSize.html">IconSize</a> <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a01176.html#ga445a43f417432dd1b9aed90ef239c700">size</a>, int& width, int& height, const <a class="elRef" href="../../../glibmm-2.4/reference/html/classGlib_1_1RefPtr.html">Glib::RefPtr</a>< <a class="el" href="classGtk_1_1Settings.html">Gtk::Settings</a> >& settings)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Obtains the pixel size of a semantic icon size, possibly modified by user preferences for a particular <a class="el" href="classGtk_1_1Settings.html" title="Sharing settings between applications.">Gtk::Settings</a>. <a href="#adefa53779fe7acd7bfd42f9e07fe98ad"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classGtk_1_1IconSize.html">IconSize</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1IconSize.html#aedea29b7b2de8b8d7e54fadd0c8f329a">register_new</a> (const <a class="elRef" href="../../../glibmm-2.4/reference/html/classGlib_1_1ustring.html">Glib::ustring</a>& name, int width, int height)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Registers a new icon size, along the same lines as ICON_SIZE_MENU, etc. <a href="#aedea29b7b2de8b8d7e54fadd0c8f329a"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1IconSize.html#a825d2c90489fd0f94db22113a2a4f514">register_alias</a> (const <a class="elRef" href="../../../glibmm-2.4/reference/html/classGlib_1_1ustring.html">Glib::ustring</a>& alias, <a class="el" href="classGtk_1_1IconSize.html">IconSize</a> target)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Registers <em>alias</em> as another name for <em>target</em> so calling <a class="el" href="classGtk_1_1IconSize.html#a5218ea776642be58193f111ce236b4e1" title="Looks up the icon size associated with name.">from_name()</a> with <em>alias</em> as argument will return <em>target</em>. <a href="#a825d2c90489fd0f94db22113a2a4f514"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classGtk_1_1IconSize.html">IconSize</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1IconSize.html#a5218ea776642be58193f111ce236b4e1">from_name</a> (const <a class="elRef" href="../../../glibmm-2.4/reference/html/classGlib_1_1ustring.html">Glib::ustring</a>& name)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Looks up the icon size associated with <em>name</em>. <a href="#a5218ea776642be58193f111ce236b4e1"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">static <a class="elRef" href="../../../glibmm-2.4/reference/html/classGlib_1_1ustring.html">Glib::ustring</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1IconSize.html#aac6b2fbfd2d1ad3321d8292d64fe1b1d">get_name</a> (<a class="el" href="classGtk_1_1IconSize.html">IconSize</a> <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a01176.html#ga445a43f417432dd1b9aed90ef239c700">size</a>)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Gets the canonical name of the given icon size. <a href="#aac6b2fbfd2d1ad3321d8292d64fe1b1d"></a><br/></td></tr> </table> <hr/><a name="_details"></a><h2>Detailed Description</h2> <div class="textblock"><p>Represents registered icon sizes. </p> <p>You can also use a Gtk::BuiltinIconSize instead of an <a class="el" href="classGtk_1_1IconSize.html" title="Represents registered icon sizes.">IconSize</a>. </p> </div><hr/><h2>Constructor & Destructor Documentation</h2> <a class="anchor" id="a9980786a8c9b6c74098e7ab20f6c8e51"></a><!-- doxytag: member="Gtk::IconSize::IconSize" ref="a9980786a8c9b6c74098e7ab20f6c8e51" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">Gtk::IconSize::IconSize </td> <td>(</td> <td class="paramname"></td><td>)</td> <td><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> </div> </div> <a class="anchor" id="a8c20145e771b016ea6746eeac47c0505"></a><!-- doxytag: member="Gtk::IconSize::IconSize" ref="a8c20145e771b016ea6746eeac47c0505" args="(BuiltinIconSize size)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">Gtk::IconSize::IconSize </td> <td>(</td> <td class="paramtype"><a class="el" href="group__gtkmmEnums.html#gaeb555deb523560fe697977c2f8adbb76">BuiltinIconSize</a> </td> <td class="paramname"><em>size</em></td><td>)</td> <td><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> </div> </div> <a class="anchor" id="a0c689319928c65b522029abee2d90e15"></a><!-- doxytag: member="Gtk::IconSize::IconSize" ref="a0c689319928c65b522029abee2d90e15" args="(int size)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">Gtk::IconSize::IconSize </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"><em>size</em></td><td>)</td> <td><code> [inline, explicit]</code></td> </tr> </table> </div> <div class="memdoc"> </div> </div> <hr/><h2>Member Function Documentation</h2> <a class="anchor" id="a5218ea776642be58193f111ce236b4e1"></a><!-- doxytag: member="Gtk::IconSize::from_name" ref="a5218ea776642be58193f111ce236b4e1" args="(const Glib::ustring &name)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static <a class="el" href="classGtk_1_1IconSize.html">IconSize</a> Gtk::IconSize::from_name </td> <td>(</td> <td class="paramtype">const <a class="elRef" href="../../../glibmm-2.4/reference/html/classGlib_1_1ustring.html">Glib::ustring</a> & </td> <td class="paramname"><em>name</em></td><td>)</td> <td><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Looks up the icon size associated with <em>name</em>. </p> <dl><dt><b>Parameters:</b></dt><dd> <table class="params"> <tr><td class="paramname">name</td><td>the name to look up. result The icon size with the given name. </td></tr> </table> </dd> </dl> </div> </div> <a class="anchor" id="aac6b2fbfd2d1ad3321d8292d64fe1b1d"></a><!-- doxytag: member="Gtk::IconSize::get_name" ref="aac6b2fbfd2d1ad3321d8292d64fe1b1d" args="(IconSize size)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static <a class="elRef" href="../../../glibmm-2.4/reference/html/classGlib_1_1ustring.html">Glib::ustring</a> Gtk::IconSize::get_name </td> <td>(</td> <td class="paramtype"><a class="el" href="classGtk_1_1IconSize.html">IconSize</a> </td> <td class="paramname"><em>size</em></td><td>)</td> <td><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Gets the canonical name of the given icon size. </p> <dl><dt><b>Parameters:</b></dt><dd> <table class="params"> <tr><td class="paramname">size</td><td>size AnIconSize. </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>The name of the given icon size. </dd></dl> </div> </div> <a class="anchor" id="adefa53779fe7acd7bfd42f9e07fe98ad"></a><!-- doxytag: member="Gtk::IconSize::lookup" ref="adefa53779fe7acd7bfd42f9e07fe98ad" args="(IconSize size, int &width, int &height, const Glib::RefPtr< Gtk::Settings > &settings)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static bool Gtk::IconSize::lookup </td> <td>(</td> <td class="paramtype"><a class="el" href="classGtk_1_1IconSize.html">IconSize</a> </td> <td class="paramname"><em>size</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int & </td> <td class="paramname"><em>width</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int & </td> <td class="paramname"><em>height</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="elRef" href="../../../glibmm-2.4/reference/html/classGlib_1_1RefPtr.html">Glib::RefPtr</a>< <a class="el" href="classGtk_1_1Settings.html">Gtk::Settings</a> >& </td> <td class="paramname"><em>settings</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Obtains the pixel size of a semantic icon size, possibly modified by user preferences for a particular <a class="el" href="classGtk_1_1Settings.html" title="Sharing settings between applications.">Gtk::Settings</a>. </p> <p>Normally size would be Gtk::ICON_SIZE_MENU, Gtk::ICON_SIZE_BUTTON, etc. This function isn't normally needed because <a class="el" href="classGtk_1_1Widget.html#a91efd1b5aed7c184506ddd5721710584" title="A convenience function that uses the theme engine and RC file settings for the widget to look up stoc...">Gtk::Widget::render_icon()</a> is the usual way to get an icon for rendering - then just look at the size of the rendered pixbuf. The rendered pixbuf may not even correspond to the width/height returned by <a class="el" href="classGtk_1_1IconSize.html#a93ac90db97f3e164d8698c249b546556" title="Obtains the pixel size of a semantic icon size, possibly modified by user preferences for the default...">IconSize::lookup()</a>, because themes are free to render the pixbuf however they like, including changing the usual size.</p> <dl><dt><b>Parameters:</b></dt><dd> <table class="params"> <tr><td class="paramname">size</td><td>An icon size. </td></tr> <tr><td class="paramname">width</td><td>Location to store icon width. </td></tr> <tr><td class="paramname">height</td><td>Location to store icon height. </td></tr> <tr><td class="paramname">settings</td><td>A <a class="el" href="classGtk_1_1Settings.html" title="Sharing settings between applications.">Gtk::Settings</a> object, used to determine which set of user preferences to used. </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>true if size was a valid size.</dd></dl> <dl class="since_2_14"><dt><b><a class="el" href="since_2_14.html#_since_2_14000057">Since gtkmm 2.14:</a></b></dt><dd></dd></dl> </div> </div> <a class="anchor" id="a93ac90db97f3e164d8698c249b546556"></a><!-- doxytag: member="Gtk::IconSize::lookup" ref="a93ac90db97f3e164d8698c249b546556" args="(IconSize size, int &width, int &height)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static bool Gtk::IconSize::lookup </td> <td>(</td> <td class="paramtype"><a class="el" href="classGtk_1_1IconSize.html">IconSize</a> </td> <td class="paramname"><em>size</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int & </td> <td class="paramname"><em>width</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int & </td> <td class="paramname"><em>height</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Obtains the pixel size of a semantic icon size, possibly modified by user preferences for the default <a class="el" href="classGtk_1_1Settings.html" title="Sharing settings between applications.">Gtk::Settings</a>. </p> <p>Normally size would be Gtk::ICON_SIZE_MENU, Gtk::ICON_SIZE_BUTTON, etc. This function isn't normally needed because <a class="el" href="classGtk_1_1Widget.html#a91efd1b5aed7c184506ddd5721710584" title="A convenience function that uses the theme engine and RC file settings for the widget to look up stoc...">Gtk::Widget::render_icon()</a> is the usual way to get an icon for rendering - then just look at the size of the rendered pixbuf. The rendered pixbuf may not even correspond to the width/height returned by <a class="el" href="classGtk_1_1IconSize.html#a93ac90db97f3e164d8698c249b546556" title="Obtains the pixel size of a semantic icon size, possibly modified by user preferences for the default...">IconSize::lookup()</a>, because themes are free to render the pixbuf however they like, including changing the usual size.</p> <dl><dt><b>Parameters:</b></dt><dd> <table class="params"> <tr><td class="paramname">size</td><td>An icon size. </td></tr> <tr><td class="paramname">width</td><td>Location to store icon width. </td></tr> <tr><td class="paramname">height</td><td>Location to store icon height. </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>true if size was a valid size. </dd></dl> </div> </div> <a class="anchor" id="a50a53dddcda41ee2ebf07b64a82dd45d"></a><!-- doxytag: member="Gtk::IconSize::operator int" ref="a50a53dddcda41ee2ebf07b64a82dd45d" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">Gtk::IconSize::operator int </td> <td>(</td> <td class="paramname"></td><td>)</td> <td> const<code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> </div> </div> <a class="anchor" id="a825d2c90489fd0f94db22113a2a4f514"></a><!-- doxytag: member="Gtk::IconSize::register_alias" ref="a825d2c90489fd0f94db22113a2a4f514" args="(const Glib::ustring &alias, IconSize target)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static void Gtk::IconSize::register_alias </td> <td>(</td> <td class="paramtype">const <a class="elRef" href="../../../glibmm-2.4/reference/html/classGlib_1_1ustring.html">Glib::ustring</a> & </td> <td class="paramname"><em>alias</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classGtk_1_1IconSize.html">IconSize</a> </td> <td class="paramname"><em>target</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Registers <em>alias</em> as another name for <em>target</em> so calling <a class="el" href="classGtk_1_1IconSize.html#a5218ea776642be58193f111ce236b4e1" title="Looks up the icon size associated with name.">from_name()</a> with <em>alias</em> as argument will return <em>target</em>. </p> <dl><dt><b>Parameters:</b></dt><dd> <table class="params"> <tr><td class="paramname">alias</td><td>An alias for target. </td></tr> <tr><td class="paramname">target</td><td>An existing icon size. </td></tr> </table> </dd> </dl> </div> </div> <a class="anchor" id="aedea29b7b2de8b8d7e54fadd0c8f329a"></a><!-- doxytag: member="Gtk::IconSize::register_new" ref="aedea29b7b2de8b8d7e54fadd0c8f329a" args="(const Glib::ustring &name, int width, int height)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static <a class="el" href="classGtk_1_1IconSize.html">IconSize</a> Gtk::IconSize::register_new </td> <td>(</td> <td class="paramtype">const <a class="elRef" href="../../../glibmm-2.4/reference/html/classGlib_1_1ustring.html">Glib::ustring</a> & </td> <td class="paramname"><em>name</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"><em>width</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"><em>height</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Registers a new icon size, along the same lines as ICON_SIZE_MENU, etc. </p> <p>Returns the integer value for the size.</p> <dl><dt><b>Parameters:</b></dt><dd> <table class="params"> <tr><td class="paramname">name</td><td>Name of the icon size. </td></tr> <tr><td class="paramname">width</td><td>The icon width. </td></tr> <tr><td class="paramname">height</td><td>The icon height. </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>Integer value representing the size. </dd></dl> </div> </div> <hr/>The documentation for this class was generated from the following file:<ul> <li>gtkmm/enums.h</li> </ul> </div> <hr class="footer"/><address class="footer"><small>Generated on Tue Jun 25 2013 for gtkmm by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </small></address> </body> </html>