Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 5389723cfaa070fa83dde30f5cb260be > files > 214

compat-guichan05-devel-0.5.0-11.fc15.i686.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>Guichan: gcn::TextField Class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.4.7 -->
<div class="tabs">
  <ul>
    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
    <li><a href="namespaces.html"><span>Namespaces</span></a></li>
    <li id="current"><a href="annotated.html"><span>Classes</span></a></li>
    <li><a href="files.html"><span>Files</span></a></li>
  </ul></div>
<div class="tabs">
  <ul>
    <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
    <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
    <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
  </ul></div>
<div class="nav">
<a class="el" href="namespacegcn.html">gcn</a>::<a class="el" href="classgcn_1_1TextField.html">TextField</a></div>
<h1>gcn::TextField Class Reference</h1><!-- doxytag: class="gcn::TextField" --><!-- doxytag: inherits="gcn::Widget,gcn::MouseListener,gcn::KeyListener" --><code>#include &lt;<a class="el" href="textfield_8hpp-source.html">textfield.hpp</a>&gt;</code>
<p>
<p>Inheritance diagram for gcn::TextField:
<p><center><img src="classgcn_1_1TextField.png" usemap="#gcn::TextField_map" border="0" alt=""></center>
<map name="gcn::TextField_map">
<area href="classgcn_1_1Widget.html" alt="gcn::Widget" shape="rect" coords="0,0,122,24">
<area href="classgcn_1_1MouseListener.html" alt="gcn::MouseListener" shape="rect" coords="132,0,254,24">
<area href="classgcn_1_1KeyListener.html" alt="gcn::KeyListener" shape="rect" coords="264,0,386,24">
</map>
<a href="classgcn_1_1TextField-members.html">List of all members.</a><hr><a name="_details"></a><h2>Detailed Description</h2>
A text field in which you can write or display a line of text. 
<p>

