Sophie

Sophie

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

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: SchemeEditor 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_1SchemeEditor.html">SchemeEditor</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a>  </div>
  <div class="headertitle">
<div class="title">SchemeEditor Class Reference</div>  </div>
</div><!--header-->
<div class="contents">
<!-- doxytag: class="edelib::SchemeEditor" -->
<p>Editing component for Scheme language.  
 <a href="classedelib_1_1SchemeEditor.html#details">More...</a></p>

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

<p><a href="classedelib_1_1SchemeEditor-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_1SchemeEditor.html#ac7807d76aa08246fcd0d4e5c623fef67">SchemeEditor</a> (int X, int Y, int W, int H, const char *l=0)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classedelib_1_1SchemeEditor.html#a51d09cf11a637169fb2a6190dd3c00bc">textsize</a> (int sz)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classedelib_1_1SchemeEditor.html#a3d13d39bfefeb4d2a880fe83f01a98a4">handle</a> (int e)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">Fl_Text_Buffer *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classedelib_1_1SchemeEditor.html#a05adae472fe44ffe1522d8c2cb874e0c">style_buffer</a> (void)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classedelib_1_1SchemeEditor.html#af246559fd9476853d7c7cdd14120c68e">object_color</a> (int id, int color)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classedelib_1_1SchemeEditor.html#a0ee16817a0e4c4fd1e5f02a62c0a7467">object_color</a> (int id, const char *color)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classedelib_1_1SchemeEditor.html#aad734d62cdfde05b4d5c72c22d148009">match_parenthesis</a> (bool m)</td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Editing component for Scheme language. </p>
<p><a class="el" href="classedelib_1_1SchemeEditor.html" title="Editing component for Scheme language.">SchemeEditor</a> is extension of Fl_Text_Editor, where is provided syntax higlighting for Scheme-like languages (and the rest of LISP family) with parenthesis matching. It will highligh known Scheme keywords and functions, plus some extensions from <em>edelib-script</em> (see <em>sslib/init-2.ss</em> for those extensions).</p>
<dl class="note"><dt><b>Note:</b></dt><dd>This is simple editor intended for small code snippets where full editor is not suitable.</dd></dl>
<p>There are few caveats you should be aware of, if you are planning to use this component. First, you should not explicitly set editor buffer (via <em>Fl_Text_Editor::buffer</em>) as <a class="el" href="classedelib_1_1SchemeEditor.html" title="Editing component for Scheme language.">SchemeEditor</a> will set it when object is constructed. This is needed so class can correctly setup style buffer too (for syntax highlight). If you specify own buffer object, syntax highlight will not work.</p>
<p>The second is how <a class="el" href="classedelib_1_1SchemeEditor.html" title="Editing component for Scheme language.">SchemeEditor</a> will use <em>Fl_Text_Editor::add_modify_callback</em> internally to match parenthesis, so if you overwrite it, editor will not highlight them any more. </p>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="ac7807d76aa08246fcd0d4e5c623fef67"></a><!-- doxytag: member="edelib::SchemeEditor::SchemeEditor" ref="ac7807d76aa08246fcd0d4e5c623fef67" args="(int X, int Y, int W, int H, const char *l=0)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classedelib_1_1SchemeEditor.html">SchemeEditor</a> </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>X</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>Y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>W</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>H</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>l</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Create widget at given position with given size. </p>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a3d13d39bfefeb4d2a880fe83f01a98a4"></a><!-- doxytag: member="edelib::SchemeEditor::handle" ref="a3d13d39bfefeb4d2a880fe83f01a98a4" args="(int e)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual int <a class="el" href="classedelib_1_1SchemeEditor.html#a3d13d39bfefeb4d2a880fe83f01a98a4">handle</a> </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>e</em></td><td>)</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Event handler. </p>

</div>
</div>
<a class="anchor" id="aad734d62cdfde05b4d5c72c22d148009"></a><!-- doxytag: member="edelib::SchemeEditor::match_parenthesis" ref="aad734d62cdfde05b4d5c72c22d148009" args="(bool m)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classedelib_1_1SchemeEditor.html#aad734d62cdfde05b4d5c72c22d148009">match_parenthesis</a> </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>m</em></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Match or highlight block of parenthesis. </p>

</div>
</div>
<a class="anchor" id="af246559fd9476853d7c7cdd14120c68e"></a><!-- doxytag: member="edelib::SchemeEditor::object_color" ref="af246559fd9476853d7c7cdd14120c68e" args="(int id, int color)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classedelib_1_1SchemeEditor.html#af246559fd9476853d7c7cdd14120c68e">object_color</a> </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>color</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Set color for text object. Object can be keyword, comment, parenthesis, etc. and is setup according to given list:</p>
<ul>
<li>0 - plain text</li>
<li>1 - comments</li>
<li>2 - strings</li>
<li>3 - directives</li>
<li>4 - types</li>
<li>5 - keywords</li>
<li>6 - parenthesis</li>
</ul>
<p>For example, to draw comments in red color, you would use <em>object_color(2, FL_RED)</em>. </p>

</div>
</div>
<a class="anchor" id="a0ee16817a0e4c4fd1e5f02a62c0a7467"></a><!-- doxytag: member="edelib::SchemeEditor::object_color" ref="a0ee16817a0e4c4fd1e5f02a62c0a7467" args="(int id, const char *color)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classedelib_1_1SchemeEditor.html#af246559fd9476853d7c7cdd14120c68e">object_color</a> </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>color</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Set color using html color </p>

</div>
</div>
<a class="anchor" id="a05adae472fe44ffe1522d8c2cb874e0c"></a><!-- doxytag: member="edelib::SchemeEditor::style_buffer" ref="a05adae472fe44ffe1522d8c2cb874e0c" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Fl_Text_Buffer* <a class="el" href="classedelib_1_1SchemeEditor.html#a05adae472fe44ffe1522d8c2cb874e0c">style_buffer</a> </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Return style buffer. </p>

</div>
</div>
<a class="anchor" id="a51d09cf11a637169fb2a6190dd3c00bc"></a><!-- doxytag: member="edelib::SchemeEditor::textsize" ref="a51d09cf11a637169fb2a6190dd3c00bc" args="(int sz)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classedelib_1_1SchemeEditor.html#a51d09cf11a637169fb2a6190dd3c00bc">textsize</a> </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>sz</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Set text size; applied on all styles. </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>edelib/<a class="el" href="SchemeEditor_8h_source.html">SchemeEditor.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>