Sophie

Sophie

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

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: Introduction and concepts</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 class="current"><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><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="themedoc.html">Themes and theming details</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="headertitle">
<div class="title">Introduction and concepts </div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><h2><a class="anchor" id="themeintro_intro"></a>
Introduction</h2>
<p>edelib theming facility allows theming widgets, their behavior and theming full applications. It also can behave as container for other themes, like sound theme or icon theme.</p>
<p>At first this sounds pretty abstract and that is true: theming facility is abstracted as much as possible.</p>
<p>Today, themed can be everything: widget look, behavior, sound events, icons and wallpapers, fonts and etc. Some toolkits and environments provides something so called <em>metatheme</em>, a theme that has a bunch of other, unrelated themes like themes for icons or GUI look. edelib theming implementation behaves (at some point) as metatheme too.</p>
<p>To allow this, <a class="el" href="classedelib_1_1Theme.html" title="Theming engine for widgets.">edelib::Theme</a> implements a Scheme-like language to load, parse and eventually transform theme code. Actually, <a class="el" href="classedelib_1_1Theme.html" title="Theming engine for widgets.">edelib::Theme</a> provides a full Scheme language (based on <a href="http://tinyscheme.sourceforge.net">TinyScheme</a> engine), but you will often see only the small parts of it.</p>
<h2><a class="anchor" id="themeintro_concepts"></a>
Concepts</h2>
<p>Theme is introducing a few terms known from other toolkits and environments, where some have pretty the same meaning and some have a different one.</p>
<h3><a class="anchor" id="themeintro_style"></a>
Style</h3>
<p>Theme style is a set of elements with values. Elements can be anything, like font size or background color. When application is querying certain preferences (e.g. font size), it do that from certain style.</p>
<p>Each styles in the same theme must have a unique name. In the case of duplicate names, first found style will be used.</p>
<h3><a class="anchor" id="themeintro_scheme"></a>
Scheme</h3>
<p>Scheme is engine for painting widgets. Scheme is term from FLTK (see Fl::scheme() in FLTK documentation) and should not be confused with Scheme language; you can see schemes for FLTK as <em>engines</em> for GTK+. Schemes are implemented in C++ and uses FLTK low level drawing facility to paint widget elements.</p>
<p>Currently schemes can't be extended and theme loader uses a few of them already built in FLTK code.</p>
<h3><a class="anchor" id="themeintro_item"></a>
Style item</h3>
<p>Style item is entry in one style. Style item can be e.g. font color or anything that some application see as value for theming.</p>
<h3><a class="anchor" id="themeintro_themefile"></a>
Theme file</h3>
<p>Theme file is the file with one or bunch of styles. First file loaded from every theme is <em>main.ewt</em> (ewt here means Ede Widget Theme). Here is an example how <em>main.ewt</em> can look like: </p>
<div class="fragment"><pre class="fragment">;; <span class="keyword">this</span> is a comment

(theme.name   <span class="stringliteral">&quot;Sample Theme&quot;</span>)
(theme.author <span class="stringliteral">&quot;John Foo &lt;john@foo.com&gt;&quot;</span>)
(theme.sample <span class="stringliteral">&quot;img.jpg&quot;</span>)

(theme.style <span class="stringliteral">&quot;ede&quot;</span> [
  scheme             <span class="stringliteral">&quot;gtk+&quot;</span>
  background_color   <span class="stringliteral">&quot;dark slate gray&quot;</span>
  background_color2  <span class="stringliteral">&quot;#043456&quot;</span>
  foreground_color   <span class="stringliteral">&quot;red&quot;</span>
  font               <span class="stringliteral">&quot;sans 12&quot;</span>
  icon_theme         <span class="stringliteral">&quot;edeneu&quot;</span>
])
</pre></div> </div></div><!-- contents -->


<hr class="footer"/><address class="footer"><small>
Generated on Tue Jun 5 2012 17:49:02 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>