<p>
Definition at line <a class="el" href="textfield_8hpp-source.html#l00072">72</a> of file <a class="el" href="textfield_8hpp-source.html">textfield.hpp</a>.<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="8348b49dd66cefd728e6d75174a13216"></a><!-- doxytag: member="gcn::TextField::TextField" ref="8348b49dd66cefd728e6d75174a13216" args="()" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgcn_1_1TextField.html#8348b49dd66cefd728e6d75174a13216">TextField</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Default constructor. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgcn_1_1TextField.html#2ee5cd927898e14cf070ea37c546015d">TextField</a> (const std::string &amp;text)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constructor.  <a href="#2ee5cd927898e14cf070ea37c546015d"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgcn_1_1TextField.html#d4da21d56554bc41f2666417889757bd">setText</a> (const std::string &amp;text)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets the text.  <a href="#d4da21d56554bc41f2666417889757bd"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual const std::string &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgcn_1_1TextField.html#4ab8ba2a5522c3d2163d7e4cdb0b298a">getText</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Gets the text.  <a href="#4ab8ba2a5522c3d2163d7e4cdb0b298a"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgcn_1_1TextField.html#bf0b5531f60f50be504fedfd12bb07c8">drawCaret</a> (<a class="el" href="classgcn_1_1Graphics.html">Graphics</a> *graphics, int x)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Draws the caret (the little marker in the text that shows where the letters you type will appear).  <a href="#bf0b5531f60f50be504fedfd12bb07c8"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgcn_1_1TextField.html#5fa19c9dbe8ce775772d4ad5c995477a">adjustSize</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Adjusts the size of the <a class="el" href="classgcn_1_1TextField.html">TextField</a> to fit the font size.  <a href="#5fa19c9dbe8ce775772d4ad5c995477a"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgcn_1_1TextField.html#8b6a3c9f6973376e72810c00680ced8e">adjustHeight</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Adjusts the height of the text field to fit the font size.  <a href="#8b6a3c9f6973376e72810c00680ced8e"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgcn_1_1TextField.html#01556df765b6eebaaa7f561fe080f5e1">setCaretPosition</a> (unsigned int position)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets the caret position.  <a href="#01556df765b6eebaaa7f561fe080f5e1"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual unsigned int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgcn_1_1TextField.html#8866f8d955405f2ef0542f11b3d253c1">getCaretPosition</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Gets the caret position.  <a href="#8866f8d955405f2ef0542f11b3d253c1"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgcn_1_1TextField.html#19a47e362b1f5ca5e88e0372b5774fd8">fontChanged</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Called when the font has changed.  <a href="#19a47e362b1f5ca5e88e0372b5774fd8"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgcn_1_1TextField.html#ea7d866255c803a0e569fe6237c20660">draw</a> (<a class="el" href="classgcn_1_1Graphics.html">Graphics</a> *graphics)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Draws the <a class="el" href="classgcn_1_1Widget.html">Widget</a>.  <a href="#ea7d866255c803a0e569fe6237c20660"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgcn_1_1TextField.html#c094e85ea11edd7706044543f2c36230">drawBorder</a> (<a class="el" href="classgcn_1_1Graphics.html">Graphics</a> *graphics)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Draws the <a class="el" href="classgcn_1_1Widget.html">Widget</a> border.  <a href="#c094e85ea11edd7706044543f2c36230"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgcn_1_1TextField.html#893da9461844cf03e82adb51b97b5acc">mousePress</a> (int x, int y, int button)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Called when a mouse button is pressed when the mouse is in the <a class="el" href="classgcn_1_1Widget.html">Widget</a> area or if the <a class="el" href="classgcn_1_1Widget.html">Widget</a> has focus.  <a href="#893da9461844cf03e82adb51b97b5acc"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgcn_1_1TextField.html#de45af70bf46fa6cefd9b355e1066ddd">keyPress</a> (const <a class="el" href="classgcn_1_1Key.html">Key</a> &amp;key)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Called if a key is pressed when the widget has keyboard focus.  <a href="#de45af70bf46fa6cefd9b355e1066ddd"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="855e1cd0e4444747287673c0b3f1000c"></a><!-- doxytag: member="gcn::TextField::fixScroll" ref="855e1cd0e4444747287673c0b3f1000c" args="()" -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgcn_1_1TextField.html#855e1cd0e4444747287673c0b3f1000c">fixScroll</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Scrolls the text horizontally so that the caret shows if needed. <br></td></tr>
<tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e2f15ee99aa1616e51f25d7ed4a71288"></a><!-- doxytag: member="gcn::TextField::mText" ref="e2f15ee99aa1616e51f25d7ed4a71288" args="" -->
std::string&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgcn_1_1TextField.html#e2f15ee99aa1616e51f25d7ed4a71288">mText</a></td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="448a72898d1da9b0dfc3bbf147b11e67"></a><!-- doxytag: member="gcn::TextField::mCaretPosition" ref="448a72898d1da9b0dfc3bbf147b11e67" args="" -->
unsigned int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgcn_1_1TextField.html#448a72898d1da9b0dfc3bbf147b11e67">mCaretPosition</a></td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="138dc0ec23942dc55718903e55ce61af"></a><!-- doxytag: member="gcn::TextField::mXScroll" ref="138dc0ec23942dc55718903e55ce61af" args="" -->
int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgcn_1_1TextField.html#138dc0ec23942dc55718903e55ce61af">mXScroll</a></td></tr>

</table>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="2ee5cd927898e14cf070ea37c546015d"></a><!-- doxytag: member="gcn::TextField::TextField" ref="2ee5cd927898e14cf070ea37c546015d" args="(const std::string &amp;text)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">gcn::TextField::TextField           </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&nbsp;</td>
          <td class="paramname"> <em>text</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Constructor. 
<p>
Initializes the textfield with a given string.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>text</em>&nbsp;</td><td>the initial text. </td></tr>
  </table>
</dl>

