Sophie

Sophie

distrib > Mandriva > 2011.0 > x86_64 > by-pkgid > e4e5aca55b6d7244e6bae95bf4fde3ca > files > 245

lib64edelib-devel-2.0-1.x86_64.rpm

<!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"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>edelib: IconTheme Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">edelib
   &#160;<span id="projectnumber">2.0.0</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.6.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;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="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="namespaceedelib.html">edelib</a>      </li>
      <li class="navelem"><a class="el" href="classedelib_1_1IconTheme.html">IconTheme</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a>  </div>
  <div class="headertitle">
<div class="title">IconTheme Class Reference</div>  </div>
</div><!--header-->
<div class="contents">
<!-- doxytag: class="edelib::IconTheme" -->
<p>Finds named icon according to the given theme.  
 <a href="classedelib_1_1IconTheme.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="IconTheme_8h_source.html">edelib/IconTheme.h</a>&gt;</code></p>

<p><a href="classedelib_1_1IconTheme-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">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classedelib_1_1IconTheme.html#a9412d33a3aeb2780524cd4124e984381">IconTheme</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classedelib_1_1IconTheme.html#a656fe5822e7549ad0c38dc47d10f8522">~IconTheme</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classedelib_1_1IconTheme.html#a152d4bd9c738a5d876e16ba69ddd0e1f">load</a> (const char *name)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classedelib_1_1IconTheme.html#ae683fe63c33c388e9ba1c6392dd477eb">clear</a> (void)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classedelib_1_1String.html">String</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classedelib_1_1IconTheme.html#a43f9fc48828865030e91e0425099d34c">find_icon</a> (const char *icon, <a class="el" href="namespaceedelib.html#aeb27e3dfb8d94ad24899ae092f5d00a0">IconSizes</a> size, <a class="el" href="namespaceedelib.html#ae2d9595634d229a9d997209ae87f5e39">IconContext</a> context=<a class="el" href="namespaceedelib.html#ae2d9595634d229a9d997209ae87f5e39a775fab20e90387345fe41cbca4b203fc">ICON_CONTEXT_ANY</a>)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classedelib_1_1IconTheme.html#a23a3a76206887c5eefe5373252a3f8df">theme_name</a> (void) const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classedelib_1_1IconTheme.html#a1976d92cecbf697e5ea0a7eb827dfe09">stylized_theme_name</a> (void) const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classedelib_1_1IconTheme.html#a45e7d61fc0ffecc6a80a22305ff58a66">description</a> (void) const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classedelib_1_1IconTheme.html#a2872c290b511c48dab1d3c5a58d7edf3">example_icon</a> (void) const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classedelib_1_1IconTheme.html#abd9110266aa2b033fb3ab74180390598">query_icons</a> (<a class="el" href="classedelib_1_1list.html">list</a>&lt; <a class="el" href="classedelib_1_1String.html">String</a> &gt; &amp;lst, <a class="el" href="namespaceedelib.html#aeb27e3dfb8d94ad24899ae092f5d00a0">IconSizes</a> size, <a class="el" href="namespaceedelib.html#ae2d9595634d229a9d997209ae87f5e39">IconContext</a> context=<a class="el" href="namespaceedelib.html#ae2d9595634d229a9d997209ae87f5e39a775fab20e90387345fe41cbca4b203fc">ICON_CONTEXT_ANY</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 const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classedelib_1_1IconTheme.html#ad92c449d20dcc3b5b96f367ab1aaf5e1">default_theme_name</a> (void)</td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Finds named icon according to the given theme. </p>
<p><a class="el" href="classedelib_1_1IconTheme.html" title="Finds named icon according to the given theme.">IconTheme</a> is icon finder via <em>Icon <a class="el" href="classedelib_1_1Theme.html" title="Theming engine for widgets.">Theme</a> Specification</em> from <a href="http://www.freedesktop.org">http://www.freedesktop.org</a>. This specification prescribes how icons should be located when icon name was given in desktop neutral way. With this, all common desktop environments and apps could share icons and themes.</p>
<p><a class="el" href="classedelib_1_1IconTheme.html" title="Finds named icon according to the given theme.">IconTheme</a> closely follows this specification, with a few minor exceptions:</p>
<ul>
<li>recognizing SVG icons, since edelib currently does not have any SVG support</li>
<li>calculating Threshold key (todo for the future)</li>
<li>reading .icon data for specific icon, as no one use that in the time of this writing</li>
</ul>
<p>Icons are searched by giving the icon name, without extension, and <a class="el" href="classedelib_1_1IconTheme.html" title="Finds named icon according to the given theme.">IconTheme</a> will try to find either PNG or XPM icon with the same name.</p>
<p>Although this class can be used directly, preferred way is to load icons via <a class="el" href="classedelib_1_1IconLoader.html" title="Loads icons with IconTheme.">IconLoader</a>.</p>
<dl class="todo"><dt><b><a class="el" href="todo.html#_todo000021">Todo:</a></b></dt><dd>implement Threshold support (see icon-theme spec) </dd></dl>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a9412d33a3aeb2780524cd4124e984381"></a><!-- doxytag: member="edelib::IconTheme::IconTheme" ref="a9412d33a3aeb2780524cd4124e984381" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classedelib_1_1IconTheme.html">IconTheme</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Empty constructor </p>

