276 lines
13 KiB
HTML
Executable File
276 lines
13 KiB
HTML
Executable File
<!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::GTextButton 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::GTextButton Class Reference</h1><code>#include <<a class="el" href="GewiTextButton_8h-source.html">GewiTextButton.h</a>></code>
|
|
<p>
|
|
Inherits <a class="el" href="classGewi_1_1GButton.html">Gewi::GButton</a>.
|
|
<p>
|
|
<a href="classGewi_1_1GTextButton-members.html">List of all members.</a><hr><a name="_details"></a><h2>Detailed Description</h2>
|
|
<a class="el" href="classGewi_1_1GTextButton.html">GTextButton</a> text label button widget, derived from <a class="el" href="classGewi_1_1GButton.html">GButton</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_1GTextButton.html#a0">GTextButton</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_1GButton.html">GButton</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_1GTextButton.html#a1">Create</a> (float x, float y, float width, float height, <a class="el" href="namespaceGewi.html#a2">ResourceID</a> normalImg, <a class="el" href="namespaceGewi.html#a2">ResourceID</a> pressImg, <a class="el" href="namespaceGewi.html#a2">ResourceID</a> font, std::string text="", <a class="el" href="namespaceGewi.html#a17">GButtonType</a> type=GBT_PRESS)</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_1GTextButton.html#a2">Show</a> ()</td></tr>
|
|
<tr><td> </td><td><em class="mdesc">Draws static label to the screen.</em> <a href="#a2"></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_1GTextButton.html#a3">SetText</a> (std::string text)</td></tr>
|
|
<tr><td> </td><td><em class="mdesc">Set text of button.</em> <a href="#a3"></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_1GTextButton.html#a4">GetText</a> ()</td></tr>
|
|
<tr><td> </td><td><em class="mdesc">Get current text of button label.</em> <a href="#a4"></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::GTextButton::rText"></a>
|
|
std::string </td><td valign=bottom><a class="el" href="classGewi_1_1GTextButton.html#n0">rText</a></td></tr>
|
|
<tr><td> </td><td><em class="mdesc">Text label for button.</em><br><br></td></tr>
|
|
<tr><td nowrap align=right valign=top><a name="n1" doxytag="Gewi::GTextButton::rTextBuf"></a>
|
|
ZE::ZImage </td><td valign=bottom><a class="el" href="classGewi_1_1GTextButton.html#n1">rTextBuf</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::GTextButton::rXOff"></a>
|
|
int </td><td valign=bottom><a class="el" href="classGewi_1_1GTextButton.html#n2">rXOff</a></td></tr>
|
|
<tr><td> </td><td><em class="mdesc">X offset of text.</em><br><br></td></tr>
|
|
<tr><td nowrap align=right valign=top><a name="n3" doxytag="Gewi::GTextButton::rYOff"></a>
|
|
int </td><td valign=bottom><a class="el" href="classGewi_1_1GTextButton.html#n3">rYOff</a></td></tr>
|
|
<tr><td> </td><td><em class="mdesc">Y offset of text.</em><br><br></td></tr>
|
|
<tr><td nowrap align=right valign=top><a name="n4" doxytag="Gewi::GTextButton::rFont"></a>
|
|
<a class="el" href="namespaceGewi.html#a2">ResourceID</a> </td><td valign=bottom><a class="el" href="classGewi_1_1GTextButton.html#n4">rFont</a></td></tr>
|
|
<tr><td> </td><td><em class="mdesc">Font ID for text label.</em><br><br></td></tr>
|
|
</table>
|
|
<hr><h2>Constructor & Destructor Documentation</h2>
|
|
<a name="a0" doxytag="Gewi::GTextButton::GTextButton"></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::GTextButton::GTextButton </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_1GButton.html">GButton</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::GTextButton::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::GTextButton::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>normalImg</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>pressImg</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#a17">GButtonType</a> </td>
|
|
<td class="mdname" nowrap> <em>type</em> = GBT_PRESS</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>normalImg</em> </td><td>Image for button when not pressed. </td></tr>
|
|
<tr><td valign=top><em>pressImg</em> </td><td>Image for button when pressed (or hovered if type is GBT_HOVER). </td></tr>
|
|
<tr><td valign=top><em>font</em> </td><td>Font to draw label with. </td></tr>
|
|
<tr><td valign=top><em>text</em> </td><td>Text for button. (default is blank) </td></tr>
|
|
<tr><td valign=top><em>type</em> </td><td>GButtonType, either the default, GBT_PRESS (normal button), or GBT_HOVER (a button which responds to the hovering mouse). </td></tr>
|
|
</table>
|
|
</dl>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<a name="a2" doxytag="Gewi::GTextButton::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::GTextButton::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>
|
|
Reimplemented from <a class="el" href="classGewi_1_1GButton.html#a3">Gewi::GButton</a>. </td>
|
|
</tr>
|
|
</table>
|
|
<a name="a3" doxytag="Gewi::GTextButton::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::GTextButton::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 button. <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="a4" doxytag="Gewi::GTextButton::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::GTextButton::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 on button label. <dl compact><dt><b>Returns:</b></dt><dd>text currently on button 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="GewiTextButton_8h-source.html">GewiTextButton.h</a><li>/src/<a class="el" href="GewiTextButton_8cpp.html">GewiTextButton.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>
|