<p>
Definition at line <a class="el" href="textfield_8cpp-source.html#l00083">83</a> of file <a class="el" href="textfield_8cpp-source.html">textfield.cpp</a>.
<p>
References <a class="el" href="widget_8cpp-source.html#l00341">gcn::Widget::addKeyListener()</a>, <a class="el" href="widget_8cpp-source.html#l00351">gcn::Widget::addMouseListener()</a>, <a class="el" href="textfield_8cpp-source.html#l00210">adjustSize()</a>, <a class="el" href="textfield_8hpp-source.html#l00168">mCaretPosition</a>, <a class="el" href="textfield_8hpp-source.html#l00167">mText</a>, <a class="el" href="textfield_8hpp-source.html#l00169">mXScroll</a>, <a class="el" href="widget_8cpp-source.html#l00175">gcn::Widget::setBorderSize()</a>, and <a class="el" href="widget_8cpp-source.html#l00215">gcn::Widget::setFocusable()</a>.
</div>
</div><p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="8b6a3c9f6973376e72810c00680ced8e"></a><!-- doxytag: member="gcn::TextField::adjustHeight" ref="8b6a3c9f6973376e72810c00680ced8e" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void gcn::TextField::adjustHeight           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Adjusts the height of the text field to fit the font size. 
<p>
The height of the <a class="el" href="classgcn_1_1TextField.html">TextField</a> is initialized with this function by the constructors. 
<p>
Definition at line <a class="el" href="textfield_8cpp-source.html#l00218">218</a> of file <a class="el" href="textfield_8cpp-source.html">textfield.cpp</a>.
<p>
References <a class="el" href="widget_8cpp-source.html#l00564">gcn::Widget::getFont()</a>, <a class="el" href="widget_8cpp-source.html#l00139">gcn::Widget::getHeight()</a>, and <a class="el" href="widget_8cpp-source.html#l00134">gcn::Widget::setHeight()</a>.
<p>
Referenced by <a class="el" href="textfield_8cpp-source.html#l00210">adjustSize()</a>, and <a class="el" href="textfield_8cpp-source.html#l00070">TextField()</a>.
</div>
</div><p>
<a class="anchor" name="5fa19c9dbe8ce775772d4ad5c995477a"></a><!-- doxytag: member="gcn::TextField::adjustSize" ref="5fa19c9dbe8ce775772d4ad5c995477a" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void gcn::TextField::adjustSize           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Adjusts the size of the <a class="el" href="classgcn_1_1TextField.html">TextField</a> to fit the font size. 
<p>
The constructor taking a string uses this function to initialize the size of the <a class="el" href="classgcn_1_1TextField.html">TextField</a>. 
<p>
Definition at line <a class="el" href="textfield_8cpp-source.html#l00210">210</a> of file <a class="el" href="textfield_8cpp-source.html">textfield.cpp</a>.
<p>
References <a class="el" href="textfield_8cpp-source.html#l00218">adjustHeight()</a>, <a class="el" href="textfield_8cpp-source.html#l00223">fixScroll()</a>, <a class="el" href="widget_8cpp-source.html#l00564">gcn::Widget::getFont()</a>, <a class="el" href="widget_8cpp-source.html#l00129">gcn::Widget::getWidth()</a>, <a class="el" href="textfield_8hpp-source.html#l00167">mText</a>, and <a class="el" href="widget_8cpp-source.html#l00124">gcn::Widget::setWidth()</a>.
<p>
Referenced by <a class="el" href="textfield_8cpp-source.html#l00083">TextField()</a>.
</div>
</div><p>
<a class="anchor" name="ea7d866255c803a0e569fe6237c20660"></a><!-- doxytag: member="gcn::TextField::draw" ref="ea7d866255c803a0e569fe6237c20660" args="(Graphics *graphics)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void gcn::TextField::draw           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classgcn_1_1Graphics.html">Graphics</a> *&nbsp;</td>
          <td class="paramname"> <em>graphics</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Draws the <a class="el" href="classgcn_1_1Widget.html">Widget</a>. 
<p>
It is called by the parent widget when it is time for the <a class="el" href="classgcn_1_1Widget.html">Widget</a> to draw itself. The graphics object is set up so that all drawing is relative to the <a class="el" href="classgcn_1_1Widget.html">Widget</a>, i.e coordinate (0,0) is the top-left corner of the <a class="el" href="classgcn_1_1Widget.html">Widget</a>. It is not possible to draw outside of a Widgets dimension.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>graphics</em>&nbsp;</td><td>a <a class="el" href="classgcn_1_1Graphics.html">Graphics</a> object to draw with. </td></tr>
  </table>
</dl>