</div>
</div>
<a class="anchor" id="a656fe5822e7549ad0c38dc47d10f8522"></a><!-- doxytag: member="edelib::IconTheme::~IconTheme" ref="a656fe5822e7549ad0c38dc47d10f8522" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">~<a class="el" href="classedelib_1_1IconTheme.html">IconTheme</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Destructor, calls <a class="el" href="classedelib_1_1IconTheme.html#ae683fe63c33c388e9ba1c6392dd477eb">clear()</a> </p>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="ae683fe63c33c388e9ba1c6392dd477eb"></a><!-- doxytag: member="edelib::IconTheme::clear" ref="ae683fe63c33c388e9ba1c6392dd477eb" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classedelib_1_1IconTheme.html#ae683fe63c33c388e9ba1c6392dd477eb">clear</a> </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Unload current theme and clear allocated data </p>

</div>
</div>
<a class="anchor" id="ad92c449d20dcc3b5b96f367ab1aaf5e1"></a><!-- doxytag: member="edelib::IconTheme::default_theme_name" ref="ad92c449d20dcc3b5b96f367ab1aaf5e1" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static const char* <a class="el" href="classedelib_1_1IconTheme.html#ad92c449d20dcc3b5b96f367ab1aaf5e1">default_theme_name</a> </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Returns name for default icon theme </p>

</div>
</div>
<a class="anchor" id="a45e7d61fc0ffecc6a80a22305ff58a66"></a><!-- doxytag: member="edelib::IconTheme::description" ref="a45e7d61fc0ffecc6a80a22305ff58a66" args="(void) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* <a class="el" href="classedelib_1_1IconTheme.html#a45e7d61fc0ffecc6a80a22305ff58a66">description</a> </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Returns description of loaded icon theme. If description wasn't found, returned string will be NULL </p>

</div>
</div>
<a class="anchor" id="a2872c290b511c48dab1d3c5a58d7edf3"></a><!-- doxytag: member="edelib::IconTheme::example_icon" ref="a2872c290b511c48dab1d3c5a58d7edf3" args="(void) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* <a class="el" href="classedelib_1_1IconTheme.html#a2872c290b511c48dab1d3c5a58d7edf3">example_icon</a> </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Returns the name of example icon or NULL if wasn't found. Example icon is value of <em>Example</em> key and is plain name that could be used with <a class="el" href="classedelib_1_1IconTheme.html#a43f9fc48828865030e91e0425099d34c">find_icon()</a> to search it's full path </p>

</div>
</div>
<a class="anchor" id="a43f9fc48828865030e91e0425099d34c"></a><!-- doxytag: member="edelib::IconTheme::find_icon" ref="a43f9fc48828865030e91e0425099d34c" args="(const char *icon, IconSizes size, IconContext context=ICON_CONTEXT_ANY)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classedelib_1_1String.html">String</a> <a class="el" href="classedelib_1_1IconTheme.html#a43f9fc48828865030e91e0425099d34c">find_icon</a> </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>icon</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespaceedelib.html#aeb27e3dfb8d94ad24899ae092f5d00a0">IconSizes</a>&#160;</td>
          <td class="paramname"><em>size</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespaceedelib.html#ae2d9595634d229a9d997209ae87f5e39">IconContext</a>&#160;</td>
          <td class="paramname"><em>context</em> = <code><a class="el" href="namespaceedelib.html#ae2d9595634d229a9d997209ae87f5e39a775fab20e90387345fe41cbca4b203fc">ICON_CONTEXT_ANY</a></code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Return full path to the icon name. If icon wasn't found, it will return empty string </p>

