341 lines
16 KiB
HTML
341 lines
16 KiB
HTML
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||
|
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
|
||
|
<title>Gewi::GTextField class Reference</title>
|
||
|
<link href="doxygen.css" rel="stylesheet" type="text/css">
|
||
|
</head><body>
|
||
|
<!-- Generated by Doxygen 1.3 -->
|
||
|
<center>
|
||
|
<a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="namespaces.html">Namespace List</a> <a class="qindex" href="hierarchy.html">Class Hierarchy</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="namespacemembers.html">Namespace Members</a> <a class="qindex" href="functions.html">Compound Members</a> </center>
|
||
|
<hr><h1>Gewi::GTextField Class Reference</h1><code>#include <<a class="el" href="GewiTextField_8h-source.html">GewiTextField.h</a>></code>
|
||
|
<p>
|
||
|
Inherits <a class="el" href="classGewi_1_1GWidget.html">Gewi::GWidget</a>.
|
||
|
<p>
|
||
|
<a href="classGewi_1_1GTextField-members.html">List of all members.</a><hr><a name="_details"></a><h2>Detailed Description</h2>
|
||
|
<a class="el" href="classGewi_1_1GTextField.html">GTextField</a> simple text input area widget, derived from <a class="el" href="classGewi_1_1GWidget.html">GWidget</a>.
|
||
|
<p>
|
||
|
<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 nowrap align=right valign=top> </td><td valign=bottom><a class="el" href="classGewi_1_1GTextField.html#a0">GTextField</a> (<a class="el" href="classGewi_1_1GContainer.html">GContainer</a> *parent=NULL)</td></tr>
|
||
|
<tr><td> </td><td><em class="mdesc">Simple constructor for <a class="el" href="classGewi_1_1GTextField.html">GTextField</a>.</em> <a href="#a0"></a><em></em><br><br></td></tr>
|
||
|
<tr><td nowrap align=right valign=top>virtual void </td><td valign=bottom><a class="el" href="classGewi_1_1GTextField.html#a1">Create</a> (float x, float y, float width, float height, <a class="el" href="namespaceGewi.html#a2">ResourceID</a> font, <a class="el" href="namespaceGewi.html#a2">ResourceID</a> backgroundImg, int maxChars=256, int leftPad=0)</td></tr>
|
||
|
<tr><td> </td><td><em class="mdesc">GButton's create function, must be called to set up actual button.</em> <a href="#a1"></a><em></em><br><br></td></tr>
|
||
|
<tr><td nowrap align=right valign=top>virtual void </td><td valign=bottom><a class="el" href="classGewi_1_1GTextField.html#a2">Message</a> (SDL_Event *rawEvent, <a class="el" href="namespaceGewi.html#a18">GewiEvent</a> event, Uint16 mouseX, Uint16 mouseY, char ch)</td></tr>
|
||
|
<tr><td> </td><td><em class="mdesc">Overload of Message, used to recieve messages.</em> <a href="#a2"></a><em></em><br><br></td></tr>
|
||
|
<tr><td nowrap align=right valign=top>virtual void </td><td valign=bottom><a class="el" href="classGewi_1_1GTextField.html#a3">Show</a> ()</td></tr>
|
||
|
<tr><td> </td><td><em class="mdesc">Draws the text input area & text to the screen.</em> <a href="#a3"></a><em></em><br><br></td></tr>
|
||
|
<tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="classGewi_1_1GTextField.html#a4">SetText</a> (std::string text)</td></tr>
|
||
|
<tr><td> </td><td><em class="mdesc">Set text in input area.</em> <a href="#a4"></a><em></em><br><br></td></tr>
|
||
|
<tr><td nowrap align=right valign=top>std::string </td><td valign=bottom><a class="el" href="classGewi_1_1GTextField.html#a5">GetText</a> ()</td></tr>
|
||
|
<tr><td> </td><td><em class="mdesc">Get current text of the input box.</em> <a href="#a5"></a><em></em><br><br></td></tr>
|
||
|
<tr><td colspan=2><br><h2>Protected Attributes</h2></td></tr>
|
||
|
<tr><td nowrap align=right valign=top><a name="n0" doxytag="Gewi::GTextField::rText"></a>
|
||
|
std::string </td><td valign=bottom><a class="el" href="classGewi_1_1GTextField.html#n0">rText</a></td></tr>
|
||
|
<tr><td> </td><td><em class="mdesc">Text currently entered.</em><br><br></td></tr>
|
||
|
<tr><td nowrap align=right valign=top><a name="n1" doxytag="Gewi::GTextField::rBuffer"></a>
|
||
|
ZE::ZImage </td><td valign=bottom><a class="el" href="classGewi_1_1GTextField.html#n1">rBuffer</a></td></tr>
|
||
|
<tr><td> </td><td><em class="mdesc">Text buffer, used internally.</em><br><br></td></tr>
|
||
|
<tr><td nowrap align=right valign=top><a name="n2" doxytag="Gewi::GTextField::rFont"></a>
|
||
|
<a class="el" href="namespaceGewi.html#a2">ResourceID</a> </td><td valign=bottom><a class="el" href="classGewi_1_1GTextField.html#n2">rFont</a></td></tr>
|
||
|
<tr><td> </td><td><em class="mdesc">Font for text.</em><br><br></td></tr>
|
||
|
<tr><td nowrap align=right valign=top><a name="n3" doxytag="Gewi::GTextField::rBackground"></a>
|
||
|
<a class="el" href="namespaceGewi.html#a2">ResourceID</a> </td><td valign=bottom><a class="el" href="classGewi_1_1GTextField.html#n3">rBackground</a></td></tr>
|
||
|
<tr><td> </td><td><em class="mdesc">Background for text input area.</em><br><br></td></tr>
|
||
|
<tr><td nowrap align=right valign=top><a name="n4" doxytag="Gewi::GTextField::rMaxChars"></a>
|
||
|
int </td><td valign=bottom><a class="el" href="classGewi_1_1GTextField.html#n4">rMaxChars</a></td></tr>
|
||
|
<tr><td> </td><td><em class="mdesc">Maximum number of characters allowed to be entered.</em><br><br></td></tr>
|
||
|
<tr><td nowrap align=right valign=top><a name="n5" doxytag="Gewi::GTextField::rLeftPadding"></a>
|
||
|
int </td><td valign=bottom><a class="el" href="classGewi_1_1GTextField.html#n5">rLeftPadding</a></td></tr>
|
||
|
<tr><td> </td><td><em class="mdesc">Amount of padding on left hand side.</em><br><br></td></tr>
|
||
|
</table>
|
||
|
<hr><h2>Constructor & Destructor Documentation</h2>
|
||
|
<a name="a0" doxytag="Gewi::GTextField::GTextField"></a><p>
|
||
|
<table width="100%" cellpadding="2" cellspacing="0" border="0">
|
||
|
<tr>
|
||
|
<td class="md">
|
||
|
<table cellpadding="0" cellspacing="0" border="0">
|
||
|
<tr>
|
||
|
<td class="md" nowrap valign="top"> Gewi::GTextField::GTextField </td>
|
||
|
<td class="md" valign="top">( </td>
|
||
|
<td class="md" nowrap valign="top"><a class="el" href="classGewi_1_1GContainer.html">GContainer</a> * </td>
|
||
|
<td class="mdname1" valign="top" nowrap> <em>parent</em> = NULL </td>
|
||
|
<td class="md" valign="top"> ) </td>
|
||
|
<td class="md" nowrap></td>
|
||
|
</tr>
|
||
|
|
||
|
</table>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
<table cellspacing=5 cellpadding=0 border=0>
|
||
|
<tr>
|
||
|
<td>
|
||
|
|
||
|
</td>
|
||
|
<td>
|
||
|
|
||
|
<p>
|
||
|
Constructor for <a class="el" href="classGewi_1_1GTextField.html">GTextField</a>, can take a parent. <dl compact><dt><b>Parameters:</b></dt><dd>
|
||
|
<table border="0" cellspacing="2" cellpadding="0">
|
||
|
<tr><td valign=top><em>parent</em> </td><td>Pointer to <a class="el" href="classGewi_1_1GContainer.html">GContainer</a> derived class to be the parent. Default value is NULL which means no parent. </td></tr>
|
||
|
</table>
|
||
|
</dl>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
<hr><h2>Member Function Documentation</h2>
|
||
|
<a name="a1" doxytag="Gewi::GTextField::Create"></a><p>
|
||
|
<table width="100%" cellpadding="2" cellspacing="0" border="0">
|
||
|
<tr>
|
||
|
<td class="md">
|
||
|
<table cellpadding="0" cellspacing="0" border="0">
|
||
|
<tr>
|
||
|
<td class="md" nowrap valign="top"> void Gewi::GTextField::Create </td>
|
||
|
<td class="md" valign="top">( </td>
|
||
|
<td class="md" nowrap valign="top">float </td>
|
||
|
<td class="mdname" nowrap> <em>x</em>, </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td></td>
|
||
|
<td></td>
|
||
|
<td class="md" nowrap>float </td>
|
||
|
<td class="mdname" nowrap> <em>y</em>, </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td></td>
|
||
|
<td></td>
|
||
|
<td class="md" nowrap>float </td>
|
||
|
<td class="mdname" nowrap> <em>width</em>, </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td></td>
|
||
|
<td></td>
|
||
|
<td class="md" nowrap>float </td>
|
||
|
<td class="mdname" nowrap> <em>height</em>, </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td></td>
|
||
|
<td></td>
|
||
|
<td class="md" nowrap><a class="el" href="namespaceGewi.html#a2">ResourceID</a> </td>
|
||
|
<td class="mdname" nowrap> <em>font</em>, </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td></td>
|
||
|
<td></td>
|
||
|
<td class="md" nowrap><a class="el" href="namespaceGewi.html#a2">ResourceID</a> </td>
|
||
|
<td class="mdname" nowrap> <em>backgroundImg</em>, </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td></td>
|
||
|
<td></td>
|
||
|
<td class="md" nowrap>int </td>
|
||
|
<td class="mdname" nowrap> <em>maxChars</em> = 256, </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td></td>
|
||
|
<td></td>
|
||
|
<td class="md" nowrap>int </td>
|
||
|
<td class="mdname" nowrap> <em>leftPad</em> = 0</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td></td>
|
||
|
<td class="md">) </td>
|
||
|
<td class="md" colspan="2"><code> [virtual]</code></td>
|
||
|
</tr>
|
||
|
|
||
|
</table>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
<table cellspacing=5 cellpadding=0 border=0>
|
||
|
<tr>
|
||
|
<td>
|
||
|
|
||
|
</td>
|
||
|
<td>
|
||
|
|
||
|
<p>
|
||
|
Every widget has a create function which must be called to define the button's appearance and settings. <dl compact><dt><b>Parameters:</b></dt><dd>
|
||
|
<table border="0" cellspacing="2" cellpadding="0">
|
||
|
<tr><td valign=top><em>x</em> </td><td>X position of widget within it's container (entire screen if no parent) </td></tr>
|
||
|
<tr><td valign=top><em>y</em> </td><td>Y position of widget within it's container (entire screen if no parent) </td></tr>
|
||
|
<tr><td valign=top><em>width</em> </td><td>Width of widget. </td></tr>
|
||
|
<tr><td valign=top><em>height</em> </td><td>Height of widget. </td></tr>
|
||
|
<tr><td valign=top><em>font</em> </td><td>Font for text. </td></tr>
|
||
|
<tr><td valign=top><em>backgroundImg</em> </td><td>Image for text input box. </td></tr>
|
||
|
<tr><td valign=top><em>maxChars</em> </td><td>Maximum number of characters to be entered, defaults to 256. </td></tr>
|
||
|
<tr><td valign=top><em>leftPad</em> </td><td>padding on left side, defaults to zero. </td></tr>
|
||
|
</table>
|
||
|
</dl>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
<a name="a2" doxytag="Gewi::GTextField::Message"></a><p>
|
||
|
<table width="100%" cellpadding="2" cellspacing="0" border="0">
|
||
|
<tr>
|
||
|
<td class="md">
|
||
|
<table cellpadding="0" cellspacing="0" border="0">
|
||
|
<tr>
|
||
|
<td class="md" nowrap valign="top"> void Gewi::GTextField::Message </td>
|
||
|
<td class="md" valign="top">( </td>
|
||
|
<td class="md" nowrap valign="top">SDL_Event * </td>
|
||
|
<td class="mdname" nowrap> <em>rawEvent</em>, </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td></td>
|
||
|
<td></td>
|
||
|
<td class="md" nowrap><a class="el" href="namespaceGewi.html#a18">GewiEvent</a> </td>
|
||
|
<td class="mdname" nowrap> <em>event</em>, </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td></td>
|
||
|
<td></td>
|
||
|
<td class="md" nowrap>Uint16 </td>
|
||
|
<td class="mdname" nowrap> <em>mouseX</em>, </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td></td>
|
||
|
<td></td>
|
||
|
<td class="md" nowrap>Uint16 </td>
|
||
|
<td class="mdname" nowrap> <em>mouseY</em>, </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td></td>
|
||
|
<td></td>
|
||
|
<td class="md" nowrap>char </td>
|
||
|
<td class="mdname" nowrap> <em>ch</em></td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td></td>
|
||
|
<td class="md">) </td>
|
||
|
<td class="md" colspan="2"><code> [virtual]</code></td>
|
||
|
</tr>
|
||
|
|
||
|
</table>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
<table cellspacing=5 cellpadding=0 border=0>
|
||
|
<tr>
|
||
|
<td>
|
||
|
|
||
|
</td>
|
||
|
<td>
|
||
|
|
||
|
<p>
|
||
|
Recieves and processes a message, required overload for all widgets. <dl compact><dt><b>Parameters:</b></dt><dd>
|
||
|
<table border="0" cellspacing="2" cellpadding="0">
|
||
|
<tr><td valign=top><em>rawEvent</em> </td><td>SDL_Event of original message, may be needed if more information is available on event. (May be NULL). </td></tr>
|
||
|
<tr><td valign=top><em>event</em> </td><td>GewiEvent enum, description of event recieved. </td></tr>
|
||
|
<tr><td valign=top><em>mouseX</em> </td><td>Mouse x position in event, if not mouse event may be incorrect. </td></tr>
|
||
|
<tr><td valign=top><em>mouseY</em> </td><td>Mouse y position in event, if not mouse event may be incorrect. </td></tr>
|
||
|
<tr><td valign=top><em>ch</em> </td><td>Character pressed in event, may be 0 if not a keypress event. </td></tr>
|
||
|
</table>
|
||
|
</dl>
|
||
|
|
||
|
<p>
|
||
|
Implements <a class="el" href="classGewi_1_1GWidget.html#a6">Gewi::GWidget</a>. </td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
<a name="a3" doxytag="Gewi::GTextField::Show"></a><p>
|
||
|
<table width="100%" cellpadding="2" cellspacing="0" border="0">
|
||
|
<tr>
|
||
|
<td class="md">
|
||
|
<table cellpadding="0" cellspacing="0" border="0">
|
||
|
<tr>
|
||
|
<td class="md" nowrap valign="top"> void Gewi::GTextField::Show </td>
|
||
|
<td class="md" valign="top">( </td>
|
||
|
<td class="mdname1" valign="top" nowrap> </td>
|
||
|
<td class="md" valign="top"> ) </td>
|
||
|
<td class="md" nowrap><code> [virtual]</code></td>
|
||
|
</tr>
|
||
|
|
||
|
</table>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
<table cellspacing=5 cellpadding=0 border=0>
|
||
|
<tr>
|
||
|
<td>
|
||
|
|
||
|
</td>
|
||
|
<td>
|
||
|
|
||
|
<p>
|
||
|
Draws widget to the screen, required overload for all widgets.
|
||
|
<p>
|
||
|
Implements <a class="el" href="classGewi_1_1GWidget.html#a7">Gewi::GWidget</a>. </td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
<a name="a4" doxytag="Gewi::GTextField::SetText"></a><p>
|
||
|
<table width="100%" cellpadding="2" cellspacing="0" border="0">
|
||
|
<tr>
|
||
|
<td class="md">
|
||
|
<table cellpadding="0" cellspacing="0" border="0">
|
||
|
<tr>
|
||
|
<td class="md" nowrap valign="top"> void Gewi::GTextField::SetText </td>
|
||
|
<td class="md" valign="top">( </td>
|
||
|
<td class="md" nowrap valign="top">std::string </td>
|
||
|
<td class="mdname1" valign="top" nowrap> <em>text</em> </td>
|
||
|
<td class="md" valign="top"> ) </td>
|
||
|
<td class="md" nowrap></td>
|
||
|
</tr>
|
||
|
|
||
|
</table>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
<table cellspacing=5 cellpadding=0 border=0>
|
||
|
<tr>
|
||
|
<td>
|
||
|
|
||
|
</td>
|
||
|
<td>
|
||
|
|
||
|
<p>
|
||
|
Sets the current text of the buffer for input area. <dl compact><dt><b>Parameters:</b></dt><dd>
|
||
|
<table border="0" cellspacing="2" cellpadding="0">
|
||
|
<tr><td valign=top><em>text</em> </td><td>New text for button. </td></tr>
|
||
|
</table>
|
||
|
</dl>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
<a name="a5" doxytag="Gewi::GTextField::GetText"></a><p>
|
||
|
<table width="100%" cellpadding="2" cellspacing="0" border="0">
|
||
|
<tr>
|
||
|
<td class="md">
|
||
|
<table cellpadding="0" cellspacing="0" border="0">
|
||
|
<tr>
|
||
|
<td class="md" nowrap valign="top"> std::string Gewi::GTextField::GetText </td>
|
||
|
<td class="md" valign="top">( </td>
|
||
|
<td class="mdname1" valign="top" nowrap> </td>
|
||
|
<td class="md" valign="top"> ) </td>
|
||
|
<td class="md" nowrap></td>
|
||
|
</tr>
|
||
|
|
||
|
</table>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
<table cellspacing=5 cellpadding=0 border=0>
|
||
|
<tr>
|
||
|
<td>
|
||
|
|
||
|
</td>
|
||
|
<td>
|
||
|
|
||
|
<p>
|
||
|
Return text in the input buffer. <dl compact><dt><b>Returns:</b></dt><dd>text currently in input buffer. </dd></dl>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
<hr>The documentation for this class was generated from the following files:<ul>
|
||
|
<li>/include/<a class="el" href="GewiTextField_8h-source.html">GewiTextField.h</a><li>/src/<a class="el" href="GewiTextField_8cpp.html">GewiTextField.cpp</a></ul>
|
||
|
<hr><address style="align: right;"><small>Generated on Mon Jun 16 03:27:18 2003 for Gewi by
|
||
|
<a href="http://www.doxygen.org/index.html">
|
||
|
<img src="doxygen.png" alt="doxygen" align="middle" border=0
|
||
|
width=110 height=53></a>1.3 </small></address>
|
||
|
</body>
|
||
|
</html>
|