<p>
Implements <a class="el" href="classgcn_1_1Widget.html#cc595221d6a2d1afe1043c16dc37d212">gcn::Widget</a>.
<p>
Definition at line <a class="el" href="textfield_8cpp-source.html#l00108">108</a> of file <a class="el" href="textfield_8cpp-source.html">textfield.cpp</a>.
<p>
References <a class="el" href="textfield_8cpp-source.html#l00148">drawCaret()</a>, <a class="el" href="graphics_8cpp-source.html#l00134">gcn::Graphics::drawText()</a>, <a class="el" href="classgcn_1_1Graphics.html#5caac226a94ecf8fdfee1da7cd14f0df">gcn::Graphics::fillRectangle()</a>, <a class="el" href="widget_8cpp-source.html#l00305">gcn::Widget::getBackgroundColor()</a>, <a class="el" href="widget_8cpp-source.html#l00564">gcn::Widget::getFont()</a>, <a class="el" href="widget_8cpp-source.html#l00295">gcn::Widget::getForegroundColor()</a>, <a class="el" href="widget_8cpp-source.html#l00139">gcn::Widget::getHeight()</a>, <a class="el" href="widget_8cpp-source.html#l00129">gcn::Widget::getWidth()</a>, <a class="el" href="widget_8cpp-source.html#l00200">gcn::Widget::isFocused()</a>, <a class="el" href="textfield_8hpp-source.html#l00168">mCaretPosition</a>, <a class="el" href="textfield_8hpp-source.html#l00167">mText</a>, <a class="el" href="textfield_8hpp-source.html#l00169">mXScroll</a>, <a class="el" href="classgcn_1_1Graphics.html#7f438ae2b4cc09c66d77a9b9cb591e7c">gcn::Graphics::setColor()</a>, and <a class="el" href="graphics_8cpp-source.html#l00129">gcn::Graphics::setFont()</a>.
</div>
</div><p>
<a class="anchor" name="c094e85ea11edd7706044543f2c36230"></a><!-- doxytag: member="gcn::TextField::drawBorder" ref="c094e85ea11edd7706044543f2c36230" args="(Graphics *graphics)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void gcn::TextField::drawBorder           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classgcn_1_1Graphics.html">Graphics</a> *&nbsp;</td>
          <td class="paramname"> <em>graphics</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Draws the <a class="el" href="classgcn_1_1Widget.html">Widget</a> border. 
<p>
A border is drawn around a <a class="el" href="classgcn_1_1Widget.html">Widget</a>. The width and height of the border is therefore the Widgets height+2*bordersize. Think of a painting that has a certain size, the border surrounds the painting.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>graphics</em>&nbsp;</td><td>a <a class="el" href="classgcn_1_1Graphics.html">Graphics</a> object to draw with. </td></tr>
  </table>
</dl>

<p>
Reimplemented from <a class="el" href="classgcn_1_1Widget.html#58c3b2f513d8e029e321fd88a974f5c4">gcn::Widget</a>.
<p>
Definition at line <a class="el" href="textfield_8cpp-source.html#l00124">124</a> of file <a class="el" href="textfield_8cpp-source.html">textfield.cpp</a>.
<p>
References <a class="el" href="color_8hpp-source.html#l00161">gcn::Color::a</a>, <a class="el" href="classgcn_1_1Graphics.html#92af7e5f5ed6ebf692803bc1bd1d5db5">gcn::Graphics::drawLine()</a>, <a class="el" href="widget_8cpp-source.html#l00285">gcn::Widget::getBaseColor()</a>, <a class="el" href="widget_8cpp-source.html#l00180">gcn::Widget::getBorderSize()</a>, <a class="el" href="widget_8cpp-source.html#l00139">gcn::Widget::getHeight()</a>, <a class="el" href="widget_8cpp-source.html#l00129">gcn::Widget::getWidth()</a>, and <a class="el" href="classgcn_1_1Graphics.html#7f438ae2b4cc09c66d77a9b9cb591e7c">gcn::Graphics::setColor()</a>.
</div>
</div><p>
<a class="anchor" name="bf0b5531f60f50be504fedfd12bb07c8"></a><!-- doxytag: member="gcn::TextField::drawCaret" ref="bf0b5531f60f50be504fedfd12bb07c8" args="(Graphics *graphics, int x)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void gcn::TextField::drawCaret           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classgcn_1_1Graphics.html">Graphics</a> *&nbsp;</td>
          <td class="paramname"> <em>graphics</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>x</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Draws the caret (the little marker in the text that shows where the letters you type will appear). 
<p>
Easily overloaded if you want to change the style of the caret.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>graphics</em>&nbsp;</td><td>the <a class="el" href="classgcn_1_1Graphics.html">Graphics</a> object to draw with. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>x</em>&nbsp;</td><td>the caret's x-position. </td></tr>
  </table>
</dl>