</div>
</div>
<a class="anchor" id="a152d4bd9c738a5d876e16ba69ddd0e1f"></a><!-- doxytag: member="edelib::IconTheme::load" ref="a152d4bd9c738a5d876e16ba69ddd0e1f" args="(const char *name)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classedelib_1_1IconTheme.html#a152d4bd9c738a5d876e16ba69ddd0e1f">load</a> </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>name</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Load theme. Must be called before icons search. Calling <a class="el" href="classedelib_1_1IconTheme.html#a152d4bd9c738a5d876e16ba69ddd0e1f">load()</a> again with the new theme name will initialize that new theme </p>

</div>
</div>
<a class="anchor" id="abd9110266aa2b033fb3ab74180390598"></a><!-- doxytag: member="edelib::IconTheme::query_icons" ref="abd9110266aa2b033fb3ab74180390598" args="(list&lt; String &gt; &amp;lst, IconSizes size, IconContext context=ICON_CONTEXT_ANY) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classedelib_1_1IconTheme.html#abd9110266aa2b033fb3ab74180390598">query_icons</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classedelib_1_1list.html">list</a>&lt; <a class="el" href="classedelib_1_1String.html">String</a> &gt; &amp;&#160;</td>
          <td class="paramname"><em>lst</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespaceedelib.html#aeb27e3dfb8d94ad24899ae092f5d00a0">IconSizes</a>&#160;</td>
          <td class="paramname"><em>size</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespaceedelib.html#ae2d9595634d229a9d997209ae87f5e39">IconContext</a>&#160;</td>
          <td class="paramname"><em>context</em> = <code><a class="el" href="namespaceedelib.html#ae2d9595634d229a9d997209ae87f5e39a775fab20e90387345fe41cbca4b203fc">ICON_CONTEXT_ANY</a></code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Query available icons from loaded theme and inherited themes. Icons will have full path </p>

</div>
</div>
<a class="anchor" id="a1976d92cecbf697e5ea0a7eb827dfe09"></a><!-- doxytag: member="edelib::IconTheme::stylized_theme_name" ref="a1976d92cecbf697e5ea0a7eb827dfe09" args="(void) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* <a class="el" href="classedelib_1_1IconTheme.html#a1976d92cecbf697e5ea0a7eb827dfe09">stylized_theme_name</a> </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Returns current theme name. The difference between this function and <a class="el" href="classedelib_1_1IconTheme.html#a23a3a76206887c5eefe5373252a3f8df">theme_name()</a> is that <a class="el" href="classedelib_1_1IconTheme.html#a23a3a76206887c5eefe5373252a3f8df">theme_name()</a> represents what was given to <a class="el" href="classedelib_1_1IconTheme.html#a152d4bd9c738a5d876e16ba69ddd0e1f">load()</a> function, but <a class="el" href="classedelib_1_1IconTheme.html#a1976d92cecbf697e5ea0a7eb827dfe09">stylized_theme_name()</a> is the value of the <em>Name</em> key in index.theme file.</p>
<p><em>Name</em> is often localized so it should be used to publicly present icon theme name </p>

</div>
</div>
<a class="anchor" id="a23a3a76206887c5eefe5373252a3f8df"></a><!-- doxytag: member="edelib::IconTheme::theme_name" ref="a23a3a76206887c5eefe5373252a3f8df" args="(void) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* <a class="el" href="classedelib_1_1IconTheme.html#a23a3a76206887c5eefe5373252a3f8df">theme_name</a> </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Returns current given theme name, or NULL if theme wasn't loaded via <a class="el" href="classedelib_1_1IconTheme.html#a152d4bd9c738a5d876e16ba69ddd0e1f">load()</a> </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>edelib/<a class="el" href="IconTheme_8h_source.html">IconTheme.h</a></li>
</ul>
</div><!-- contents -->


<hr class="footer"/><address class="footer"><small>
Generated on Tue Jun 5 2012 17:49:03 for edelib by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.6.1
</small></address>

</body>
</html>