344 lines
16 KiB
HTML
344 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::GStaticText 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::GStaticText Class Reference</h1><code>#include <<a class="el" href="GewiStaticText_8h-source.html">GewiStaticText.h</a>></code>
|
||
|
<p>
|
||
|
Inherits <a class="el" href="classGewi_1_1GWidget.html">Gewi::GWidget</a>.
|
||
|
<p>
|
||
|
<a href="classGewi_1_1GStaticText-members.html">List of all members.</a><hr><a name="_details"></a><h2>Detailed Description</h2>
|
||
|
<a class="el" href="classGewi_1_1GStaticText.html">GStaticText</a>, stationary label class, 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_1GStaticText.html#a0">GStaticText</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_1GStaticText.html">GStaticText</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_1GStaticText.html#a1">Create</a> (float x, float y, float width, float height, <a class="el" href="namespaceGewi.html#a2">ResourceID</a> font, std::string text="", <a class="el" href="namespaceGewi.html#a3">GewiJustify</a> just=GJ_CENTER, <a class="el" href="namespaceGewi.html#a2">ResourceID</a> backgroundImg=<a class="el" href="classGewi_1_1GewiEngine.html#p2">GewiEngine::InvalidID</a>)</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_1GStaticText.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_1GStaticText.html#a3">Show</a> ()</td></tr>
|
||
|
<tr><td> </td><td><em class="mdesc">Draws static label 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_1GStaticText.html#a4">SetText</a> (std::string text)</td></tr>
|
||
|
<tr><td> </td><td><em class="mdesc">Set text of label.</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_1GStaticText.html#a5">GetText</a> ()</td></tr>
|
||
|
<tr><td> </td><td><em class="mdesc">Get current text in label.</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::GStaticText::rBackgroundImage"></a>
|
||
|
<a class="el" href="namespaceGewi.html#a2">ResourceID</a> </td><td valign=bottom><a class="el" href="classGewi_1_1GStaticText.html#n0">rBackgroundImage</a></td></tr>
|
||
|
<tr><td> </td><td><em class="mdesc">Image for background of label (often no image).</em><br><br></td></tr>
|
||
|
<tr><td nowrap align=right valign=top><a name="n1" doxytag="Gewi::GStaticText::rFont"></a>
|
||
|
<a class="el" href="namespaceGewi.html#a2">ResourceID</a> </td><td valign=bottom><a class="el" href="classGewi_1_1GStaticText.html#n1">rFont</a></td></tr>
|
||
|
<tr><td> </td><td><em class="mdesc">Font to use for label.</em><br><br></td></tr>
|
||
|
<tr><td nowrap align=right valign=top><a name="n2" doxytag="Gewi::GStaticText::rText"></a>
|
||
|
std::string </td><td valign=bottom><a class="el" href="classGewi_1_1GStaticText.html#n2">rText</a></td></tr>
|
||
|
<tr><td> </td><td><em class="mdesc">Current text of label.</em><br><br></td></tr>
|
||
|
<tr><td nowrap align=right valign=top><a name="n3" doxytag="Gewi::GStaticText::rTextBuf"></a>
|
||
|
ZE::ZImage </td><td valign=bottom><a class="el" href="classGewi_1_1GStaticText.html#n3">rTextBuf</a></td></tr>
|
||
|
<tr><td> </td><td><em class="mdesc">Text buffer ZImage, used internally.</em><br><br></td></tr>
|
||
|
<tr><td nowrap align=right valign=top><a name="n4" doxytag="Gewi::GStaticText::rXOff"></a>
|
||
|
int </td><td valign=bottom><a class="el" href="classGewi_1_1GStaticText.html#n4">rXOff</a></td></tr>
|
||
|
<tr><td> </td><td><em class="mdesc">Calculated X Offset for text, calculated from justification.</em><br><br></td></tr>
|
||
|
<tr><td nowrap align=right valign=top><a name="n5" doxytag="Gewi::GStaticText::rYOff"></a>
|
||
|
int </td><td valign=bottom><a class="el" href="classGewi_1_1GStaticText.html#n5">rYOff</a></td></tr>
|
||
|
<tr><td> </td><td><em class="mdesc">Calculated Y Offset for text, calculated from justification.</em><br><br></td></tr>
|
||
|
<tr><td nowrap align=right valign=top><a name="n6" doxytag="Gewi::GStaticText::rJustify"></a>
|
||
|
<a class="el" href="namespaceGewi.html#a3">GewiJustify</a> </td><td valign=bottom><a class="el" href="classGewi_1_1GStaticText.html#n6">rJustify</a></td></tr>
|
||
|
<tr><td> </td><td><em class="mdesc">Justification, can be or'ed together enums from _GewiJustify, see documentation of that enum for details.</em><br><br></td></tr>
|
||
|
</table>
|
||
|
<hr><h2>Constructor & Destructor Documentation</h2>
|
||
|
<a name="a0" doxytag="Gewi::GStaticText::GStaticText"></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::GStaticText::GStaticText </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_1GStaticText.html">GStaticText</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::GStaticText::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::GStaticText::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>std::string </td>
|
||
|
<td class="mdname" nowrap> <em>text</em> = "", </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td></td>
|
||
|
<td></td>
|
||
|
<td class="md" nowrap><a class="el" href="namespaceGewi.html#a3">GewiJustify</a> </td>
|
||
|
<td class="mdname" nowrap> <em>just</em> = GJ_CENTER, </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> = <a class="el" href="classGewi_1_1GewiEngine.html#p2">GewiEngine::InvalidID</a></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 ID for text. </td></tr>
|
||
|
<tr><td valign=top><em>text</em> </td><td>Text for static label. (Defaults to a blank space.) </td></tr>
|
||
|
<tr><td valign=top><em>just</em> </td><td>Justification, see documented _GewiJustify for details. Defaults to GJ_CENTER. </td></tr>
|
||
|
<tr><td valign=top><em>backgroundImg</em> </td><td>Image for background, defaults to <a class="el" href="classGewi_1_1GewiEngine.html#p2">GewiEngine::InvalidID</a>. </td></tr>
|
||
|
</table>
|
||
|
</dl>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
<a name="a2" doxytag="Gewi::GStaticText::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::GStaticText::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::GStaticText::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::GStaticText::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 static label 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::GStaticText::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::GStaticText::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 label. <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 label. </td></tr>
|
||
|
</table>
|
||
|
</dl>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
<a name="a5" doxytag="Gewi::GStaticText::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::GStaticText::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 label. <dl compact><dt><b>Returns:</b></dt><dd>text currently in label. </dd></dl>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
<hr>The documentation for this class was generated from the following files:<ul>
|
||
|
<li>/include/<a class="el" href="GewiStaticText_8h-source.html">GewiStaticText.h</a><li>/src/<a class="el" href="GewiStaticText_8cpp.html">GewiStaticText.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>
|