<p>
Definition at line <a class="el" href="textfield_8cpp-source.html#l00148">148</a> of file <a class="el" href="textfield_8cpp-source.html">textfield.cpp</a>.
<p>
References <a class="el" href="classgcn_1_1Graphics.html#92af7e5f5ed6ebf692803bc1bd1d5db5">gcn::Graphics::drawLine()</a>, <a class="el" href="widget_8cpp-source.html#l00295">gcn::Widget::getForegroundColor()</a>, <a class="el" href="widget_8cpp-source.html#l00139">gcn::Widget::getHeight()</a>, and <a class="el" href="classgcn_1_1Graphics.html#7f438ae2b4cc09c66d77a9b9cb591e7c">gcn::Graphics::setColor()</a>.
<p>
Referenced by <a class="el" href="textfield_8cpp-source.html#l00108">draw()</a>.
</div>
</div><p>
<a class="anchor" name="19a47e362b1f5ca5e88e0372b5774fd8"></a><!-- doxytag: member="gcn::TextField::fontChanged" ref="19a47e362b1f5ca5e88e0372b5774fd8" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void gcn::TextField::fontChanged           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Called when the font has changed. 
<p>
If the change is global, this function will only be called if the <a class="el" href="classgcn_1_1Widget.html">Widget</a> don't have a font already set. 
<p>
Reimplemented from <a class="el" href="classgcn_1_1Widget.html#a0456eba65ee0c565e572f626780aa9d">gcn::Widget</a>.
<p>
Definition at line <a class="el" href="textfield_8cpp-source.html#l00269">269</a> of file <a class="el" href="textfield_8cpp-source.html">textfield.cpp</a>.
<p>
References <a class="el" href="textfield_8cpp-source.html#l00223">fixScroll()</a>.
</div>
</div><p>
<a class="anchor" name="8866f8d955405f2ef0542f11b3d253c1"></a><!-- doxytag: member="gcn::TextField::getCaretPosition" ref="8866f8d955405f2ef0542f11b3d253c1" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">unsigned int gcn::TextField::getCaretPosition           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Gets the caret position. 
<p>
<dl compact><dt><b>Returns:</b></dt><dd>the caret position. </dd></dl>

<p>
Definition at line <a class="el" href="textfield_8cpp-source.html#l00259">259</a> of file <a class="el" href="textfield_8cpp-source.html">textfield.cpp</a>.
<p>
References <a class="el" href="textfield_8hpp-source.html#l00168">mCaretPosition</a>.
</div>
</div><p>
<a class="anchor" name="4ab8ba2a5522c3d2163d7e4cdb0b298a"></a><!-- doxytag: member="gcn::TextField::getText" ref="4ab8ba2a5522c3d2163d7e4cdb0b298a" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const std::string &amp; gcn::TextField::getText           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Gets the text. 
<p>
<dl compact><dt><b>Returns:</b></dt><dd>the text of the <a class="el" href="classgcn_1_1TextField.html">TextField</a>. </dd></dl>

<p>
Definition at line <a class="el" href="textfield_8cpp-source.html#l00264">264</a> of file <a class="el" href="textfield_8cpp-source.html">textfield.cpp</a>.
<p>
References <a class="el" href="textfield_8hpp-source.html#l00167">mText</a>.
</div>
</div><p>
<a class="anchor" name="de45af70bf46fa6cefd9b355e1066ddd"></a><!-- doxytag: member="gcn::TextField::keyPress" ref="de45af70bf46fa6cefd9b355e1066ddd" args="(const Key &amp;key)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void gcn::TextField::keyPress           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classgcn_1_1Key.html">Key</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>key</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Called if a key is pressed when the widget has keyboard focus. 
<p>
If a key is held down the widget will generate multiple key presses.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>key</em>&nbsp;</td><td>the key pressed. </td></tr>
  </table>
</dl>

