zengine-gewi/doc/html/classGewi_1_1GContainer.html
2003-06-16 07:27:48 +00:00

359 lines
16 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::GContainer 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> &nbsp; <a class="qindex" href="namespaces.html">Namespace List</a> &nbsp; <a class="qindex" href="hierarchy.html">Class Hierarchy</a> &nbsp; <a class="qindex" href="annotated.html">Compound List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="namespacemembers.html">Namespace Members</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; </center>
<hr><h1>Gewi::GContainer Class Reference</h1><code>#include &lt;<a class="el" href="GewiContainer_8h-source.html">GewiContainer.h</a>&gt;</code>
<p>
Inherits <a class="el" href="classGewi_1_1GWidget.html">Gewi::GWidget</a>.
<p>
Inherited by <a class="el" href="classGewi_1_1GWindow.html">Gewi::GWindow</a>.
<p>
<a href="classGewi_1_1GContainer-members.html">List of all members.</a><hr><a name="_details"></a><h2>Detailed Description</h2>
<a class="el" href="classGewi_1_1GContainer.html">GContainer</a> widget which is a standard <a class="el" href="classGewi_1_1GWidget.html">GWidget</a> that can serve as a parent, contain and manage other widgets.
<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>&nbsp;</td><td valign=bottom><a class="el" href="classGewi_1_1GContainer.html#a0">GContainer</a> (GContainer *parent=NULL)</td></tr>
<tr><td>&nbsp;</td><td><em class="mdesc">Simple constructor for <a class="el" href="classGewi_1_1GContainer.html">GContainer</a>.</em> <a href="#a0"></a><em></em><br><br></td></tr>
<tr><td nowrap align=right valign=top>virtual void&nbsp;</td><td valign=bottom><a class="el" href="classGewi_1_1GContainer.html#a2">Move</a> (float x, float y)</td></tr>
<tr><td>&nbsp;</td><td><em class="mdesc">Move container and children.</em> <a href="#a2"></a><em></em><br><br></td></tr>
<tr><td nowrap align=right valign=top>virtual void&nbsp;</td><td valign=bottom><a class="el" href="classGewi_1_1GContainer.html#a3">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>&nbsp;</td><td><em class="mdesc">Overload of Message, used to recieve messages.</em> <a href="#a3"></a><em></em><br><br></td></tr>
<tr><td nowrap align=right valign=top>virtual void&nbsp;</td><td valign=bottom><a class="el" href="classGewi_1_1GContainer.html#a4">Show</a> ()</td></tr>
<tr><td>&nbsp;</td><td><em class="mdesc">Show children.</em> <a href="#a4"></a><em></em><br><br></td></tr>
<tr><td colspan=2><br><h2>Protected Member Functions</h2></td></tr>
<tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="classGewi_1_1GContainer.html#b0">AddChild</a> (<a class="el" href="classGewi_1_1GWidget.html">GWidget</a> *widget)</td></tr>
<tr><td>&nbsp;</td><td><em class="mdesc">Adds a child to the child list.</em> <a href="#b0"></a><em></em><br><br></td></tr>
<tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="classGewi_1_1GContainer.html#b1">ReleaseChild</a> (<a class="el" href="classGewi_1_1GWidget.html">GWidget</a> *widget)</td></tr>
<tr><td>&nbsp;</td><td><em class="mdesc">Removes a child from the child list.</em> <a href="#b1"></a><em></em><br><br></td></tr>
<tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="classGewi_1_1GContainer.html#b2">InsertWidget</a> (<a class="el" href="classGewi_1_1WidgetNode.html">WidgetNode</a> *node)</td></tr>
<tr><td>&nbsp;</td><td><em class="mdesc">Inserts a child to the child list.</em> <a href="#b2"></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::GContainer::rChildList"></a>
<a class="el" href="classGewi_1_1WidgetList.html">WidgetList</a>&nbsp;</td><td valign=bottom><a class="el" href="classGewi_1_1GContainer.html#n0">rChildList</a></td></tr>
<tr><td>&nbsp;</td><td><em class="mdesc">List of child widgets assigned to this container.</em><br><br></td></tr>
<tr><td colspan=2><br><h2>Private Attributes</h2></td></tr>
<tr><td nowrap align=right valign=top>friend&nbsp;</td><td valign=bottom><a class="el" href="classGewi_1_1GContainer.html#o0">GWidget</a></td></tr>
</table>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a name="a0" doxytag="Gewi::GContainer::GContainer"></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::GContainer::GContainer </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">GContainer *&nbsp;</td>
<td class="mdname1" valign="top" nowrap> <em>parent</em> = NULL </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Constructor for <a class="el" href="classGewi_1_1GContainer.html">GContainer</a>, can take a parent (to be contained on a <a class="el" href="classGewi_1_1GContainer.html">GContainer</a> derived class, allowing nested containers). <dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign=top><em>parent</em>&nbsp;</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="b0" doxytag="Gewi::GContainer::AddChild"></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::GContainer::AddChild </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top"><a class="el" href="classGewi_1_1GWidget.html">GWidget</a> *&nbsp;</td>
<td class="mdname1" valign="top" nowrap> <em>widget</em> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap><code> [protected]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Registers the widget as a child of this container, private because <a class="el" href="classGewi_1_1GWidget.html">GWidget</a> is a friend. <dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign=top><em>widget</em>&nbsp;</td><td>Widget to register as a child of this container. </td></tr>
</table>
</dl>
</td>
</tr>
</table>
<a name="b1" doxytag="Gewi::GContainer::ReleaseChild"></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::GContainer::ReleaseChild </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top"><a class="el" href="classGewi_1_1GWidget.html">GWidget</a> *&nbsp;</td>
<td class="mdname1" valign="top" nowrap> <em>widget</em> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap><code> [protected]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Releases the widget which is a child of this container, private because <a class="el" href="classGewi_1_1GWidget.html">GWidget</a> is a friend. <dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign=top><em>widget</em>&nbsp;</td><td>Widget to release from this container. </td></tr>
</table>
</dl>
</td>
</tr>
</table>
<a name="b2" doxytag="Gewi::GContainer::InsertWidget"></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::GContainer::InsertWidget </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top"><a class="el" href="classGewi_1_1WidgetNode.html">WidgetNode</a> *&nbsp;</td>
<td class="mdname1" valign="top" nowrap> <em>node</em> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap><code> [protected]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Calls needed function of <a class="el" href="classGewi_1_1WidgetList.html">WidgetList</a> class to put widget into the linked list. <dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign=top><em>node</em>&nbsp;</td><td><a class="el" href="classGewi_1_1WidgetNode.html">WidgetNode</a> to insert into rChildList. </td></tr>
</table>
</dl>
</td>
</tr>
</table>
<a name="a2" doxytag="Gewi::GContainer::Move"></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::GContainer::Move </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">float&nbsp;</td>
<td class="mdname" nowrap> <em>x</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>float&nbsp;</td>
<td class="mdname" nowrap> <em>y</em></td>
</tr>
<tr>
<td></td>
<td class="md">)&nbsp;</td>
<td class="md" colspan="2"><code> [virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Same as <a class="el" href="classGewi_1_1GWidget.html#a5">GWidget::Move</a> but overloaded to move children. <dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign=top><em>x</em>&nbsp;</td><td>New x position for container. </td></tr>
<tr><td valign=top><em>y</em>&nbsp;</td><td>New y position for container. </td></tr>
</table>
</dl>
<p>
Reimplemented from <a class="el" href="classGewi_1_1GWidget.html#a5">Gewi::GWidget</a>. </td>
</tr>
</table>
<a name="a3" doxytag="Gewi::GContainer::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::GContainer::Message </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">SDL_Event *&nbsp;</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>&nbsp;</td>
<td class="mdname" nowrap> <em>event</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>Uint16&nbsp;</td>
<td class="mdname" nowrap> <em>mouseX</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>Uint16&nbsp;</td>
<td class="mdname" nowrap> <em>mouseY</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>char&nbsp;</td>
<td class="mdname" nowrap> <em>ch</em></td>
</tr>
<tr>
<td></td>
<td class="md">)&nbsp;</td>
<td class="md" colspan="2"><code> [virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Recieves and processes a message, required overload for all widgets, overloaded to also account for children. <dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign=top><em>rawEvent</em>&nbsp;</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>&nbsp;</td><td>GewiEvent enum, description of event recieved. </td></tr>
<tr><td valign=top><em>mouseX</em>&nbsp;</td><td>Mouse x position in event, if not mouse event may be incorrect. </td></tr>
<tr><td valign=top><em>mouseY</em>&nbsp;</td><td>Mouse y position in event, if not mouse event may be incorrect. </td></tr>
<tr><td valign=top><em>ch</em>&nbsp;</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>.
<p>
Reimplemented in <a class="el" href="classGewi_1_1GWindow.html#a2">Gewi::GWindow</a>. </td>
</tr>
</table>
<a name="a4" doxytag="Gewi::GContainer::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::GContainer::Show </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap><code> [virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Draws all children in appropriate back-to-front order.
<p>
Implements <a class="el" href="classGewi_1_1GWidget.html#a7">Gewi::GWidget</a>.
<p>
Reimplemented in <a class="el" href="classGewi_1_1GWindow.html#a3">Gewi::GWindow</a>. </td>
</tr>
</table>
<hr><h2>Member Data Documentation</h2>
<a name="o0" doxytag="Gewi::GContainer::GWidget"></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"> friend Gewi::GContainer::GWidget<code> [private]</code>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
The usage of friend here is used simply to allow <a class="el" href="classGewi_1_1GWidget.html">GWidget</a> proper access to what used to belong to it before the class split <a class="el" href="classGewi_1_1GWidget.html">GWidget</a> needs access to Add/ReleaseChild but to make them public would <b>reduce</b> encapsulation. (For those keeping score, this is to many people the only effective use of friend.) </td>
</tr>
</table>
<hr>The documentation for this class was generated from the following files:<ul>
<li>/include/<a class="el" href="GewiContainer_8h-source.html">GewiContainer.h</a><li>/src/<a class="el" href="GewiContainer_8cpp.html">GewiContainer.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>