<p>
Reimplemented from <a class="el" href="classgcn_1_1KeyListener.html#dfe017c04383219f11055f4ee468407b">gcn::KeyListener</a>.
<p>
Definition at line <a class="el" href="textfield_8cpp-source.html#l00163">163</a> of file <a class="el" href="textfield_8cpp-source.html">textfield.cpp</a>.
<p>
References <a class="el" href="textfield_8cpp-source.html#l00223">fixScroll()</a>, <a class="el" href="widget_8cpp-source.html#l00555">gcn::Widget::generateAction()</a>, <a class="el" href="key_8cpp-source.html#l00148">gcn::Key::getValue()</a>, <a class="el" href="key_8cpp-source.html#l00073">gcn::Key::isCharacter()</a>, <a class="el" href="textfield_8hpp-source.html#l00168">mCaretPosition</a>, and <a class="el" href="textfield_8hpp-source.html#l00167">mText</a>.
</div>
</div><p>
<a class="anchor" name="893da9461844cf03e82adb51b97b5acc"></a><!-- doxytag: member="gcn::TextField::mousePress" ref="893da9461844cf03e82adb51b97b5acc" args="(int x, int y, int button)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void gcn::TextField::mousePress           </td>
          <td>(</td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>button</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Called when a mouse button is pressed when the mouse is in the <a class="el" href="classgcn_1_1Widget.html">Widget</a> area or if the <a class="el" href="classgcn_1_1Widget.html">Widget</a> has focus. 
<p>
NOTE: A mouse press is NOT equal to a mouse click. Use mouseClickMessage to check for mouse clicks.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>x</em>&nbsp;</td><td>the x coordinate of the mouse relative to the <a class="el" href="classgcn_1_1Widget.html">Widget</a> itself. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>y</em>&nbsp;</td><td>the y coordinate of the mouse relative to the <a class="el" href="classgcn_1_1Widget.html">Widget</a> itself. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>button</em>&nbsp;</td><td>the button pressed. </td></tr>
  </table>
</dl>

<p>
Reimplemented from <a class="el" href="classgcn_1_1MouseListener.html#fa7ee9263cc25be685cfddcc0a61b162">gcn::MouseListener</a>.
<p>
Definition at line <a class="el" href="textfield_8cpp-source.html#l00154">154</a> of file <a class="el" href="textfield_8cpp-source.html">textfield.cpp</a>.
<p>
References <a class="el" href="textfield_8cpp-source.html#l00223">fixScroll()</a>, <a class="el" href="widget_8cpp-source.html#l00564">gcn::Widget::getFont()</a>, <a class="el" href="font_8cpp-source.html#l00067">gcn::Font::getStringIndexAt()</a>, <a class="el" href="widget_8cpp-source.html#l00210">gcn::Widget::hasMouse()</a>, <a class="el" href="textfield_8hpp-source.html#l00168">mCaretPosition</a>, <a class="el" href="textfield_8hpp-source.html#l00167">mText</a>, and <a class="el" href="textfield_8hpp-source.html#l00169">mXScroll</a>.
</div>
</div><p>
<a class="anchor" name="01556df765b6eebaaa7f561fe080f5e1"></a><!-- doxytag: member="gcn::TextField::setCaretPosition" ref="01556df765b6eebaaa7f561fe080f5e1" args="(unsigned int position)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void gcn::TextField::setCaretPosition           </td>
          <td>(</td>
          <td class="paramtype">unsigned int&nbsp;</td>
          <td class="paramname"> <em>position</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Sets the caret position. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>position</em>&nbsp;</td><td>the caret position. </td></tr>
  </table>
</dl>

<p>
Definition at line <a class="el" href="textfield_8cpp-source.html#l00245">245</a> of file <a class="el" href="textfield_8cpp-source.html">textfield.cpp</a>.
<p>
References <a class="el" href="textfield_8cpp-source.html#l00223">fixScroll()</a>, <a class="el" href="textfield_8hpp-source.html#l00168">mCaretPosition</a>, and <a class="el" href="textfield_8hpp-source.html#l00167">mText</a>.
</div>
</div><p>
<a class="anchor" name="d4da21d56554bc41f2666417889757bd"></a><!-- doxytag: member="gcn::TextField::setText" ref="d4da21d56554bc41f2666417889757bd" args="(const std::string &amp;text)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void gcn::TextField::setText           </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&nbsp;</td>
          <td class="paramname"> <em>text</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Sets the text. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>text</em>&nbsp;</td><td>the new text in the <a class="el" href="classgcn_1_1TextField.html">TextField</a>. </td></tr>
  </table>
</dl>

<p>
Definition at line <a class="el" href="textfield_8cpp-source.html#l00098">98</a> of file <a class="el" href="textfield_8cpp-source.html">textfield.cpp</a>.
<p>
References <a class="el" href="textfield_8hpp-source.html#l00168">mCaretPosition</a>, and <a class="el" href="textfield_8hpp-source.html#l00167">mText</a>.
</div>
</div><p>
<hr>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="textfield_8hpp-source.html">textfield.hpp</a><li><a class="el" href="textfield_8cpp-source.html">textfield.cpp</a></ul>
<hr size="1"><address style="align: right;"><small>Generated on Sat Jul 29 19:38:49 2006 for Guichan by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.7 </small></address>
</body>
</html>