<!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>Irrlicht Engine: IGUIElement.h Source File</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> <table class="irrlicht" > <tr valign="middle"> <td><font size="2"><a class="qindex" href="index.html"><font color="#FFFFFF">Home</font></a> | <a class="qindex" href="namespaces.html"><font color="#FFFFFF">Namespaces</font></a> | <a class="qindex" href="hierarchy.html"><font color="#FFFFFF">Hierarchy</font></a> | <a class="qindex" href="classes.html"><font color="#FFFFFF">Alphabetical List</font></a> | <a class="qindex" href="annotated.html"><font color="#FFFFFF"> Class list</font></a> | <a class="qindex" href="files.html"><font color="#FFFFFF">Files</font></a> | <a class="qindex" href="namespacemembers.html"><font color="#FFFFFF"> Namespace Members</font></a> | <a class="qindex" href="functions.html"><font color="#FFFFFF">Class members</font></a> | <a class="qindex" href="globals.html"><font color="#FFFFFF">File members</font></a> | <a class="qindex" href="pages.html"><font color="#FFFFFF">Tutorials</font></a></font> </td> </tr> </table> <!-- Generated by Doxygen 1.5.6 --> <h1>IGUIElement.h</h1><a href="_i_g_u_i_element_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// Copyright (C) 2002-2009 Nikolaus Gebhardt</span> <a name="l00002"></a>00002 <span class="comment">// This file is part of the "Irrlicht Engine".</span> <a name="l00003"></a>00003 <span class="comment">// For conditions of distribution and use, see copyright notice in irrlicht.h</span> <a name="l00004"></a>00004 <a name="l00005"></a>00005 <span class="preprocessor">#ifndef __I_GUI_ELEMENT_H_INCLUDED__</span> <a name="l00006"></a>00006 <span class="preprocessor"></span><span class="preprocessor">#define __I_GUI_ELEMENT_H_INCLUDED__</span> <a name="l00007"></a>00007 <span class="preprocessor"></span> <a name="l00008"></a>00008 <span class="preprocessor">#include "<a class="code" href="_i_attribute_exchanging_object_8h.html">IAttributeExchangingObject.h</a>"</span> <a name="l00009"></a>00009 <span class="preprocessor">#include "<a class="code" href="irr_list_8h.html">irrList.h</a>"</span> <a name="l00010"></a>00010 <span class="preprocessor">#include "<a class="code" href="rect_8h.html">rect.h</a>"</span> <a name="l00011"></a>00011 <span class="preprocessor">#include "<a class="code" href="irr_string_8h.html">irrString.h</a>"</span> <a name="l00012"></a>00012 <span class="preprocessor">#include "<a class="code" href="_i_event_receiver_8h.html">IEventReceiver.h</a>"</span> <a name="l00013"></a>00013 <span class="preprocessor">#include "<a class="code" href="_e_g_u_i_element_types_8h.html">EGUIElementTypes.h</a>"</span> <a name="l00014"></a>00014 <span class="preprocessor">#include "<a class="code" href="_e_g_u_i_alignment_8h.html">EGUIAlignment.h</a>"</span> <a name="l00015"></a>00015 <span class="preprocessor">#include "<a class="code" href="_i_attributes_8h.html">IAttributes.h</a>"</span> <a name="l00016"></a>00016 <a name="l00017"></a>00017 <span class="keyword">namespace </span>irr <a name="l00018"></a>00018 { <a name="l00019"></a>00019 <span class="keyword">namespace </span>gui <a name="l00020"></a>00020 { <a name="l00021"></a>00021 <a name="l00022"></a>00022 <span class="keyword">class </span>IGUIEnvironment; <a name="l00023"></a>00023 <a name="l00025"></a><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html">00025</a> <span class="keyword">class </span><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html" title="Base class of all GUI elements.">IGUIElement</a> : <span class="keyword">public</span> <span class="keyword">virtual</span> io::IAttributeExchangingObject, <span class="keyword">public</span> <a class="code" href="classirr_1_1_i_event_receiver.html" title="Interface of an object which can receive events.">IEventReceiver</a> <a name="l00026"></a>00026 { <a name="l00027"></a>00027 <span class="keyword">public</span>: <a name="l00028"></a>00028 <a name="l00030"></a><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#2d4a806fdde2573f917c1190d83dce3c">00030</a> <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#2d4a806fdde2573f917c1190d83dce3c" title="Constructor.">IGUIElement</a>(<a class="code" href="namespaceirr_1_1gui.html#e4d66df0ecf4117cdbcf9f22404bd254" title="List of all basic Irrlicht GUI elements.">EGUI_ELEMENT_TYPE</a> type, <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_environment.html" title="GUI Environment. Used as factory and manager of all other GUI elements.">IGUIEnvironment</a>* environment, <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html" title="Base class of all GUI elements.">IGUIElement</a>* parent, <a name="l00031"></a>00031 <a class="code" href="namespaceirr.html#c66849b7a6ed16e30ebede579f9b47c6" title="32 bit signed variable.">s32</a> <span class="keywordtype">id</span>, <a class="code" href="classirr_1_1core_1_1rect.html" title="Rectangle template.">core::rect<s32></a> rectangle) <a name="l00032"></a>00032 : <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#d769c75857869ecdfe0b021699d934ef" title="Pointer to the parent.">Parent</a>(0), <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#f093935f3d5f6c3efedddc8bcdf7fc82" title="relative rect of element">RelativeRect</a>(rectangle), <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#05ba78d5e6f11c5a64d9da2fcfd4ded1" title="absolute rect of element">AbsoluteRect</a>(rectangle), <a name="l00033"></a>00033 <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#1000af90afbbe92344fb000f5af5c8fb" title="absolute clipping rect of element">AbsoluteClippingRect</a>(rectangle), <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#d85b5d446a0dfb2fa46ee3753e664cd2">DesiredRect</a>(rectangle), <a name="l00034"></a>00034 <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#1649a1c740c333bfb026397411c4da95" title="maximum and minimum size of the element">MaxSize</a>(0,0), <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#a604d54c9ebcae3b1bf053411a5cf60f">MinSize</a>(1,1), <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#d8dd8fdfb5be3e4cca1f1603cbcfaccf" title="is visible?">IsVisible</a>(true), <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#ba90d3c36184d3b6d62a8856a8734590" title="is enabled?">IsEnabled</a>(true), <a name="l00035"></a>00035 <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#19f65c7004c5b36c848dad776aabc151" title="is a part of a larger whole and should not be serialized?">IsSubElement</a>(false), <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#8f9ad427fe094e0e8c49cf205c606526" title="does this element ignore its parent&#39;s clipping rectangle?">NoClip</a>(false), <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#73a25c6d25bd673d92210fc2d60d916e" title="id">ID</a>(id), <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#f98dfbfc8776221b3a70ceea43fc4f9a" title="tab stop like in windows">IsTabStop</a>(false), <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#90fcd9d502bb0f6e8e5f2d091f54bafb" title="tab order">TabOrder</a>(-1), <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#8ea1b4a60653c8cc157e806e14ae0558" title="tab groups are containers like windows, use ctrl+tab to navigate">IsTabGroup</a>(false), <a name="l00036"></a>00036 <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#09873f314caf3144ebf470ccaa22762a" title="tells the element how to act when its parent is resized">AlignLeft</a>(<a class="code" href="namespaceirr_1_1gui.html#19eb5fb40e67f108cb16aba922ddaa2d4bb8a01452727274e18047a872da1809" title="Aligned to parent&#39;s top or left side (default).">EGUIA_UPPERLEFT</a>), <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#c0c5d7f233ebd05d535e9e9cf25f03fe">AlignRight</a>(<a class="code" href="namespaceirr_1_1gui.html#19eb5fb40e67f108cb16aba922ddaa2d4bb8a01452727274e18047a872da1809" title="Aligned to parent&#39;s top or left side (default).">EGUIA_UPPERLEFT</a>), <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#bf9113bebfcde09e7f4a82269d6e2da1">AlignTop</a>(<a class="code" href="namespaceirr_1_1gui.html#19eb5fb40e67f108cb16aba922ddaa2d4bb8a01452727274e18047a872da1809" title="Aligned to parent&#39;s top or left side (default).">EGUIA_UPPERLEFT</a>), <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#4204f1300a03ea597a48c5b4cfe134c0">AlignBottom</a>(<a class="code" href="namespaceirr_1_1gui.html#19eb5fb40e67f108cb16aba922ddaa2d4bb8a01452727274e18047a872da1809" title="Aligned to parent&#39;s top or left side (default).">EGUIA_UPPERLEFT</a>), <a name="l00037"></a>00037 <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#7ce2d55a64302d3df67a808a362f18bf" title="GUI Environment.">Environment</a>(environment), <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#d362880afa8ccb537b04032340e989e9" title="type of element">Type</a>(type) <a name="l00038"></a>00038 { <a name="l00039"></a>00039 <span class="preprocessor"> #ifdef _DEBUG</span> <a name="l00040"></a>00040 <span class="preprocessor"></span> <a class="code" href="classirr_1_1_i_reference_counted.html#704c5042d399fe8cd3bdd65a0559002a" title="Sets the debug name of the object.">setDebugName</a>(<span class="stringliteral">"IGUIElement"</span>); <a name="l00041"></a>00041 <span class="preprocessor"> #endif</span> <a name="l00042"></a>00042 <span class="preprocessor"></span> <a name="l00043"></a>00043 <span class="comment">// if we were given a parent to attach to</span> <a name="l00044"></a>00044 <span class="keywordflow">if</span> (parent) <a name="l00045"></a>00045 parent-><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#221c8505217aa9c23c621627a0435554" title="Adds a GUI element as new child of this element.">addChild</a>(<span class="keyword">this</span>); <a name="l00046"></a>00046 <a name="l00047"></a>00047 } <a name="l00048"></a>00048 <a name="l00049"></a>00049 <a name="l00051"></a><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#062e6704aa29ed50c22179ad268d8f48">00051</a> <span class="keyword">virtual</span> <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#062e6704aa29ed50c22179ad268d8f48" title="Destructor.">~IGUIElement</a>() <a name="l00052"></a>00052 { <a name="l00053"></a>00053 <span class="comment">// delete all children</span> <a name="l00054"></a>00054 <a class="code" href="classirr_1_1core_1_1list.html" title="Doubly linked list template.">core::list<IGUIElement*>::Iterator</a> it = <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#90a100897814da93cbbf45f12bbf0198" title="List of all children of this element.">Children</a>.begin(); <a name="l00055"></a>00055 <span class="keywordflow">for</span> (; it != <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#90a100897814da93cbbf45f12bbf0198" title="List of all children of this element.">Children</a>.end(); ++it) <a name="l00056"></a>00056 { <a name="l00057"></a>00057 (*it)->Parent = 0; <a name="l00058"></a>00058 (*it)->drop(); <a name="l00059"></a>00059 } <a name="l00060"></a>00060 } <a name="l00061"></a>00061 <a name="l00062"></a>00062 <a name="l00064"></a><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#417ad834c99198484b3b4b787dcfba74">00064</a> <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html" title="Base class of all GUI elements.">IGUIElement</a>* <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#417ad834c99198484b3b4b787dcfba74" title="Returns parent of this element.">getParent</a>()<span class="keyword"> const</span> <a name="l00065"></a>00065 <span class="keyword"> </span>{ <a name="l00066"></a>00066 <span class="keywordflow">return</span> <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#d769c75857869ecdfe0b021699d934ef" title="Pointer to the parent.">Parent</a>; <a name="l00067"></a>00067 } <a name="l00068"></a>00068 <a name="l00069"></a>00069 <a name="l00071"></a><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#14131d6d0c9533d97ddc62b02af87bd7">00071</a> <a class="code" href="classirr_1_1core_1_1rect.html" title="Rectangle template.">core::rect<s32></a> <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#14131d6d0c9533d97ddc62b02af87bd7" title="Returns the relative rectangle of this element.">getRelativePosition</a>()<span class="keyword"> const</span> <a name="l00072"></a>00072 <span class="keyword"> </span>{ <a name="l00073"></a>00073 <span class="keywordflow">return</span> <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#f093935f3d5f6c3efedddc8bcdf7fc82" title="relative rect of element">RelativeRect</a>; <a name="l00074"></a>00074 } <a name="l00075"></a>00075 <a name="l00076"></a>00076 <a name="l00078"></a>00078 <a name="l00079"></a><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#0e5bb2d0a2e88e30d3697652f8dd7034">00079</a> <span class="keywordtype">void</span> <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#0e5bb2d0a2e88e30d3697652f8dd7034" title="Sets the relative rectangle of this element.">setRelativePosition</a>(<span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1rect.html" title="Rectangle template.">core::rect<s32></a>& r) <a name="l00080"></a>00080 { <a name="l00081"></a>00081 <span class="keywordflow">if</span> (<a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#d769c75857869ecdfe0b021699d934ef" title="Pointer to the parent.">Parent</a>) <a name="l00082"></a>00082 { <a name="l00083"></a>00083 <span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1rect.html" title="Rectangle template.">core::rect<s32></a>& r2 = <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#d769c75857869ecdfe0b021699d934ef" title="Pointer to the parent.">Parent</a>-><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#f897fcfbff5642c908c3c45c39bc90f1" title="Gets the absolute rectangle of this element.">getAbsolutePosition</a>(); <a name="l00084"></a>00084 <a name="l00085"></a>00085 <a class="code" href="classirr_1_1core_1_1dimension2d.html" title="Specifies a 2 dimensional size.">core::dimension2df</a> d((<a class="code" href="namespaceirr.html#0277be98d67dc26ff93b1a6a1d086b07" title="32 bit floating point variable.">f32</a>)(r2.<a class="code" href="classirr_1_1core_1_1rect.html#dffacbb0f07d8268a32af2a32b3ac3ac" title="Get the dimensions of the rectangle.">getSize</a>().Width), (<a class="code" href="namespaceirr.html#0277be98d67dc26ff93b1a6a1d086b07" title="32 bit floating point variable.">f32</a>)(r2.<a class="code" href="classirr_1_1core_1_1rect.html#dffacbb0f07d8268a32af2a32b3ac3ac" title="Get the dimensions of the rectangle.">getSize</a>().Height)); <a name="l00086"></a>00086 <a name="l00087"></a>00087 <span class="keywordflow">if</span> (<a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#09873f314caf3144ebf470ccaa22762a" title="tells the element how to act when its parent is resized">AlignLeft</a> == <a class="code" href="namespaceirr_1_1gui.html#19eb5fb40e67f108cb16aba922ddaa2d0fef10c3356089b2c18ba4e6b3f91246" title="Stretched to fit parent.">EGUIA_SCALE</a>) <a name="l00088"></a>00088 <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#f8fc66b7504e9a073b02fc69a63f0b49" title="relative scale of the element inside its parent">ScaleRect</a>.UpperLeftCorner.X = (<a class="code" href="namespaceirr.html#0277be98d67dc26ff93b1a6a1d086b07" title="32 bit floating point variable.">f32</a>)r.<a class="code" href="classirr_1_1core_1_1rect.html#bd47b3a4967b2153e58984d964af6573" title="Upper left corner.">UpperLeftCorner</a>.X / d.<a class="code" href="classirr_1_1core_1_1dimension2d.html#0399dcc023c19d381d1a192596107db4" title="Width of the dimension.">Width</a>; <a name="l00089"></a>00089 if (<a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#c0c5d7f233ebd05d535e9e9cf25f03fe">AlignRight</a> == <a class="code" href="namespaceirr_1_1gui.html#19eb5fb40e67f108cb16aba922ddaa2d0fef10c3356089b2c18ba4e6b3f91246" title="Stretched to fit parent.">EGUIA_SCALE</a>) <a name="l00090"></a>00090 <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#f8fc66b7504e9a073b02fc69a63f0b49" title="relative scale of the element inside its parent">ScaleRect</a>.LowerRightCorner.X = (<a class="code" href="namespaceirr.html#0277be98d67dc26ff93b1a6a1d086b07" title="32 bit floating point variable.">f32</a>)r.<a class="code" href="classirr_1_1core_1_1rect.html#a7c7e38bbff5f32992f69b36fc8cec1e" title="Lower right corner.">LowerRightCorner</a>.X / d.<a class="code" href="classirr_1_1core_1_1dimension2d.html#0399dcc023c19d381d1a192596107db4" title="Width of the dimension.">Width</a>; <a name="l00091"></a>00091 if (<a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#bf9113bebfcde09e7f4a82269d6e2da1">AlignTop</a> == <a class="code" href="namespaceirr_1_1gui.html#19eb5fb40e67f108cb16aba922ddaa2d0fef10c3356089b2c18ba4e6b3f91246" title="Stretched to fit parent.">EGUIA_SCALE</a>) <a name="l00092"></a>00092 <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#f8fc66b7504e9a073b02fc69a63f0b49" title="relative scale of the element inside its parent">ScaleRect</a>.UpperLeftCorner.Y = (<a class="code" href="namespaceirr.html#0277be98d67dc26ff93b1a6a1d086b07" title="32 bit floating point variable.">f32</a>)r.<a class="code" href="classirr_1_1core_1_1rect.html#bd47b3a4967b2153e58984d964af6573" title="Upper left corner.">UpperLeftCorner</a>.Y / d.<a class="code" href="classirr_1_1core_1_1dimension2d.html#89b253523d31336c6b2a6a56dfd48a6b" title="Height of the dimension.">Height</a>; <a name="l00093"></a>00093 if (<a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#4204f1300a03ea597a48c5b4cfe134c0">AlignBottom</a> == <a class="code" href="namespaceirr_1_1gui.html#19eb5fb40e67f108cb16aba922ddaa2d0fef10c3356089b2c18ba4e6b3f91246" title="Stretched to fit parent.">EGUIA_SCALE</a>) <a name="l00094"></a>00094 <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#f8fc66b7504e9a073b02fc69a63f0b49" title="relative scale of the element inside its parent">ScaleRect</a>.LowerRightCorner.Y = (<a class="code" href="namespaceirr.html#0277be98d67dc26ff93b1a6a1d086b07" title="32 bit floating point variable.">f32</a>)r.<a class="code" href="classirr_1_1core_1_1rect.html#a7c7e38bbff5f32992f69b36fc8cec1e" title="Lower right corner.">LowerRightCorner</a>.Y / d.<a class="code" href="classirr_1_1core_1_1dimension2d.html#89b253523d31336c6b2a6a56dfd48a6b" title="Height of the dimension.">Height</a>; <a name="l00095"></a>00095 } <a name="l00096"></a>00096 <a name="l00097"></a>00097 <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#d85b5d446a0dfb2fa46ee3753e664cd2">DesiredRect</a> = r; <a name="l00098"></a>00098 <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#d58bbeba69a118873a5075d86b4c90f2" title="Updates the absolute position.">updateAbsolutePosition</a>(); <a name="l00099"></a>00099 } <a name="l00100"></a>00100 <a name="l00102"></a>00102 <a name="l00103"></a><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#ba1cfc75daa28e53a021faa2d954b79b">00103</a> <span class="keywordtype">void</span> <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#0e5bb2d0a2e88e30d3697652f8dd7034" title="Sets the relative rectangle of this element.">setRelativePosition</a>(<span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1vector2d.html" title="2d vector template class with lots of operators and methods.">core::position2di</a> & position) <a name="l00104"></a>00104 { <a name="l00105"></a>00105 <span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1dimension2d.html" title="Specifies a 2 dimensional size.">core::dimension2di</a> mySize = <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#f093935f3d5f6c3efedddc8bcdf7fc82" title="relative rect of element">RelativeRect</a>.getSize(); <a name="l00106"></a>00106 <span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1rect.html" title="Rectangle template.">core::rect<s32></a> rectangle(position.<a class="code" href="classirr_1_1core_1_1vector2d.html#8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a>, position.<a class="code" href="classirr_1_1core_1_1vector2d.html#a4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a>, <a name="l00107"></a>00107 position.<a class="code" href="classirr_1_1core_1_1vector2d.html#8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a> + mySize.<a class="code" href="classirr_1_1core_1_1dimension2d.html#0399dcc023c19d381d1a192596107db4" title="Width of the dimension.">Width</a>, position.<a class="code" href="classirr_1_1core_1_1vector2d.html#a4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a> + mySize.<a class="code" href="classirr_1_1core_1_1dimension2d.html#89b253523d31336c6b2a6a56dfd48a6b" title="Height of the dimension.">Height</a>); <a name="l00108"></a>00108 <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#0e5bb2d0a2e88e30d3697652f8dd7034" title="Sets the relative rectangle of this element.">setRelativePosition</a>(rectangle); <a name="l00109"></a>00109 } <a name="l00110"></a>00110 <a name="l00111"></a>00111 <a name="l00113"></a>00113 <a name="l00117"></a><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#a67e02ab54db1068e7c057721d2f24a5">00117</a> <span class="keywordtype">void</span> <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#a67e02ab54db1068e7c057721d2f24a5" title="Sets the relative rectangle of this element as a proportion of its parent&#39;s area...">setRelativePositionProportional</a>(<span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1rect.html" title="Rectangle template.">core::rect<f32></a>& r) <a name="l00118"></a>00118 { <a name="l00119"></a>00119 <span class="keywordflow">if</span> (!<a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#d769c75857869ecdfe0b021699d934ef" title="Pointer to the parent.">Parent</a>) <a name="l00120"></a>00120 <span class="keywordflow">return</span>; <a name="l00121"></a>00121 <a name="l00122"></a>00122 <span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1dimension2d.html" title="Specifies a 2 dimensional size.">core::dimension2di</a>& d = <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#d769c75857869ecdfe0b021699d934ef" title="Pointer to the parent.">Parent</a>-><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#f897fcfbff5642c908c3c45c39bc90f1" title="Gets the absolute rectangle of this element.">getAbsolutePosition</a>().getSize(); <a name="l00123"></a>00123 <a name="l00124"></a>00124 <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#d85b5d446a0dfb2fa46ee3753e664cd2">DesiredRect</a> = <a class="code" href="classirr_1_1core_1_1rect.html" title="Rectangle template.">core::rect<s32></a>( <a name="l00125"></a>00125 <a class="code" href="namespaceirr_1_1core.html#c230a392b15e3d27c6e2a07a6925a8c4">core::floor32</a>((<a class="code" href="namespaceirr.html#0277be98d67dc26ff93b1a6a1d086b07" title="32 bit floating point variable.">f32</a>)d.<a class="code" href="classirr_1_1core_1_1dimension2d.html#0399dcc023c19d381d1a192596107db4" title="Width of the dimension.">Width</a> * r.<a class="code" href="classirr_1_1core_1_1rect.html#bd47b3a4967b2153e58984d964af6573" title="Upper left corner.">UpperLeftCorner</a>.X), <a name="l00126"></a>00126 <a class="code" href="namespaceirr_1_1core.html#c230a392b15e3d27c6e2a07a6925a8c4">core::floor32</a>((<a class="code" href="namespaceirr.html#0277be98d67dc26ff93b1a6a1d086b07" title="32 bit floating point variable.">f32</a>)d.<a class="code" href="classirr_1_1core_1_1dimension2d.html#89b253523d31336c6b2a6a56dfd48a6b" title="Height of the dimension.">Height</a> * r.<a class="code" href="classirr_1_1core_1_1rect.html#bd47b3a4967b2153e58984d964af6573" title="Upper left corner.">UpperLeftCorner</a>.Y), <a name="l00127"></a>00127 <a class="code" href="namespaceirr_1_1core.html#c230a392b15e3d27c6e2a07a6925a8c4">core::floor32</a>((<a class="code" href="namespaceirr.html#0277be98d67dc26ff93b1a6a1d086b07" title="32 bit floating point variable.">f32</a>)d.<a class="code" href="classirr_1_1core_1_1dimension2d.html#0399dcc023c19d381d1a192596107db4" title="Width of the dimension.">Width</a> * r.<a class="code" href="classirr_1_1core_1_1rect.html#a7c7e38bbff5f32992f69b36fc8cec1e" title="Lower right corner.">LowerRightCorner</a>.X), <a name="l00128"></a>00128 <a class="code" href="namespaceirr_1_1core.html#c230a392b15e3d27c6e2a07a6925a8c4">core::floor32</a>((<a class="code" href="namespaceirr.html#0277be98d67dc26ff93b1a6a1d086b07" title="32 bit floating point variable.">f32</a>)d.<a class="code" href="classirr_1_1core_1_1dimension2d.html#89b253523d31336c6b2a6a56dfd48a6b" title="Height of the dimension.">Height</a> * r.<a class="code" href="classirr_1_1core_1_1rect.html#a7c7e38bbff5f32992f69b36fc8cec1e" title="Lower right corner.">LowerRightCorner</a>.Y)); <a name="l00129"></a>00129 <a name="l00130"></a>00130 <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#f8fc66b7504e9a073b02fc69a63f0b49" title="relative scale of the element inside its parent">ScaleRect</a> = r; <a name="l00131"></a>00131 <a name="l00132"></a>00132 <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#d58bbeba69a118873a5075d86b4c90f2" title="Updates the absolute position.">updateAbsolutePosition</a>(); <a name="l00133"></a>00133 } <a name="l00134"></a>00134 <a name="l00135"></a>00135 <a name="l00137"></a><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#f897fcfbff5642c908c3c45c39bc90f1">00137</a> <a class="code" href="classirr_1_1core_1_1rect.html" title="Rectangle template.">core::rect<s32></a> <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#f897fcfbff5642c908c3c45c39bc90f1" title="Gets the absolute rectangle of this element.">getAbsolutePosition</a>()<span class="keyword"> const</span> <a name="l00138"></a>00138 <span class="keyword"> </span>{ <a name="l00139"></a>00139 <span class="keywordflow">return</span> <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#05ba78d5e6f11c5a64d9da2fcfd4ded1" title="absolute rect of element">AbsoluteRect</a>; <a name="l00140"></a>00140 } <a name="l00141"></a>00141 <a name="l00142"></a>00142 <a name="l00144"></a><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#0eef9e34371c47e4c334a450af6df5dd">00144</a> <a class="code" href="classirr_1_1core_1_1rect.html" title="Rectangle template.">core::rect<s32></a> <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#0eef9e34371c47e4c334a450af6df5dd" title="Returns the visible area of the element.">getAbsoluteClippingRect</a>()<span class="keyword"> const</span> <a name="l00145"></a>00145 <span class="keyword"> </span>{ <a name="l00146"></a>00146 <span class="keywordflow">return</span> <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#1000af90afbbe92344fb000f5af5c8fb" title="absolute clipping rect of element">AbsoluteClippingRect</a>; <a name="l00147"></a>00147 } <a name="l00148"></a>00148 <a name="l00149"></a>00149 <a name="l00151"></a>00151 <a name="l00152"></a><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#814d322989acafa74c895e5c13908b86">00152</a> <span class="keywordtype">void</span> <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#814d322989acafa74c895e5c13908b86" title="Sets whether the element will ignore its parent&#39;s clipping rectangle.">setNotClipped</a>(<span class="keywordtype">bool</span> noClip) <a name="l00153"></a>00153 { <a name="l00154"></a>00154 <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#8f9ad427fe094e0e8c49cf205c606526" title="does this element ignore its parent&#39;s clipping rectangle?">NoClip</a> = noClip; <a name="l00155"></a>00155 <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#d58bbeba69a118873a5075d86b4c90f2" title="Updates the absolute position.">updateAbsolutePosition</a>(); <a name="l00156"></a>00156 } <a name="l00157"></a>00157 <a name="l00158"></a>00158 <a name="l00160"></a>00160 <a name="l00161"></a><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#6b9d38b138420b72f34fd97051f689ee">00161</a> <span class="keywordtype">bool</span> <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#6b9d38b138420b72f34fd97051f689ee" title="Gets whether the element will ignore its parent&#39;s clipping rectangle.">isNotClipped</a>()<span class="keyword"> const</span> <a name="l00162"></a>00162 <span class="keyword"> </span>{ <a name="l00163"></a>00163 <span class="keywordflow">return</span> <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#8f9ad427fe094e0e8c49cf205c606526" title="does this element ignore its parent&#39;s clipping rectangle?">NoClip</a>; <a name="l00164"></a>00164 } <a name="l00165"></a>00165 <a name="l00166"></a>00166 <a name="l00168"></a>00168 <a name="l00169"></a><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#e80ad7253fb9fb2ebbeda2a8148fff3e">00169</a> <span class="keywordtype">void</span> <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#e80ad7253fb9fb2ebbeda2a8148fff3e" title="Sets the maximum size allowed for this element.">setMaxSize</a>(<a class="code" href="classirr_1_1core_1_1dimension2d.html" title="Specifies a 2 dimensional size.">core::dimension2du</a> size) <a name="l00170"></a>00170 { <a name="l00171"></a>00171 <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#1649a1c740c333bfb026397411c4da95" title="maximum and minimum size of the element">MaxSize</a> = size; <a name="l00172"></a>00172 <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#d58bbeba69a118873a5075d86b4c90f2" title="Updates the absolute position.">updateAbsolutePosition</a>(); <a name="l00173"></a>00173 } <a name="l00174"></a>00174 <a name="l00175"></a>00175 <a name="l00177"></a><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#e1ddcdd58af93fea900bd6295d4d8e61">00177</a> <span class="keywordtype">void</span> <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#e1ddcdd58af93fea900bd6295d4d8e61" title="Sets the minimum size allowed for this element.">setMinSize</a>(<a class="code" href="classirr_1_1core_1_1dimension2d.html" title="Specifies a 2 dimensional size.">core::dimension2du</a> size) <a name="l00178"></a>00178 { <a name="l00179"></a>00179 <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#a604d54c9ebcae3b1bf053411a5cf60f">MinSize</a> = size; <a name="l00180"></a>00180 <span class="keywordflow">if</span> (<a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#a604d54c9ebcae3b1bf053411a5cf60f">MinSize</a>.<a class="code" href="classirr_1_1core_1_1dimension2d.html#0399dcc023c19d381d1a192596107db4" title="Width of the dimension.">Width</a> < 1) <a name="l00181"></a>00181 <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#a604d54c9ebcae3b1bf053411a5cf60f">MinSize</a>.<a class="code" href="classirr_1_1core_1_1dimension2d.html#0399dcc023c19d381d1a192596107db4" title="Width of the dimension.">Width</a> = 1; <a name="l00182"></a>00182 <span class="keywordflow">if</span> (<a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#a604d54c9ebcae3b1bf053411a5cf60f">MinSize</a>.<a class="code" href="classirr_1_1core_1_1dimension2d.html#89b253523d31336c6b2a6a56dfd48a6b" title="Height of the dimension.">Height</a> < 1) <a name="l00183"></a>00183 <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#a604d54c9ebcae3b1bf053411a5cf60f">MinSize</a>.<a class="code" href="classirr_1_1core_1_1dimension2d.html#89b253523d31336c6b2a6a56dfd48a6b" title="Height of the dimension.">Height</a> = 1; <a name="l00184"></a>00184 <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#d58bbeba69a118873a5075d86b4c90f2" title="Updates the absolute position.">updateAbsolutePosition</a>(); <a name="l00185"></a>00185 } <a name="l00186"></a>00186 <a name="l00187"></a>00187 <a name="l00188"></a><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#1eb3d7ec13ebbf8c73859810088f666b">00188</a> <span class="keywordtype">void</span> <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#1eb3d7ec13ebbf8c73859810088f666b">setAlignment</a>(<a class="code" href="namespaceirr_1_1gui.html#19eb5fb40e67f108cb16aba922ddaa2d">EGUI_ALIGNMENT</a> left, <a class="code" href="namespaceirr_1_1gui.html#19eb5fb40e67f108cb16aba922ddaa2d">EGUI_ALIGNMENT</a> right, <a class="code" href="namespaceirr_1_1gui.html#19eb5fb40e67f108cb16aba922ddaa2d">EGUI_ALIGNMENT</a> top, <a class="code" href="namespaceirr_1_1gui.html#19eb5fb40e67f108cb16aba922ddaa2d">EGUI_ALIGNMENT</a> bottom) <a name="l00189"></a>00189 { <a name="l00190"></a>00190 <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#09873f314caf3144ebf470ccaa22762a" title="tells the element how to act when its parent is resized">AlignLeft</a> = left; <a name="l00191"></a>00191 <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#c0c5d7f233ebd05d535e9e9cf25f03fe">AlignRight</a> = right; <a name="l00192"></a>00192 <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#bf9113bebfcde09e7f4a82269d6e2da1">AlignTop</a> = top; <a name="l00193"></a>00193 <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#4204f1300a03ea597a48c5b4cfe134c0">AlignBottom</a> = bottom; <a name="l00194"></a>00194 <a name="l00195"></a>00195 <span class="keywordflow">if</span> (<a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#d769c75857869ecdfe0b021699d934ef" title="Pointer to the parent.">Parent</a>) <a name="l00196"></a>00196 { <a name="l00197"></a>00197 <a class="code" href="classirr_1_1core_1_1rect.html" title="Rectangle template.">core::rect<s32></a> r(<a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#d769c75857869ecdfe0b021699d934ef" title="Pointer to the parent.">Parent</a>-><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#f897fcfbff5642c908c3c45c39bc90f1" title="Gets the absolute rectangle of this element.">getAbsolutePosition</a>()); <a name="l00198"></a>00198 <a name="l00199"></a>00199 <a class="code" href="classirr_1_1core_1_1dimension2d.html" title="Specifies a 2 dimensional size.">core::dimension2df</a> d((<a class="code" href="namespaceirr.html#0277be98d67dc26ff93b1a6a1d086b07" title="32 bit floating point variable.">f32</a>)r.getSize().Width, (<a class="code" href="namespaceirr.html#0277be98d67dc26ff93b1a6a1d086b07" title="32 bit floating point variable.">f32</a>)r.getSize().Height); <a name="l00200"></a>00200 <a name="l00201"></a>00201 <span class="keywordflow">if</span> (<a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#09873f314caf3144ebf470ccaa22762a" title="tells the element how to act when its parent is resized">AlignLeft</a> == <a class="code" href="namespaceirr_1_1gui.html#19eb5fb40e67f108cb16aba922ddaa2d0fef10c3356089b2c18ba4e6b3f91246" title="Stretched to fit parent.">EGUIA_SCALE</a>) <a name="l00202"></a>00202 <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#f8fc66b7504e9a073b02fc69a63f0b49" title="relative scale of the element inside its parent">ScaleRect</a>.UpperLeftCorner.X = (<a class="code" href="namespaceirr.html#0277be98d67dc26ff93b1a6a1d086b07" title="32 bit floating point variable.">f32</a>)<a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#d85b5d446a0dfb2fa46ee3753e664cd2">DesiredRect</a>.UpperLeftCorner.X / d.Width; <a name="l00203"></a>00203 if (<a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#c0c5d7f233ebd05d535e9e9cf25f03fe">AlignRight</a> == <a class="code" href="namespaceirr_1_1gui.html#19eb5fb40e67f108cb16aba922ddaa2d0fef10c3356089b2c18ba4e6b3f91246" title="Stretched to fit parent.">EGUIA_SCALE</a>) <a name="l00204"></a>00204 <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#f8fc66b7504e9a073b02fc69a63f0b49" title="relative scale of the element inside its parent">ScaleRect</a>.LowerRightCorner.X = (<a class="code" href="namespaceirr.html#0277be98d67dc26ff93b1a6a1d086b07" title="32 bit floating point variable.">f32</a>)<a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#d85b5d446a0dfb2fa46ee3753e664cd2">DesiredRect</a>.LowerRightCorner.X / d.Width; <a name="l00205"></a>00205 if (<a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#bf9113bebfcde09e7f4a82269d6e2da1">AlignTop</a> == <a class="code" href="namespaceirr_1_1gui.html#19eb5fb40e67f108cb16aba922ddaa2d0fef10c3356089b2c18ba4e6b3f91246" title="Stretched to fit parent.">EGUIA_SCALE</a>) <a name="l00206"></a>00206 <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#f8fc66b7504e9a073b02fc69a63f0b49" title="relative scale of the element inside its parent">ScaleRect</a>.UpperLeftCorner.Y = (<a class="code" href="namespaceirr.html#0277be98d67dc26ff93b1a6a1d086b07" title="32 bit floating point variable.">f32</a>)<a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#d85b5d446a0dfb2fa46ee3753e664cd2">DesiredRect</a>.UpperLeftCorner.Y / d.Height; <a name="l00207"></a>00207 if (<a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#4204f1300a03ea597a48c5b4cfe134c0">AlignBottom</a> == <a class="code" href="namespaceirr_1_1gui.html#19eb5fb40e67f108cb16aba922ddaa2d0fef10c3356089b2c18ba4e6b3f91246" title="Stretched to fit parent.">EGUIA_SCALE</a>) <a name="l00208"></a>00208 <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#f8fc66b7504e9a073b02fc69a63f0b49" title="relative scale of the element inside its parent">ScaleRect</a>.LowerRightCorner.Y = (<a class="code" href="namespaceirr.html#0277be98d67dc26ff93b1a6a1d086b07" title="32 bit floating point variable.">f32</a>)<a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#d85b5d446a0dfb2fa46ee3753e664cd2">DesiredRect</a>.LowerRightCorner.Y / d.Height; <a name="l00209"></a>00209 } <a name="l00210"></a>00210 } <a name="l00211"></a>00211 <a name="l00212"></a>00212 <a name="l00214"></a><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#d58bbeba69a118873a5075d86b4c90f2">00214</a> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#d58bbeba69a118873a5075d86b4c90f2" title="Updates the absolute position.">updateAbsolutePosition</a>() <a name="l00215"></a>00215 { <a name="l00216"></a>00216 <a class="code" href="classirr_1_1core_1_1rect.html" title="Rectangle template.">core::rect<s32></a> parentAbsolute(0,0,0,0); <a name="l00217"></a>00217 <a class="code" href="classirr_1_1core_1_1rect.html" title="Rectangle template.">core::rect<s32></a> parentAbsoluteClip; <a name="l00218"></a>00218 <a class="code" href="namespaceirr.html#0277be98d67dc26ff93b1a6a1d086b07" title="32 bit floating point variable.">f32</a> fw=0.f, fh=0.f; <a name="l00219"></a>00219 <a name="l00220"></a>00220 <span class="keywordflow">if</span> (<a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#d769c75857869ecdfe0b021699d934ef" title="Pointer to the parent.">Parent</a>) <a name="l00221"></a>00221 { <a name="l00222"></a>00222 parentAbsolute = <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#d769c75857869ecdfe0b021699d934ef" title="Pointer to the parent.">Parent</a>-><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#05ba78d5e6f11c5a64d9da2fcfd4ded1" title="absolute rect of element">AbsoluteRect</a>; <a name="l00223"></a>00223 <a name="l00224"></a>00224 <span class="keywordflow">if</span> (<a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#8f9ad427fe094e0e8c49cf205c606526" title="does this element ignore its parent&#39;s clipping rectangle?">NoClip</a>) <a name="l00225"></a>00225 { <a name="l00226"></a>00226 <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html" title="Base class of all GUI elements.">IGUIElement</a>* p=<span class="keyword">this</span>; <a name="l00227"></a>00227 <span class="keywordflow">while</span> (p && p-><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#d769c75857869ecdfe0b021699d934ef" title="Pointer to the parent.">Parent</a>) <a name="l00228"></a>00228 p = p-><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#d769c75857869ecdfe0b021699d934ef" title="Pointer to the parent.">Parent</a>; <a name="l00229"></a>00229 parentAbsoluteClip = p-><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#1000af90afbbe92344fb000f5af5c8fb" title="absolute clipping rect of element">AbsoluteClippingRect</a>; <a name="l00230"></a>00230 } <a name="l00231"></a>00231 <span class="keywordflow">else</span> <a name="l00232"></a>00232 parentAbsoluteClip = <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#d769c75857869ecdfe0b021699d934ef" title="Pointer to the parent.">Parent</a>-><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#1000af90afbbe92344fb000f5af5c8fb" title="absolute clipping rect of element">AbsoluteClippingRect</a>; <a name="l00233"></a>00233 } <a name="l00234"></a>00234 <a name="l00235"></a>00235 <span class="keyword">const</span> <a class="code" href="namespaceirr.html#c66849b7a6ed16e30ebede579f9b47c6" title="32 bit signed variable.">s32</a> diffx = parentAbsolute.<a class="code" href="classirr_1_1core_1_1rect.html#e313a3674095733348d5e8bcb75c49b4" title="Get width of rectangle.">getWidth</a>() - <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#02f0934eefcc2191cfd665daf529ce0b" title="for calculating the difference when resizing parent">LastParentRect</a>.getWidth(); <a name="l00236"></a>00236 <span class="keyword">const</span> <a class="code" href="namespaceirr.html#c66849b7a6ed16e30ebede579f9b47c6" title="32 bit signed variable.">s32</a> diffy = parentAbsolute.<a class="code" href="classirr_1_1core_1_1rect.html#61b4192aa7aee5b55c288b1eac29d76b" title="Get height of rectangle.">getHeight</a>() - <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#02f0934eefcc2191cfd665daf529ce0b" title="for calculating the difference when resizing parent">LastParentRect</a>.getHeight(); <a name="l00237"></a>00237 <a name="l00238"></a>00238 <span class="keywordflow">if</span> (<a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#09873f314caf3144ebf470ccaa22762a" title="tells the element how to act when its parent is resized">AlignLeft</a> == <a class="code" href="namespaceirr_1_1gui.html#19eb5fb40e67f108cb16aba922ddaa2d0fef10c3356089b2c18ba4e6b3f91246" title="Stretched to fit parent.">EGUIA_SCALE</a> || <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#c0c5d7f233ebd05d535e9e9cf25f03fe">AlignRight</a> == <a class="code" href="namespaceirr_1_1gui.html#19eb5fb40e67f108cb16aba922ddaa2d0fef10c3356089b2c18ba4e6b3f91246" title="Stretched to fit parent.">EGUIA_SCALE</a>) <a name="l00239"></a>00239 fw = (<a class="code" href="namespaceirr.html#0277be98d67dc26ff93b1a6a1d086b07" title="32 bit floating point variable.">f32</a>)parentAbsolute.<a class="code" href="classirr_1_1core_1_1rect.html#e313a3674095733348d5e8bcb75c49b4" title="Get width of rectangle.">getWidth</a>(); <a name="l00240"></a>00240 <a name="l00241"></a>00241 <span class="keywordflow">if</span> (<a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#bf9113bebfcde09e7f4a82269d6e2da1">AlignTop</a> == <a class="code" href="namespaceirr_1_1gui.html#19eb5fb40e67f108cb16aba922ddaa2d0fef10c3356089b2c18ba4e6b3f91246" title="Stretched to fit parent.">EGUIA_SCALE</a> || <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#4204f1300a03ea597a48c5b4cfe134c0">AlignBottom</a> == <a class="code" href="namespaceirr_1_1gui.html#19eb5fb40e67f108cb16aba922ddaa2d0fef10c3356089b2c18ba4e6b3f91246" title="Stretched to fit parent.">EGUIA_SCALE</a>) <a name="l00242"></a>00242 fh = (<a class="code" href="namespaceirr.html#0277be98d67dc26ff93b1a6a1d086b07" title="32 bit floating point variable.">f32</a>)parentAbsolute.<a class="code" href="classirr_1_1core_1_1rect.html#61b4192aa7aee5b55c288b1eac29d76b" title="Get height of rectangle.">getHeight</a>(); <a name="l00243"></a>00243 <a name="l00244"></a>00244 <span class="keywordflow">switch</span> (<a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#09873f314caf3144ebf470ccaa22762a" title="tells the element how to act when its parent is resized">AlignLeft</a>) <a name="l00245"></a>00245 { <a name="l00246"></a>00246 <span class="keywordflow">case</span> <a class="code" href="namespaceirr_1_1gui.html#19eb5fb40e67f108cb16aba922ddaa2d4bb8a01452727274e18047a872da1809" title="Aligned to parent&#39;s top or left side (default).">EGUIA_UPPERLEFT</a>: <a name="l00247"></a>00247 <span class="keywordflow">break</span>; <a name="l00248"></a>00248 <span class="keywordflow">case</span> <a class="code" href="namespaceirr_1_1gui.html#19eb5fb40e67f108cb16aba922ddaa2d48b4d042b2d6cd63b876cef62c9cfb97" title="Aligned to parent&#39;s bottom or right side.">EGUIA_LOWERRIGHT</a>: <a name="l00249"></a>00249 <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#d85b5d446a0dfb2fa46ee3753e664cd2">DesiredRect</a>.UpperLeftCorner.X += diffx; <a name="l00250"></a>00250 <span class="keywordflow">break</span>; <a name="l00251"></a>00251 <span class="keywordflow">case</span> <a class="code" href="namespaceirr_1_1gui.html#19eb5fb40e67f108cb16aba922ddaa2d9da0fb4bcb85d509bdfe018b720e4606" title="Aligned to the center of parent.">EGUIA_CENTER</a>: <a name="l00252"></a>00252 <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#d85b5d446a0dfb2fa46ee3753e664cd2">DesiredRect</a>.UpperLeftCorner.X += diffx/2; <a name="l00253"></a>00253 <span class="keywordflow">break</span>; <a name="l00254"></a>00254 <span class="keywordflow">case</span> <a class="code" href="namespaceirr_1_1gui.html#19eb5fb40e67f108cb16aba922ddaa2d0fef10c3356089b2c18ba4e6b3f91246" title="Stretched to fit parent.">EGUIA_SCALE</a>: <a name="l00255"></a>00255 <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#d85b5d446a0dfb2fa46ee3753e664cd2">DesiredRect</a>.UpperLeftCorner.X = (<a class="code" href="namespaceirr.html#c66849b7a6ed16e30ebede579f9b47c6" title="32 bit signed variable.">s32</a>)(<a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#f8fc66b7504e9a073b02fc69a63f0b49" title="relative scale of the element inside its parent">ScaleRect</a>.UpperLeftCorner.X * fw); <a name="l00256"></a>00256 <span class="keywordflow">break</span>; <a name="l00257"></a>00257 } <a name="l00258"></a>00258 <a name="l00259"></a>00259 <span class="keywordflow">switch</span> (<a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#c0c5d7f233ebd05d535e9e9cf25f03fe">AlignRight</a>) <a name="l00260"></a>00260 { <a name="l00261"></a>00261 <span class="keywordflow">case</span> <a class="code" href="namespaceirr_1_1gui.html#19eb5fb40e67f108cb16aba922ddaa2d4bb8a01452727274e18047a872da1809" title="Aligned to parent&#39;s top or left side (default).">EGUIA_UPPERLEFT</a>: <a name="l00262"></a>00262 <span class="keywordflow">break</span>; <a name="l00263"></a>00263 <span class="keywordflow">case</span> <a class="code" href="namespaceirr_1_1gui.html#19eb5fb40e67f108cb16aba922ddaa2d48b4d042b2d6cd63b876cef62c9cfb97" title="Aligned to parent&#39;s bottom or right side.">EGUIA_LOWERRIGHT</a>: <a name="l00264"></a>00264 <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#d85b5d446a0dfb2fa46ee3753e664cd2">DesiredRect</a>.LowerRightCorner.X += diffx; <a name="l00265"></a>00265 <span class="keywordflow">break</span>; <a name="l00266"></a>00266 <span class="keywordflow">case</span> <a class="code" href="namespaceirr_1_1gui.html#19eb5fb40e67f108cb16aba922ddaa2d9da0fb4bcb85d509bdfe018b720e4606" title="Aligned to the center of parent.">EGUIA_CENTER</a>: <a name="l00267"></a>00267 <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#d85b5d446a0dfb2fa46ee3753e664cd2">DesiredRect</a>.LowerRightCorner.X += diffx/2; <a name="l00268"></a>00268 <span class="keywordflow">break</span>; <a name="l00269"></a>00269 <span class="keywordflow">case</span> <a class="code" href="namespaceirr_1_1gui.html#19eb5fb40e67f108cb16aba922ddaa2d0fef10c3356089b2c18ba4e6b3f91246" title="Stretched to fit parent.">EGUIA_SCALE</a>: <a name="l00270"></a>00270 <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#d85b5d446a0dfb2fa46ee3753e664cd2">DesiredRect</a>.LowerRightCorner.X = (<a class="code" href="namespaceirr.html#c66849b7a6ed16e30ebede579f9b47c6" title="32 bit signed variable.">s32</a>)(<a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#f8fc66b7504e9a073b02fc69a63f0b49" title="relative scale of the element inside its parent">ScaleRect</a>.LowerRightCorner.X * fw); <a name="l00271"></a>00271 <span class="keywordflow">break</span>; <a name="l00272"></a>00272 } <a name="l00273"></a>00273 <a name="l00274"></a>00274 <span class="keywordflow">switch</span> (<a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#bf9113bebfcde09e7f4a82269d6e2da1">AlignTop</a>) <a name="l00275"></a>00275 { <a name="l00276"></a>00276 <span class="keywordflow">case</span> <a class="code" href="namespaceirr_1_1gui.html#19eb5fb40e67f108cb16aba922ddaa2d4bb8a01452727274e18047a872da1809" title="Aligned to parent&#39;s top or left side (default).">EGUIA_UPPERLEFT</a>: <a name="l00277"></a>00277 <span class="keywordflow">break</span>; <a name="l00278"></a>00278 <span class="keywordflow">case</span> <a class="code" href="namespaceirr_1_1gui.html#19eb5fb40e67f108cb16aba922ddaa2d48b4d042b2d6cd63b876cef62c9cfb97" title="Aligned to parent&#39;s bottom or right side.">EGUIA_LOWERRIGHT</a>: <a name="l00279"></a>00279 <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#d85b5d446a0dfb2fa46ee3753e664cd2">DesiredRect</a>.UpperLeftCorner.Y += diffy; <a name="l00280"></a>00280 <span class="keywordflow">break</span>; <a name="l00281"></a>00281 <span class="keywordflow">case</span> <a class="code" href="namespaceirr_1_1gui.html#19eb5fb40e67f108cb16aba922ddaa2d9da0fb4bcb85d509bdfe018b720e4606" title="Aligned to the center of parent.">EGUIA_CENTER</a>: <a name="l00282"></a>00282 <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#d85b5d446a0dfb2fa46ee3753e664cd2">DesiredRect</a>.UpperLeftCorner.Y += diffy/2; <a name="l00283"></a>00283 <span class="keywordflow">break</span>; <a name="l00284"></a>00284 <span class="keywordflow">case</span> <a class="code" href="namespaceirr_1_1gui.html#19eb5fb40e67f108cb16aba922ddaa2d0fef10c3356089b2c18ba4e6b3f91246" title="Stretched to fit parent.">EGUIA_SCALE</a>: <a name="l00285"></a>00285 <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#d85b5d446a0dfb2fa46ee3753e664cd2">DesiredRect</a>.UpperLeftCorner.Y = (<a class="code" href="namespaceirr.html#c66849b7a6ed16e30ebede579f9b47c6" title="32 bit signed variable.">s32</a>)(<a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#f8fc66b7504e9a073b02fc69a63f0b49" title="relative scale of the element inside its parent">ScaleRect</a>.UpperLeftCorner.Y * fh); <a name="l00286"></a>00286 <span class="keywordflow">break</span>; <a name="l00287"></a>00287 } <a name="l00288"></a>00288 <a name="l00289"></a>00289 <span class="keywordflow">switch</span> (<a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#4204f1300a03ea597a48c5b4cfe134c0">AlignBottom</a>) <a name="l00290"></a>00290 { <a name="l00291"></a>00291 <span class="keywordflow">case</span> <a class="code" href="namespaceirr_1_1gui.html#19eb5fb40e67f108cb16aba922ddaa2d4bb8a01452727274e18047a872da1809" title="Aligned to parent&#39;s top or left side (default).">EGUIA_UPPERLEFT</a>: <a name="l00292"></a>00292 <span class="keywordflow">break</span>; <a name="l00293"></a>00293 <span class="keywordflow">case</span> <a class="code" href="namespaceirr_1_1gui.html#19eb5fb40e67f108cb16aba922ddaa2d48b4d042b2d6cd63b876cef62c9cfb97" title="Aligned to parent&#39;s bottom or right side.">EGUIA_LOWERRIGHT</a>: <a name="l00294"></a>00294 <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#d85b5d446a0dfb2fa46ee3753e664cd2">DesiredRect</a>.LowerRightCorner.Y += diffy; <a name="l00295"></a>00295 <span class="keywordflow">break</span>; <a name="l00296"></a>00296 <span class="keywordflow">case</span> <a class="code" href="namespaceirr_1_1gui.html#19eb5fb40e67f108cb16aba922ddaa2d9da0fb4bcb85d509bdfe018b720e4606" title="Aligned to the center of parent.">EGUIA_CENTER</a>: <a name="l00297"></a>00297 <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#d85b5d446a0dfb2fa46ee3753e664cd2">DesiredRect</a>.LowerRightCorner.Y += diffy/2; <a name="l00298"></a>00298 <span class="keywordflow">break</span>; <a name="l00299"></a>00299 <span class="keywordflow">case</span> <a class="code" href="namespaceirr_1_1gui.html#19eb5fb40e67f108cb16aba922ddaa2d0fef10c3356089b2c18ba4e6b3f91246" title="Stretched to fit parent.">EGUIA_SCALE</a>: <a name="l00300"></a>00300 <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#d85b5d446a0dfb2fa46ee3753e664cd2">DesiredRect</a>.LowerRightCorner.Y = (<a class="code" href="namespaceirr.html#c66849b7a6ed16e30ebede579f9b47c6" title="32 bit signed variable.">s32</a>)(<a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#f8fc66b7504e9a073b02fc69a63f0b49" title="relative scale of the element inside its parent">ScaleRect</a>.LowerRightCorner.Y * fh); <a name="l00301"></a>00301 <span class="keywordflow">break</span>; <a name="l00302"></a>00302 } <a name="l00303"></a>00303 <a name="l00304"></a>00304 <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#f093935f3d5f6c3efedddc8bcdf7fc82" title="relative rect of element">RelativeRect</a> = <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#d85b5d446a0dfb2fa46ee3753e664cd2">DesiredRect</a>; <a name="l00305"></a>00305 <a name="l00306"></a>00306 <span class="keyword">const</span> <a class="code" href="namespaceirr.html#c66849b7a6ed16e30ebede579f9b47c6" title="32 bit signed variable.">s32</a> w = <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#f093935f3d5f6c3efedddc8bcdf7fc82" title="relative rect of element">RelativeRect</a>.getWidth(); <a name="l00307"></a>00307 <span class="keyword">const</span> <a class="code" href="namespaceirr.html#c66849b7a6ed16e30ebede579f9b47c6" title="32 bit signed variable.">s32</a> h = <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#f093935f3d5f6c3efedddc8bcdf7fc82" title="relative rect of element">RelativeRect</a>.getHeight(); <a name="l00308"></a>00308 <a name="l00309"></a>00309 <span class="comment">// make sure the desired rectangle is allowed</span> <a name="l00310"></a>00310 <span class="keywordflow">if</span> (w < (<a class="code" href="namespaceirr.html#c66849b7a6ed16e30ebede579f9b47c6" title="32 bit signed variable.">s32</a>)<a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#a604d54c9ebcae3b1bf053411a5cf60f">MinSize</a>.<a class="code" href="classirr_1_1core_1_1dimension2d.html#0399dcc023c19d381d1a192596107db4" title="Width of the dimension.">Width</a>) <a name="l00311"></a>00311 <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#f093935f3d5f6c3efedddc8bcdf7fc82" title="relative rect of element">RelativeRect</a>.LowerRightCorner.X = <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#f093935f3d5f6c3efedddc8bcdf7fc82" title="relative rect of element">RelativeRect</a>.UpperLeftCorner.X + <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#a604d54c9ebcae3b1bf053411a5cf60f">MinSize</a>.<a class="code" href="classirr_1_1core_1_1dimension2d.html#0399dcc023c19d381d1a192596107db4" title="Width of the dimension.">Width</a>; <a name="l00312"></a>00312 <span class="keywordflow">if</span> (h < (<a class="code" href="namespaceirr.html#c66849b7a6ed16e30ebede579f9b47c6" title="32 bit signed variable.">s32</a>)<a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#a604d54c9ebcae3b1bf053411a5cf60f">MinSize</a>.<a class="code" href="classirr_1_1core_1_1dimension2d.html#89b253523d31336c6b2a6a56dfd48a6b" title="Height of the dimension.">Height</a>) <a name="l00313"></a>00313 <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#f093935f3d5f6c3efedddc8bcdf7fc82" title="relative rect of element">RelativeRect</a>.LowerRightCorner.Y = <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#f093935f3d5f6c3efedddc8bcdf7fc82" title="relative rect of element">RelativeRect</a>.UpperLeftCorner.Y + <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#a604d54c9ebcae3b1bf053411a5cf60f">MinSize</a>.<a class="code" href="classirr_1_1core_1_1dimension2d.html#89b253523d31336c6b2a6a56dfd48a6b" title="Height of the dimension.">Height</a>; <a name="l00314"></a>00314 <span class="keywordflow">if</span> (<a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#1649a1c740c333bfb026397411c4da95" title="maximum and minimum size of the element">MaxSize</a>.<a class="code" href="classirr_1_1core_1_1dimension2d.html#0399dcc023c19d381d1a192596107db4" title="Width of the dimension.">Width</a> && w > (<a class="code" href="namespaceirr.html#c66849b7a6ed16e30ebede579f9b47c6" title="32 bit signed variable.">s32</a>)<a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#1649a1c740c333bfb026397411c4da95" title="maximum and minimum size of the element">MaxSize</a>.<a class="code" href="classirr_1_1core_1_1dimension2d.html#0399dcc023c19d381d1a192596107db4" title="Width of the dimension.">Width</a>) <a name="l00315"></a>00315 <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#f093935f3d5f6c3efedddc8bcdf7fc82" title="relative rect of element">RelativeRect</a>.LowerRightCorner.X = <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#f093935f3d5f6c3efedddc8bcdf7fc82" title="relative rect of element">RelativeRect</a>.UpperLeftCorner.X + <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#1649a1c740c333bfb026397411c4da95" title="maximum and minimum size of the element">MaxSize</a>.<a class="code" href="classirr_1_1core_1_1dimension2d.html#0399dcc023c19d381d1a192596107db4" title="Width of the dimension.">Width</a>; <a name="l00316"></a>00316 <span class="keywordflow">if</span> (<a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#1649a1c740c333bfb026397411c4da95" title="maximum and minimum size of the element">MaxSize</a>.<a class="code" href="classirr_1_1core_1_1dimension2d.html#89b253523d31336c6b2a6a56dfd48a6b" title="Height of the dimension.">Height</a> && h > (<a class="code" href="namespaceirr.html#c66849b7a6ed16e30ebede579f9b47c6" title="32 bit signed variable.">s32</a>)<a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#1649a1c740c333bfb026397411c4da95" title="maximum and minimum size of the element">MaxSize</a>.<a class="code" href="classirr_1_1core_1_1dimension2d.html#89b253523d31336c6b2a6a56dfd48a6b" title="Height of the dimension.">Height</a>) <a name="l00317"></a>00317 <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#f093935f3d5f6c3efedddc8bcdf7fc82" title="relative rect of element">RelativeRect</a>.LowerRightCorner.Y = <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#f093935f3d5f6c3efedddc8bcdf7fc82" title="relative rect of element">RelativeRect</a>.UpperLeftCorner.Y + <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#1649a1c740c333bfb026397411c4da95" title="maximum and minimum size of the element">MaxSize</a>.<a class="code" href="classirr_1_1core_1_1dimension2d.html#89b253523d31336c6b2a6a56dfd48a6b" title="Height of the dimension.">Height</a>; <a name="l00318"></a>00318 <a name="l00319"></a>00319 <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#f093935f3d5f6c3efedddc8bcdf7fc82" title="relative rect of element">RelativeRect</a>.repair(); <a name="l00320"></a>00320 <a name="l00321"></a>00321 <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#05ba78d5e6f11c5a64d9da2fcfd4ded1" title="absolute rect of element">AbsoluteRect</a> = <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#f093935f3d5f6c3efedddc8bcdf7fc82" title="relative rect of element">RelativeRect</a> + parentAbsolute.<a class="code" href="classirr_1_1core_1_1rect.html#bd47b3a4967b2153e58984d964af6573" title="Upper left corner.">UpperLeftCorner</a>; <a name="l00322"></a>00322 <a name="l00323"></a>00323 <span class="keywordflow">if</span> (!<a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#d769c75857869ecdfe0b021699d934ef" title="Pointer to the parent.">Parent</a>) <a name="l00324"></a>00324 parentAbsoluteClip = <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#05ba78d5e6f11c5a64d9da2fcfd4ded1" title="absolute rect of element">AbsoluteRect</a>; <a name="l00325"></a>00325 <a name="l00326"></a>00326 <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#1000af90afbbe92344fb000f5af5c8fb" title="absolute clipping rect of element">AbsoluteClippingRect</a> = <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#05ba78d5e6f11c5a64d9da2fcfd4ded1" title="absolute rect of element">AbsoluteRect</a>; <a name="l00327"></a>00327 <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#1000af90afbbe92344fb000f5af5c8fb" title="absolute clipping rect of element">AbsoluteClippingRect</a>.clipAgainst(parentAbsoluteClip); <a name="l00328"></a>00328 <a name="l00329"></a>00329 <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#02f0934eefcc2191cfd665daf529ce0b" title="for calculating the difference when resizing parent">LastParentRect</a> = parentAbsolute; <a name="l00330"></a>00330 <a name="l00331"></a>00331 <span class="comment">// update all children</span> <a name="l00332"></a>00332 <a class="code" href="classirr_1_1core_1_1list.html" title="Doubly linked list template.">core::list<IGUIElement*>::Iterator</a> it = <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#90a100897814da93cbbf45f12bbf0198" title="List of all children of this element.">Children</a>.begin(); <a name="l00333"></a>00333 <span class="keywordflow">for</span> (; it != <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#90a100897814da93cbbf45f12bbf0198" title="List of all children of this element.">Children</a>.end(); ++it) <a name="l00334"></a>00334 { <a name="l00335"></a>00335 (*it)->updateAbsolutePosition(); <a name="l00336"></a>00336 } <a name="l00337"></a>00337 } <a name="l00338"></a>00338 <a name="l00339"></a>00339 <a name="l00341"></a>00341 <a name="l00352"></a><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#e49f8a5228ce0c18e0c98becf74ee56a">00352</a> <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html" title="Base class of all GUI elements.">IGUIElement</a>* <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#e49f8a5228ce0c18e0c98becf74ee56a" title="Returns the topmost GUI element at the specific position.">getElementFromPoint</a>(<span class="keyword">const</span> core::position2d<s32>& point) <a name="l00353"></a>00353 { <a name="l00354"></a>00354 <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html" title="Base class of all GUI elements.">IGUIElement</a>* target = 0; <a name="l00355"></a>00355 <a name="l00356"></a>00356 <span class="comment">// we have to search from back to front, because later children</span> <a name="l00357"></a>00357 <span class="comment">// might be drawn over the top of earlier ones.</span> <a name="l00358"></a>00358 <a name="l00359"></a>00359 <a class="code" href="classirr_1_1core_1_1list.html" title="Doubly linked list template.">core::list<IGUIElement*>::Iterator</a> it = <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#90a100897814da93cbbf45f12bbf0198" title="List of all children of this element.">Children</a>.getLast(); <a name="l00360"></a>00360 <a name="l00361"></a>00361 <span class="keywordflow">if</span> (<a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#7eb474d580a78c883269d40abaecbbc0" title="Returns true if element is visible.">isVisible</a>()) <a name="l00362"></a>00362 { <a name="l00363"></a>00363 <span class="keywordflow">while</span>(it != <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#90a100897814da93cbbf45f12bbf0198" title="List of all children of this element.">Children</a>.end()) <a name="l00364"></a>00364 { <a name="l00365"></a>00365 target = (*it)-><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#e49f8a5228ce0c18e0c98becf74ee56a" title="Returns the topmost GUI element at the specific position.">getElementFromPoint</a>(point); <a name="l00366"></a>00366 <span class="keywordflow">if</span> (target) <a name="l00367"></a>00367 <span class="keywordflow">return</span> target; <a name="l00368"></a>00368 <a name="l00369"></a>00369 --it; <a name="l00370"></a>00370 } <a name="l00371"></a>00371 } <a name="l00372"></a>00372 <a name="l00373"></a>00373 <span class="keywordflow">if</span> (<a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#7eb474d580a78c883269d40abaecbbc0" title="Returns true if element is visible.">isVisible</a>() && <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#b777430f15d74d2f0611f2a3aaab7213" title="Returns true if a point is within this element.">isPointInside</a>(point)) <a name="l00374"></a>00374 target = <span class="keyword">this</span>; <a name="l00375"></a>00375 <a name="l00376"></a>00376 <span class="keywordflow">return</span> target; <a name="l00377"></a>00377 } <a name="l00378"></a>00378 <a name="l00379"></a>00379 <a name="l00381"></a>00381 <a name="l00382"></a><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#b777430f15d74d2f0611f2a3aaab7213">00382</a> <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#b777430f15d74d2f0611f2a3aaab7213" title="Returns true if a point is within this element.">isPointInside</a>(<span class="keyword">const</span> core::position2d<s32>& point)<span class="keyword"> const</span> <a name="l00383"></a>00383 <span class="keyword"> </span>{ <a name="l00384"></a>00384 <span class="keywordflow">return</span> <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#1000af90afbbe92344fb000f5af5c8fb" title="absolute clipping rect of element">AbsoluteClippingRect</a>.isPointInside(point); <a name="l00385"></a>00385 } <a name="l00386"></a>00386 <a name="l00387"></a>00387 <a name="l00389"></a><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#221c8505217aa9c23c621627a0435554">00389</a> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#221c8505217aa9c23c621627a0435554" title="Adds a GUI element as new child of this element.">addChild</a>(<a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html" title="Base class of all GUI elements.">IGUIElement</a>* child) <a name="l00390"></a>00390 { <a name="l00391"></a>00391 <span class="keywordflow">if</span> (child) <a name="l00392"></a>00392 { <a name="l00393"></a>00393 child-><a class="code" href="classirr_1_1_i_reference_counted.html#2b7a035532e5f409ca9482dab79185f4" title="Grabs the object. Increments the reference counter by one.">grab</a>(); <span class="comment">// prevent destruction when removed</span> <a name="l00394"></a>00394 child-><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#f8fb8c63d48ec6ceeeedc8a83c02a9d0" title="Removes this element from its parent.">remove</a>(); <span class="comment">// remove from old parent</span> <a name="l00395"></a>00395 child-><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#02f0934eefcc2191cfd665daf529ce0b" title="for calculating the difference when resizing parent">LastParentRect</a> = <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#f897fcfbff5642c908c3c45c39bc90f1" title="Gets the absolute rectangle of this element.">getAbsolutePosition</a>(); <a name="l00396"></a>00396 child-><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#d769c75857869ecdfe0b021699d934ef" title="Pointer to the parent.">Parent</a> = <span class="keyword">this</span>; <a name="l00397"></a>00397 <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#90a100897814da93cbbf45f12bbf0198" title="List of all children of this element.">Children</a>.push_back(child); <a name="l00398"></a>00398 child-><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#d58bbeba69a118873a5075d86b4c90f2" title="Updates the absolute position.">updateAbsolutePosition</a>(); <a name="l00399"></a>00399 } <a name="l00400"></a>00400 } <a name="l00401"></a>00401 <a name="l00403"></a><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#3171cafaa9d2f3b67c886c60bdd61b32">00403</a> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#3171cafaa9d2f3b67c886c60bdd61b32" title="Removes a child.">removeChild</a>(<a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html" title="Base class of all GUI elements.">IGUIElement</a>* child) <a name="l00404"></a>00404 { <a name="l00405"></a>00405 <a class="code" href="classirr_1_1core_1_1list.html" title="Doubly linked list template.">core::list<IGUIElement*>::Iterator</a> it = <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#90a100897814da93cbbf45f12bbf0198" title="List of all children of this element.">Children</a>.begin(); <a name="l00406"></a>00406 <span class="keywordflow">for</span> (; it != <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#90a100897814da93cbbf45f12bbf0198" title="List of all children of this element.">Children</a>.end(); ++it) <a name="l00407"></a>00407 <span class="keywordflow">if</span> ((*it) == child) <a name="l00408"></a>00408 { <a name="l00409"></a>00409 (*it)->Parent = 0; <a name="l00410"></a>00410 (*it)->drop(); <a name="l00411"></a>00411 <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#90a100897814da93cbbf45f12bbf0198" title="List of all children of this element.">Children</a>.erase(it); <a name="l00412"></a>00412 <span class="keywordflow">return</span>; <a name="l00413"></a>00413 } <a name="l00414"></a>00414 } <a name="l00415"></a>00415 <a name="l00416"></a>00416 <a name="l00418"></a><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#f8fb8c63d48ec6ceeeedc8a83c02a9d0">00418</a> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <span class="keyword">remove</span>() <a name="l00419"></a>00419 { <a name="l00420"></a>00420 <span class="keywordflow">if</span> (<a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#d769c75857869ecdfe0b021699d934ef" title="Pointer to the parent.">Parent</a>) <a name="l00421"></a>00421 <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#d769c75857869ecdfe0b021699d934ef" title="Pointer to the parent.">Parent</a>-><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#3171cafaa9d2f3b67c886c60bdd61b32" title="Removes a child.">removeChild</a>(<span class="keyword">this</span>); <a name="l00422"></a>00422 } <a name="l00423"></a>00423 <a name="l00424"></a>00424 <a name="l00426"></a><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#1ef7eeaff67b8a9f4f37cacdc7e54be2">00426</a> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#1ef7eeaff67b8a9f4f37cacdc7e54be2" title="Draws the element and its children.">draw</a>() <a name="l00427"></a>00427 { <a name="l00428"></a>00428 <span class="keywordflow">if</span> ( <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#7eb474d580a78c883269d40abaecbbc0" title="Returns true if element is visible.">isVisible</a>() ) <a name="l00429"></a>00429 { <a name="l00430"></a>00430 <a class="code" href="classirr_1_1core_1_1list.html" title="Doubly linked list template.">core::list<IGUIElement*>::Iterator</a> it = <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#90a100897814da93cbbf45f12bbf0198" title="List of all children of this element.">Children</a>.begin(); <a name="l00431"></a>00431 <span class="keywordflow">for</span> (; it != <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#90a100897814da93cbbf45f12bbf0198" title="List of all children of this element.">Children</a>.end(); ++it) <a name="l00432"></a>00432 (*it)->draw(); <a name="l00433"></a>00433 } <a name="l00434"></a>00434 } <a name="l00435"></a>00435 <a name="l00436"></a>00436 <a name="l00438"></a><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#c71cf9174d4d35eca386657f01d744d1">00438</a> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#c71cf9174d4d35eca386657f01d744d1" title="animate the element and its children.">OnPostRender</a>(<a class="code" href="namespaceirr.html#0416a53257075833e7002efd0a18e804" title="32 bit unsigned variable.">u32</a> timeMs) <a name="l00439"></a>00439 { <a name="l00440"></a>00440 <span class="keywordflow">if</span> ( <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#7eb474d580a78c883269d40abaecbbc0" title="Returns true if element is visible.">isVisible</a>() ) <a name="l00441"></a>00441 { <a name="l00442"></a>00442 <a class="code" href="classirr_1_1core_1_1list.html" title="Doubly linked list template.">core::list<IGUIElement*>::Iterator</a> it = <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#90a100897814da93cbbf45f12bbf0198" title="List of all children of this element.">Children</a>.begin(); <a name="l00443"></a>00443 <span class="keywordflow">for</span> (; it != <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#90a100897814da93cbbf45f12bbf0198" title="List of all children of this element.">Children</a>.end(); ++it) <a name="l00444"></a>00444 (*it)->OnPostRender( timeMs ); <a name="l00445"></a>00445 } <a name="l00446"></a>00446 } <a name="l00447"></a>00447 <a name="l00448"></a>00448 <a name="l00450"></a><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#842eeacfcb26865416b084593a774704">00450</a> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#842eeacfcb26865416b084593a774704" title="Moves this element.">move</a>(core::position2d<s32> absoluteMovement) <a name="l00451"></a>00451 { <a name="l00452"></a>00452 <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#0e5bb2d0a2e88e30d3697652f8dd7034" title="Sets the relative rectangle of this element.">setRelativePosition</a>(<a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#d85b5d446a0dfb2fa46ee3753e664cd2">DesiredRect</a> + absoluteMovement); <a name="l00453"></a>00453 } <a name="l00454"></a>00454 <a name="l00455"></a>00455 <a name="l00457"></a><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#7eb474d580a78c883269d40abaecbbc0">00457</a> <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#7eb474d580a78c883269d40abaecbbc0" title="Returns true if element is visible.">isVisible</a>()<span class="keyword"> const</span> <a name="l00458"></a>00458 <span class="keyword"> </span>{ <a name="l00459"></a>00459 <a class="code" href="irr_types_8h.html#d19cf45bdc142ef8e4a011cabbc4a4af" title="Defines a small statement to work around a microsoft compiler bug.">_IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX</a>; <a name="l00460"></a>00460 <span class="keywordflow">return</span> <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#d8dd8fdfb5be3e4cca1f1603cbcfaccf" title="is visible?">IsVisible</a>; <a name="l00461"></a>00461 } <a name="l00462"></a>00462 <a name="l00463"></a>00463 <a name="l00465"></a><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#ed537cb0b16c670b8f895179f0027bad">00465</a> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#ed537cb0b16c670b8f895179f0027bad" title="Sets the visible state of this element.">setVisible</a>(<span class="keywordtype">bool</span> visible) <a name="l00466"></a>00466 { <a name="l00467"></a>00467 <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#d8dd8fdfb5be3e4cca1f1603cbcfaccf" title="is visible?">IsVisible</a> = visible; <a name="l00468"></a>00468 } <a name="l00469"></a>00469 <a name="l00470"></a>00470 <a name="l00472"></a><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#b97b8dd0a86130eb71742e40f84549e0">00472</a> <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#b97b8dd0a86130eb71742e40f84549e0" title="Returns true if this element was created as part of its parent control.">isSubElement</a>()<span class="keyword"> const</span> <a name="l00473"></a>00473 <span class="keyword"> </span>{ <a name="l00474"></a>00474 <a class="code" href="irr_types_8h.html#d19cf45bdc142ef8e4a011cabbc4a4af" title="Defines a small statement to work around a microsoft compiler bug.">_IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX</a>; <a name="l00475"></a>00475 <span class="keywordflow">return</span> <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#19f65c7004c5b36c848dad776aabc151" title="is a part of a larger whole and should not be serialized?">IsSubElement</a>; <a name="l00476"></a>00476 } <a name="l00477"></a>00477 <a name="l00478"></a>00478 <a name="l00480"></a>00480 <a name="l00482"></a><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#50eb859808b65ee24fbdd69e69118a8d">00482</a> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#50eb859808b65ee24fbdd69e69118a8d" title="Sets whether this control was created as part of its parent.">setSubElement</a>(<span class="keywordtype">bool</span> subElement) <a name="l00483"></a>00483 { <a name="l00484"></a>00484 <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#19f65c7004c5b36c848dad776aabc151" title="is a part of a larger whole and should not be serialized?">IsSubElement</a> = subElement; <a name="l00485"></a>00485 } <a name="l00486"></a>00486 <a name="l00487"></a>00487 <a name="l00489"></a>00489 <a name="l00491"></a><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#58b9b6a8715b4959dda905dbc028ece6">00491</a> <span class="keywordtype">void</span> <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#58b9b6a8715b4959dda905dbc028ece6" title="If set to true, the focus will visit this element when using the tab key to cycle...">setTabStop</a>(<span class="keywordtype">bool</span> enable) <a name="l00492"></a>00492 { <a name="l00493"></a>00493 <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#f98dfbfc8776221b3a70ceea43fc4f9a" title="tab stop like in windows">IsTabStop</a> = enable; <a name="l00494"></a>00494 } <a name="l00495"></a>00495 <a name="l00496"></a>00496 <a name="l00498"></a><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#7ec6a72654833db4f79a72025aa6e71c">00498</a> <span class="keywordtype">bool</span> <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#7ec6a72654833db4f79a72025aa6e71c" title="Returns true if this element can be focused by navigating with the tab key.">isTabStop</a>()<span class="keyword"> const</span> <a name="l00499"></a>00499 <span class="keyword"> </span>{ <a name="l00500"></a>00500 <a class="code" href="irr_types_8h.html#d19cf45bdc142ef8e4a011cabbc4a4af" title="Defines a small statement to work around a microsoft compiler bug.">_IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX</a>; <a name="l00501"></a>00501 <span class="keywordflow">return</span> <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#f98dfbfc8776221b3a70ceea43fc4f9a" title="tab stop like in windows">IsTabStop</a>; <a name="l00502"></a>00502 } <a name="l00503"></a>00503 <a name="l00504"></a>00504 <a name="l00506"></a>00506 <a name="l00508"></a><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#1aabac2cce7847e5ab17f6c88d129ef7">00508</a> <span class="keywordtype">void</span> <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#1aabac2cce7847e5ab17f6c88d129ef7" title="Sets the priority of focus when using the tab key to navigate between a group of...">setTabOrder</a>(<a class="code" href="namespaceirr.html#c66849b7a6ed16e30ebede579f9b47c6" title="32 bit signed variable.">s32</a> index) <a name="l00509"></a>00509 { <a name="l00510"></a>00510 <span class="comment">// negative = autonumber</span> <a name="l00511"></a>00511 <span class="keywordflow">if</span> (index < 0) <a name="l00512"></a>00512 { <a name="l00513"></a>00513 <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#90fcd9d502bb0f6e8e5f2d091f54bafb" title="tab order">TabOrder</a> = 0; <a name="l00514"></a>00514 <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html" title="Base class of all GUI elements.">IGUIElement</a> *el = <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#b6266a2fd3d8b0be385f9f3f3364e9ff" title="Returns the container element which holds all elements in this element&#39;s tab...">getTabGroup</a>(); <a name="l00515"></a>00515 <span class="keywordflow">while</span> (<a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#8ea1b4a60653c8cc157e806e14ae0558" title="tab groups are containers like windows, use ctrl+tab to navigate">IsTabGroup</a> && el && el-><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#d769c75857869ecdfe0b021699d934ef" title="Pointer to the parent.">Parent</a>) <a name="l00516"></a>00516 el = el-><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#d769c75857869ecdfe0b021699d934ef" title="Pointer to the parent.">Parent</a>; <a name="l00517"></a>00517 <a name="l00518"></a>00518 <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html" title="Base class of all GUI elements.">IGUIElement</a> *first=0, *closest=0; <a name="l00519"></a>00519 <span class="keywordflow">if</span> (el) <a name="l00520"></a>00520 { <a name="l00521"></a>00521 <span class="comment">// find the highest element number</span> <a name="l00522"></a>00522 el-><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#88f760d76ee5e43222266dcc1720ae4a" title="searches elements to find the closest next element to tab to">getNextElement</a>(-1, <span class="keyword">true</span>, <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#8ea1b4a60653c8cc157e806e14ae0558" title="tab groups are containers like windows, use ctrl+tab to navigate">IsTabGroup</a>, first, closest, <span class="keyword">true</span>); <a name="l00523"></a>00523 <span class="keywordflow">if</span> (first) <a name="l00524"></a>00524 { <a name="l00525"></a>00525 <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#90fcd9d502bb0f6e8e5f2d091f54bafb" title="tab order">TabOrder</a> = first-><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#9857fb8654862486e153bbba2132ed09" title="Returns the number in the tab order sequence.">getTabOrder</a>() + 1; <a name="l00526"></a>00526 } <a name="l00527"></a>00527 } <a name="l00528"></a>00528 <a name="l00529"></a>00529 } <a name="l00530"></a>00530 <span class="keywordflow">else</span> <a name="l00531"></a>00531 <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#90fcd9d502bb0f6e8e5f2d091f54bafb" title="tab order">TabOrder</a> = index; <a name="l00532"></a>00532 } <a name="l00533"></a>00533 <a name="l00534"></a>00534 <a name="l00536"></a><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#9857fb8654862486e153bbba2132ed09">00536</a> <a class="code" href="namespaceirr.html#c66849b7a6ed16e30ebede579f9b47c6" title="32 bit signed variable.">s32</a> <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#9857fb8654862486e153bbba2132ed09" title="Returns the number in the tab order sequence.">getTabOrder</a>()<span class="keyword"> const</span> <a name="l00537"></a>00537 <span class="keyword"> </span>{ <a name="l00538"></a>00538 <span class="keywordflow">return</span> <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#90fcd9d502bb0f6e8e5f2d091f54bafb" title="tab order">TabOrder</a>; <a name="l00539"></a>00539 } <a name="l00540"></a>00540 <a name="l00541"></a>00541 <a name="l00543"></a>00543 <a name="l00545"></a><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#a44a46f3b639ca1b095f855c9d9c959d">00545</a> <span class="keywordtype">void</span> <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#a44a46f3b639ca1b095f855c9d9c959d" title="Sets whether this element is a container for a group of elements which can be navigated...">setTabGroup</a>(<span class="keywordtype">bool</span> isGroup) <a name="l00546"></a>00546 { <a name="l00547"></a>00547 <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#8ea1b4a60653c8cc157e806e14ae0558" title="tab groups are containers like windows, use ctrl+tab to navigate">IsTabGroup</a> = isGroup; <a name="l00548"></a>00548 } <a name="l00549"></a>00549 <a name="l00550"></a>00550 <a name="l00552"></a><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#82a8614f749b19484e0c4af444e215f0">00552</a> <span class="keywordtype">bool</span> <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#82a8614f749b19484e0c4af444e215f0" title="Returns true if this element is a tab group.">isTabGroup</a>()<span class="keyword"> const</span> <a name="l00553"></a>00553 <span class="keyword"> </span>{ <a name="l00554"></a>00554 <a class="code" href="irr_types_8h.html#d19cf45bdc142ef8e4a011cabbc4a4af" title="Defines a small statement to work around a microsoft compiler bug.">_IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX</a>; <a name="l00555"></a>00555 <span class="keywordflow">return</span> <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#8ea1b4a60653c8cc157e806e14ae0558" title="tab groups are containers like windows, use ctrl+tab to navigate">IsTabGroup</a>; <a name="l00556"></a>00556 } <a name="l00557"></a>00557 <a name="l00558"></a>00558 <a name="l00560"></a><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#b6266a2fd3d8b0be385f9f3f3364e9ff">00560</a> <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html" title="Base class of all GUI elements.">IGUIElement</a>* <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#b6266a2fd3d8b0be385f9f3f3364e9ff" title="Returns the container element which holds all elements in this element&#39;s tab...">getTabGroup</a>() <a name="l00561"></a>00561 { <a name="l00562"></a>00562 <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html" title="Base class of all GUI elements.">IGUIElement</a> *ret=<span class="keyword">this</span>; <a name="l00563"></a>00563 <a name="l00564"></a>00564 <span class="keywordflow">while</span> (ret && !ret-><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#82a8614f749b19484e0c4af444e215f0" title="Returns true if this element is a tab group.">isTabGroup</a>()) <a name="l00565"></a>00565 ret = ret-><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#417ad834c99198484b3b4b787dcfba74" title="Returns parent of this element.">getParent</a>(); <a name="l00566"></a>00566 <a name="l00567"></a>00567 <span class="keywordflow">return</span> ret; <a name="l00568"></a>00568 } <a name="l00569"></a>00569 <a name="l00570"></a>00570 <a name="l00572"></a><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#bfed9a7ace421bb3f14b8979d82e703a">00572</a> <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#bfed9a7ace421bb3f14b8979d82e703a" title="Returns true if element is enabled.">isEnabled</a>()<span class="keyword"> const</span> <a name="l00573"></a>00573 <span class="keyword"> </span>{ <a name="l00574"></a>00574 <a class="code" href="irr_types_8h.html#d19cf45bdc142ef8e4a011cabbc4a4af" title="Defines a small statement to work around a microsoft compiler bug.">_IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX</a>; <a name="l00575"></a>00575 <span class="keywordflow">return</span> <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#ba90d3c36184d3b6d62a8856a8734590" title="is enabled?">IsEnabled</a>; <a name="l00576"></a>00576 } <a name="l00577"></a>00577 <a name="l00578"></a>00578 <a name="l00580"></a><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#2e3fd4a5f1ae52296f98cf36fdcffd1b">00580</a> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#2e3fd4a5f1ae52296f98cf36fdcffd1b" title="Sets the enabled state of this element.">setEnabled</a>(<span class="keywordtype">bool</span> enabled) <a name="l00581"></a>00581 { <a name="l00582"></a>00582 <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#ba90d3c36184d3b6d62a8856a8734590" title="is enabled?">IsEnabled</a> = enabled; <a name="l00583"></a>00583 } <a name="l00584"></a>00584 <a name="l00585"></a>00585 <a name="l00587"></a><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#8f864c26d4b2ee3551c53d3ebf870656">00587</a> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#8f864c26d4b2ee3551c53d3ebf870656" title="Sets the new caption of this element.">setText</a>(<span class="keyword">const</span> <span class="keywordtype">wchar_t</span>* text) <a name="l00588"></a>00588 { <a name="l00589"></a>00589 <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#f37f64cdacde0959e4993d01f555eba8" title="caption">Text</a> = text; <a name="l00590"></a>00590 } <a name="l00591"></a>00591 <a name="l00592"></a>00592 <a name="l00594"></a><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#cf2e01dbdbd468cb8e2e148b2463d406">00594</a> <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keywordtype">wchar_t</span>* <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#cf2e01dbdbd468cb8e2e148b2463d406" title="Returns caption of this element.">getText</a>()<span class="keyword"> const</span> <a name="l00595"></a>00595 <span class="keyword"> </span>{ <a name="l00596"></a>00596 <span class="keywordflow">return</span> <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#f37f64cdacde0959e4993d01f555eba8" title="caption">Text</a>.<a class="code" href="classirr_1_1core_1_1string.html#4abad222c478c108096ee9297870068c" title="Returns character string.">c_str</a>(); <a name="l00597"></a>00597 } <a name="l00598"></a>00598 <a name="l00599"></a>00599 <a name="l00601"></a><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#672f29f88c8d8f1e8ed1ac6c9f23b890">00601</a> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#672f29f88c8d8f1e8ed1ac6c9f23b890" title="Sets the new caption of this element.">setToolTipText</a>(<span class="keyword">const</span> <span class="keywordtype">wchar_t</span>* text) <a name="l00602"></a>00602 { <a name="l00603"></a>00603 <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#422166b880f7829ec4e7b31322df9061" title="tooltip">ToolTipText</a> = text; <a name="l00604"></a>00604 } <a name="l00605"></a>00605 <a name="l00606"></a>00606 <a name="l00608"></a><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#aaac5a17bb0f0d7dcdc8709a800a6ae0">00608</a> <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1string.html">core::stringw</a>& <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#aaac5a17bb0f0d7dcdc8709a800a6ae0" title="Returns caption of this element.">getToolTipText</a>()<span class="keyword"> const</span> <a name="l00609"></a>00609 <span class="keyword"> </span>{ <a name="l00610"></a>00610 <span class="keywordflow">return</span> <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#422166b880f7829ec4e7b31322df9061" title="tooltip">ToolTipText</a>; <a name="l00611"></a>00611 } <a name="l00612"></a>00612 <a name="l00613"></a>00613 <a name="l00615"></a><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#ff90de947c77996192e4a5aa1dd460c7">00615</a> <span class="keyword">virtual</span> <a class="code" href="namespaceirr.html#c66849b7a6ed16e30ebede579f9b47c6" title="32 bit signed variable.">s32</a> <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#ff90de947c77996192e4a5aa1dd460c7" title="Returns id. Can be used to identify the element.">getID</a>()<span class="keyword"> const</span> <a name="l00616"></a>00616 <span class="keyword"> </span>{ <a name="l00617"></a>00617 <span class="keywordflow">return</span> <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#73a25c6d25bd673d92210fc2d60d916e" title="id">ID</a>; <a name="l00618"></a>00618 } <a name="l00619"></a>00619 <a name="l00620"></a>00620 <a name="l00622"></a><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#55bad0e14306765e1fb734c56b729ba4">00622</a> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#55bad0e14306765e1fb734c56b729ba4" title="Sets the id of this element.">setID</a>(<a class="code" href="namespaceirr.html#c66849b7a6ed16e30ebede579f9b47c6" title="32 bit signed variable.">s32</a> <span class="keywordtype">id</span>) <a name="l00623"></a>00623 { <a name="l00624"></a>00624 <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#73a25c6d25bd673d92210fc2d60d916e" title="id">ID</a> = id; <a name="l00625"></a>00625 } <a name="l00626"></a>00626 <a name="l00627"></a>00627 <a name="l00629"></a><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#54b1799e21722d9e6ce5b8e4bdb2e80a">00629</a> <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#54b1799e21722d9e6ce5b8e4bdb2e80a" title="Called if an event happened.">OnEvent</a>(<span class="keyword">const</span> <a class="code" href="structirr_1_1_s_event.html" title="SEvents hold information about an event. See irr::IEventReceiver for details on event...">SEvent</a>& event) <a name="l00630"></a>00630 { <a name="l00631"></a>00631 <span class="keywordflow">return</span> <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#d769c75857869ecdfe0b021699d934ef" title="Pointer to the parent.">Parent</a> ? <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#d769c75857869ecdfe0b021699d934ef" title="Pointer to the parent.">Parent</a>-><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#54b1799e21722d9e6ce5b8e4bdb2e80a" title="Called if an event happened.">OnEvent</a>(event) : <span class="keyword">false</span>; <a name="l00632"></a>00632 } <a name="l00633"></a>00633 <a name="l00634"></a>00634 <a name="l00636"></a>00636 <a name="l00637"></a><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#c262c8018bf4101f38f448fde16f5a52">00637</a> <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#c262c8018bf4101f38f448fde16f5a52" title="Brings a child to front.">bringToFront</a>(<a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html" title="Base class of all GUI elements.">IGUIElement</a>* element) <a name="l00638"></a>00638 { <a name="l00639"></a>00639 <a class="code" href="classirr_1_1core_1_1list.html" title="Doubly linked list template.">core::list<IGUIElement*>::Iterator</a> it = <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#90a100897814da93cbbf45f12bbf0198" title="List of all children of this element.">Children</a>.begin(); <a name="l00640"></a>00640 <span class="keywordflow">for</span> (; it != <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#90a100897814da93cbbf45f12bbf0198" title="List of all children of this element.">Children</a>.end(); ++it) <a name="l00641"></a>00641 { <a name="l00642"></a>00642 <span class="keywordflow">if</span> (element == (*it)) <a name="l00643"></a>00643 { <a name="l00644"></a>00644 <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#90a100897814da93cbbf45f12bbf0198" title="List of all children of this element.">Children</a>.erase(it); <a name="l00645"></a>00645 <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#90a100897814da93cbbf45f12bbf0198" title="List of all children of this element.">Children</a>.push_back(element); <a name="l00646"></a>00646 <span class="keywordflow">return</span> <span class="keyword">true</span>; <a name="l00647"></a>00647 } <a name="l00648"></a>00648 } <a name="l00649"></a>00649 <a name="l00650"></a>00650 <a class="code" href="irr_types_8h.html#d19cf45bdc142ef8e4a011cabbc4a4af" title="Defines a small statement to work around a microsoft compiler bug.">_IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX</a>; <a name="l00651"></a>00651 <span class="keywordflow">return</span> <span class="keyword">false</span>; <a name="l00652"></a>00652 } <a name="l00653"></a>00653 <a name="l00654"></a>00654 <a name="l00656"></a><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#6b5cad7e24f3191c909a7ae0a1a6bb27">00656</a> <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1list.html" title="Doubly linked list template.">core::list<IGUIElement*></a>& <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#6b5cad7e24f3191c909a7ae0a1a6bb27" title="Returns list with children of this element.">getChildren</a>()<span class="keyword"> const</span> <a name="l00657"></a>00657 <span class="keyword"> </span>{ <a name="l00658"></a>00658 <span class="keywordflow">return</span> <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#90a100897814da93cbbf45f12bbf0198" title="List of all children of this element.">Children</a>; <a name="l00659"></a>00659 } <a name="l00660"></a>00660 <a name="l00661"></a>00661 <a name="l00663"></a>00663 <a name="l00669"></a><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#1b6b4963685b23f18aaf079de1c0af68">00669</a> <span class="keyword">virtual</span> <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html" title="Base class of all GUI elements.">IGUIElement</a>* <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#1b6b4963685b23f18aaf079de1c0af68" title="Finds the first element with the given id.">getElementFromId</a>(<a class="code" href="namespaceirr.html#c66849b7a6ed16e30ebede579f9b47c6" title="32 bit signed variable.">s32</a> <span class="keywordtype">id</span>, <span class="keywordtype">bool</span> searchchildren=<span class="keyword">false</span>)<span class="keyword"> const</span> <a name="l00670"></a>00670 <span class="keyword"> </span>{ <a name="l00671"></a>00671 <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html" title="Base class of all GUI elements.">IGUIElement</a>* e = 0; <a name="l00672"></a>00672 <a name="l00673"></a>00673 <a class="code" href="classirr_1_1core_1_1list.html" title="Doubly linked list template.">core::list<IGUIElement*>::ConstIterator</a> it = <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#90a100897814da93cbbf45f12bbf0198" title="List of all children of this element.">Children</a>.begin(); <a name="l00674"></a>00674 <span class="keywordflow">for</span> (; it != <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#90a100897814da93cbbf45f12bbf0198" title="List of all children of this element.">Children</a>.end(); ++it) <a name="l00675"></a>00675 { <a name="l00676"></a>00676 <span class="keywordflow">if</span> ((*it)->getID() == id) <a name="l00677"></a>00677 <span class="keywordflow">return</span> (*it); <a name="l00678"></a>00678 <a name="l00679"></a>00679 <span class="keywordflow">if</span> (searchchildren) <a name="l00680"></a>00680 e = (*it)-><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#1b6b4963685b23f18aaf079de1c0af68" title="Finds the first element with the given id.">getElementFromId</a>(<span class="keywordtype">id</span>, <span class="keyword">true</span>); <a name="l00681"></a>00681 <a name="l00682"></a>00682 <span class="keywordflow">if</span> (e) <a name="l00683"></a>00683 <span class="keywordflow">return</span> e; <a name="l00684"></a>00684 } <a name="l00685"></a>00685 <a name="l00686"></a>00686 <span class="keywordflow">return</span> e; <a name="l00687"></a>00687 } <a name="l00688"></a>00688 <a name="l00689"></a>00689 <a name="l00692"></a><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#e9b22eb8368088384da19906d76f2f5c">00692</a> <span class="keywordtype">bool</span> <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#e9b22eb8368088384da19906d76f2f5c">isMyChild</a>(<a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html" title="Base class of all GUI elements.">IGUIElement</a>* child)<span class="keyword"> const</span> <a name="l00693"></a>00693 <span class="keyword"> </span>{ <a name="l00694"></a>00694 <span class="keywordflow">if</span> (!child) <a name="l00695"></a>00695 <span class="keywordflow">return</span> <span class="keyword">false</span>; <a name="l00696"></a>00696 <span class="keywordflow">do</span> <a name="l00697"></a>00697 { <a name="l00698"></a>00698 <span class="keywordflow">if</span> (child-><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#d769c75857869ecdfe0b021699d934ef" title="Pointer to the parent.">Parent</a>) <a name="l00699"></a>00699 child = child-><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#d769c75857869ecdfe0b021699d934ef" title="Pointer to the parent.">Parent</a>; <a name="l00700"></a>00700 <a name="l00701"></a>00701 } <span class="keywordflow">while</span> (child-><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#d769c75857869ecdfe0b021699d934ef" title="Pointer to the parent.">Parent</a> && child != <span class="keyword">this</span>); <a name="l00702"></a>00702 <a name="l00703"></a>00703 <a class="code" href="irr_types_8h.html#d19cf45bdc142ef8e4a011cabbc4a4af" title="Defines a small statement to work around a microsoft compiler bug.">_IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX</a>; <a name="l00704"></a>00704 <span class="keywordflow">return</span> child == <span class="keyword">this</span>; <a name="l00705"></a>00705 } <a name="l00706"></a>00706 <a name="l00707"></a>00707 <a name="l00709"></a>00709 <a name="l00716"></a><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#88f760d76ee5e43222266dcc1720ae4a">00716</a> <span class="keywordtype">bool</span> <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#88f760d76ee5e43222266dcc1720ae4a" title="searches elements to find the closest next element to tab to">getNextElement</a>(<a class="code" href="namespaceirr.html#c66849b7a6ed16e30ebede579f9b47c6" title="32 bit signed variable.">s32</a> startOrder, <span class="keywordtype">bool</span> reverse, <span class="keywordtype">bool</span> group, <a name="l00717"></a>00717 <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html" title="Base class of all GUI elements.">IGUIElement</a>*& first, <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html" title="Base class of all GUI elements.">IGUIElement</a>*& closest, <span class="keywordtype">bool</span> includeInvisible=<span class="keyword">false</span>)<span class="keyword"> const</span> <a name="l00718"></a>00718 <span class="keyword"> </span>{ <a name="l00719"></a>00719 <span class="comment">// we'll stop searching if we find this number</span> <a name="l00720"></a>00720 <a class="code" href="namespaceirr.html#c66849b7a6ed16e30ebede579f9b47c6" title="32 bit signed variable.">s32</a> wanted = startOrder + ( reverse ? -1 : 1 ); <a name="l00721"></a>00721 <span class="keywordflow">if</span> (wanted==-2) <a name="l00722"></a>00722 wanted = 1073741824; <span class="comment">// maximum s32</span> <a name="l00723"></a>00723 <a name="l00724"></a>00724 <a class="code" href="classirr_1_1core_1_1list.html" title="Doubly linked list template.">core::list<IGUIElement*>::ConstIterator</a> it = <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#90a100897814da93cbbf45f12bbf0198" title="List of all children of this element.">Children</a>.begin(); <a name="l00725"></a>00725 <a name="l00726"></a>00726 <a class="code" href="namespaceirr.html#c66849b7a6ed16e30ebede579f9b47c6" title="32 bit signed variable.">s32</a> closestOrder, currentOrder; <a name="l00727"></a>00727 <a name="l00728"></a>00728 <span class="keywordflow">while</span>(it != <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#90a100897814da93cbbf45f12bbf0198" title="List of all children of this element.">Children</a>.end()) <a name="l00729"></a>00729 { <a name="l00730"></a>00730 <span class="comment">// ignore invisible elements and their children</span> <a name="l00731"></a>00731 <span class="keywordflow">if</span> ( ( (*it)->isVisible() || includeInvisible ) && <a name="l00732"></a>00732 (group == <span class="keyword">true</span> || (*it)->isTabGroup() == <span class="keyword">false</span>) ) <a name="l00733"></a>00733 { <a name="l00734"></a>00734 <span class="comment">// only check tab stops and those with the same group status</span> <a name="l00735"></a>00735 <span class="keywordflow">if</span> ((*it)->isTabStop() && ((*it)->isTabGroup() == group)) <a name="l00736"></a>00736 { <a name="l00737"></a>00737 currentOrder = (*it)->getTabOrder(); <a name="l00738"></a>00738 <a name="l00739"></a>00739 <span class="comment">// is this what we're looking for?</span> <a name="l00740"></a>00740 <span class="keywordflow">if</span> (currentOrder == wanted) <a name="l00741"></a>00741 { <a name="l00742"></a>00742 closest = *it; <a name="l00743"></a>00743 <span class="keywordflow">return</span> <span class="keyword">true</span>; <a name="l00744"></a>00744 } <a name="l00745"></a>00745 <a name="l00746"></a>00746 <span class="comment">// is it closer than the current closest?</span> <a name="l00747"></a>00747 <span class="keywordflow">if</span> (closest) <a name="l00748"></a>00748 { <a name="l00749"></a>00749 closestOrder = closest-><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#9857fb8654862486e153bbba2132ed09" title="Returns the number in the tab order sequence.">getTabOrder</a>(); <a name="l00750"></a>00750 <span class="keywordflow">if</span> ( ( reverse && currentOrder > closestOrder && currentOrder < startOrder) <a name="l00751"></a>00751 ||(!reverse && currentOrder < closestOrder && currentOrder > startOrder)) <a name="l00752"></a>00752 { <a name="l00753"></a>00753 closest = *it; <a name="l00754"></a>00754 } <a name="l00755"></a>00755 } <a name="l00756"></a>00756 <span class="keywordflow">else</span> <a name="l00757"></a>00757 <span class="keywordflow">if</span> ( (reverse && currentOrder < startOrder) || (!reverse && currentOrder > startOrder) ) <a name="l00758"></a>00758 { <a name="l00759"></a>00759 closest = *it; <a name="l00760"></a>00760 } <a name="l00761"></a>00761 <a name="l00762"></a>00762 <span class="comment">// is it before the current first?</span> <a name="l00763"></a>00763 <span class="keywordflow">if</span> (first) <a name="l00764"></a>00764 { <a name="l00765"></a>00765 closestOrder = first-><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#9857fb8654862486e153bbba2132ed09" title="Returns the number in the tab order sequence.">getTabOrder</a>(); <a name="l00766"></a>00766 <a name="l00767"></a>00767 <span class="keywordflow">if</span> ( (reverse && closestOrder < currentOrder) || (!reverse && closestOrder > currentOrder) ) <a name="l00768"></a>00768 { <a name="l00769"></a>00769 first = *it; <a name="l00770"></a>00770 } <a name="l00771"></a>00771 } <a name="l00772"></a>00772 <span class="keywordflow">else</span> <a name="l00773"></a>00773 { <a name="l00774"></a>00774 first = *it; <a name="l00775"></a>00775 } <a name="l00776"></a>00776 } <a name="l00777"></a>00777 <span class="comment">// search within children</span> <a name="l00778"></a>00778 <span class="keywordflow">if</span> ((*it)->getNextElement(startOrder, reverse, group, first, closest)) <a name="l00779"></a>00779 { <a name="l00780"></a>00780 <a class="code" href="irr_types_8h.html#d19cf45bdc142ef8e4a011cabbc4a4af" title="Defines a small statement to work around a microsoft compiler bug.">_IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX</a>; <a name="l00781"></a>00781 <span class="keywordflow">return</span> <span class="keyword">true</span>; <a name="l00782"></a>00782 } <a name="l00783"></a>00783 } <a name="l00784"></a>00784 ++it; <a name="l00785"></a>00785 } <a name="l00786"></a>00786 <a class="code" href="irr_types_8h.html#d19cf45bdc142ef8e4a011cabbc4a4af" title="Defines a small statement to work around a microsoft compiler bug.">_IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX</a>; <a name="l00787"></a>00787 <span class="keywordflow">return</span> <span class="keyword">false</span>; <a name="l00788"></a>00788 } <a name="l00789"></a>00789 <a name="l00790"></a>00790 <a name="l00792"></a>00792 <a name="l00796"></a><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#66f6dc2bdab5e69a90b332abe4fdddbd">00796</a> <a class="code" href="namespaceirr_1_1gui.html#e4d66df0ecf4117cdbcf9f22404bd254" title="List of all basic Irrlicht GUI elements.">EGUI_ELEMENT_TYPE</a> <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#66f6dc2bdab5e69a90b332abe4fdddbd" title="Returns the type of the gui element.">getType</a>()<span class="keyword"> const</span> <a name="l00797"></a>00797 <span class="keyword"> </span>{ <a name="l00798"></a>00798 <span class="keywordflow">return</span> <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#d362880afa8ccb537b04032340e989e9" title="type of element">Type</a>; <a name="l00799"></a>00799 } <a name="l00800"></a>00800 <a name="l00801"></a>00801 <a name="l00803"></a>00803 <a name="l00805"></a><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#02066215f971ceedf2347c9fc69cb647">00805</a> <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="namespaceirr.html#9395eaea339bcb546b319e9c96bf7410" title="8 bit character variable.">c8</a>* <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#02066215f971ceedf2347c9fc69cb647" title="Returns the type name of the gui element.">getTypeName</a>()<span class="keyword"> const</span> <a name="l00806"></a>00806 <span class="keyword"> </span>{ <a name="l00807"></a>00807 <span class="keywordflow">return</span> <a class="code" href="namespaceirr_1_1gui.html#fd5c3c406438f3b6df63b9c53c0464e3" title="Names for built-in element types.">GUIElementTypeNames</a>[<a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#d362880afa8ccb537b04032340e989e9" title="type of element">Type</a>]; <a name="l00808"></a>00808 } <a name="l00809"></a>00809 <a name="l00810"></a>00810 <a name="l00812"></a>00812 <a name="l00814"></a><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#877be2990b1afbb287dd525c5f33b704">00814</a> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#877be2990b1afbb287dd525c5f33b704" title="Writes attributes of the scene node.">serializeAttributes</a>(<a class="code" href="classirr_1_1io_1_1_i_attributes.html" title="Provides a generic interface for attributes and their values and the possiblity to...">io::IAttributes</a>* out, <a class="code" href="structirr_1_1io_1_1_s_attribute_read_write_options.html" title="struct holding data describing options">io::SAttributeReadWriteOptions</a>* options=0)<span class="keyword"> const</span> <a name="l00815"></a>00815 <span class="keyword"> </span>{ <a name="l00816"></a>00816 out-><a class="code" href="classirr_1_1io_1_1_i_attributes.html#fbde111f36d59e9cf42b20595cf2ed24" title="Adds an attribute as integer.">addInt</a>(<span class="stringliteral">"Id"</span>, <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#73a25c6d25bd673d92210fc2d60d916e" title="id">ID</a> ); <a name="l00817"></a>00817 out-><a class="code" href="classirr_1_1io_1_1_i_attributes.html#051f092d809f9d40215a1480d9d69afc" title="Adds an attribute as string.">addString</a>(<span class="stringliteral">"Caption"</span>, <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#cf2e01dbdbd468cb8e2e148b2463d406" title="Returns caption of this element.">getText</a>()); <a name="l00818"></a>00818 out-><a class="code" href="classirr_1_1io_1_1_i_attributes.html#b96f842013ac61bb75a460c073d90c57" title="Adds an attribute as rectangle.">addRect</a>(<span class="stringliteral">"Rect"</span>, <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#d85b5d446a0dfb2fa46ee3753e664cd2">DesiredRect</a>); <a name="l00819"></a>00819 out-><a class="code" href="classirr_1_1io_1_1_i_attributes.html#e875ea8d21955b4945b3d2d4f6e739fe" title="Adds an attribute as 2d position.">addPosition2d</a>(<span class="stringliteral">"MinSize"</span>, <a class="code" href="classirr_1_1core_1_1vector2d.html" title="2d vector template class with lots of operators and methods.">core::position2di</a>(<a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#a604d54c9ebcae3b1bf053411a5cf60f">MinSize</a>.<a class="code" href="classirr_1_1core_1_1dimension2d.html#0399dcc023c19d381d1a192596107db4" title="Width of the dimension.">Width</a>, <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#a604d54c9ebcae3b1bf053411a5cf60f">MinSize</a>.<a class="code" href="classirr_1_1core_1_1dimension2d.html#89b253523d31336c6b2a6a56dfd48a6b" title="Height of the dimension.">Height</a>)); <a name="l00820"></a>00820 out-><a class="code" href="classirr_1_1io_1_1_i_attributes.html#e875ea8d21955b4945b3d2d4f6e739fe" title="Adds an attribute as 2d position.">addPosition2d</a>(<span class="stringliteral">"MaxSize"</span>, <a class="code" href="classirr_1_1core_1_1vector2d.html" title="2d vector template class with lots of operators and methods.">core::position2di</a>(<a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#1649a1c740c333bfb026397411c4da95" title="maximum and minimum size of the element">MaxSize</a>.<a class="code" href="classirr_1_1core_1_1dimension2d.html#0399dcc023c19d381d1a192596107db4" title="Width of the dimension.">Width</a>, <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#1649a1c740c333bfb026397411c4da95" title="maximum and minimum size of the element">MaxSize</a>.<a class="code" href="classirr_1_1core_1_1dimension2d.html#89b253523d31336c6b2a6a56dfd48a6b" title="Height of the dimension.">Height</a>)); <a name="l00821"></a>00821 out-><a class="code" href="classirr_1_1io_1_1_i_attributes.html#f03f3c31e9dadc98d875f993a8995819" title="Adds an attribute as enum.">addEnum</a>(<span class="stringliteral">"LeftAlign"</span>, <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#09873f314caf3144ebf470ccaa22762a" title="tells the element how to act when its parent is resized">AlignLeft</a>, <a class="code" href="namespaceirr_1_1gui.html#356f87c7a79af136d7128f4cf2a3ad9a" title="Names for alignments.">GUIAlignmentNames</a>); <a name="l00822"></a>00822 out-><a class="code" href="classirr_1_1io_1_1_i_attributes.html#f03f3c31e9dadc98d875f993a8995819" title="Adds an attribute as enum.">addEnum</a>(<span class="stringliteral">"RightAlign"</span>, <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#c0c5d7f233ebd05d535e9e9cf25f03fe">AlignRight</a>, <a class="code" href="namespaceirr_1_1gui.html#356f87c7a79af136d7128f4cf2a3ad9a" title="Names for alignments.">GUIAlignmentNames</a>); <a name="l00823"></a>00823 out-><a class="code" href="classirr_1_1io_1_1_i_attributes.html#f03f3c31e9dadc98d875f993a8995819" title="Adds an attribute as enum.">addEnum</a>(<span class="stringliteral">"TopAlign"</span>, <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#bf9113bebfcde09e7f4a82269d6e2da1">AlignTop</a>, <a class="code" href="namespaceirr_1_1gui.html#356f87c7a79af136d7128f4cf2a3ad9a" title="Names for alignments.">GUIAlignmentNames</a>); <a name="l00824"></a>00824 out-><a class="code" href="classirr_1_1io_1_1_i_attributes.html#f03f3c31e9dadc98d875f993a8995819" title="Adds an attribute as enum.">addEnum</a>(<span class="stringliteral">"BottomAlign"</span>, <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#4204f1300a03ea597a48c5b4cfe134c0">AlignBottom</a>, <a class="code" href="namespaceirr_1_1gui.html#356f87c7a79af136d7128f4cf2a3ad9a" title="Names for alignments.">GUIAlignmentNames</a>); <a name="l00825"></a>00825 out-><a class="code" href="classirr_1_1io_1_1_i_attributes.html#3335f912c0dfcf0e88f662796314123b" title="Adds an attribute as bool.">addBool</a>(<span class="stringliteral">"Visible"</span>, <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#d8dd8fdfb5be3e4cca1f1603cbcfaccf" title="is visible?">IsVisible</a>); <a name="l00826"></a>00826 out-><a class="code" href="classirr_1_1io_1_1_i_attributes.html#3335f912c0dfcf0e88f662796314123b" title="Adds an attribute as bool.">addBool</a>(<span class="stringliteral">"Enabled"</span>, <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#ba90d3c36184d3b6d62a8856a8734590" title="is enabled?">IsEnabled</a>); <a name="l00827"></a>00827 out-><a class="code" href="classirr_1_1io_1_1_i_attributes.html#3335f912c0dfcf0e88f662796314123b" title="Adds an attribute as bool.">addBool</a>(<span class="stringliteral">"TabStop"</span>, <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#f98dfbfc8776221b3a70ceea43fc4f9a" title="tab stop like in windows">IsTabStop</a>); <a name="l00828"></a>00828 out-><a class="code" href="classirr_1_1io_1_1_i_attributes.html#3335f912c0dfcf0e88f662796314123b" title="Adds an attribute as bool.">addBool</a>(<span class="stringliteral">"TabGroup"</span>, <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#8ea1b4a60653c8cc157e806e14ae0558" title="tab groups are containers like windows, use ctrl+tab to navigate">IsTabGroup</a>); <a name="l00829"></a>00829 out-><a class="code" href="classirr_1_1io_1_1_i_attributes.html#fbde111f36d59e9cf42b20595cf2ed24" title="Adds an attribute as integer.">addInt</a>(<span class="stringliteral">"TabOrder"</span>, <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#90fcd9d502bb0f6e8e5f2d091f54bafb" title="tab order">TabOrder</a>); <a name="l00830"></a>00830 out-><a class="code" href="classirr_1_1io_1_1_i_attributes.html#3335f912c0dfcf0e88f662796314123b" title="Adds an attribute as bool.">addBool</a>(<span class="stringliteral">"NoClip"</span>, <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#8f9ad427fe094e0e8c49cf205c606526" title="does this element ignore its parent&#39;s clipping rectangle?">NoClip</a>); <a name="l00831"></a>00831 } <a name="l00832"></a>00832 <a name="l00833"></a>00833 <a name="l00835"></a>00835 <a name="l00837"></a><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#f71b96163b8d95816cd9c80fbf413b4d">00837</a> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#f71b96163b8d95816cd9c80fbf413b4d" title="Reads attributes of the scene node.">deserializeAttributes</a>(<a class="code" href="classirr_1_1io_1_1_i_attributes.html" title="Provides a generic interface for attributes and their values and the possiblity to...">io::IAttributes</a>* in, <a class="code" href="structirr_1_1io_1_1_s_attribute_read_write_options.html" title="struct holding data describing options">io::SAttributeReadWriteOptions</a>* options=0) <a name="l00838"></a>00838 { <a name="l00839"></a>00839 <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#55bad0e14306765e1fb734c56b729ba4" title="Sets the id of this element.">setID</a>(in-><a class="code" href="classirr_1_1io_1_1_i_attributes.html#753cca00d54d1e36f6ef9c4e04b2ab01">getAttributeAsInt</a>(<span class="stringliteral">"Id"</span>)); <a name="l00840"></a>00840 <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#8f864c26d4b2ee3551c53d3ebf870656" title="Sets the new caption of this element.">setText</a>(in-><a class="code" href="classirr_1_1io_1_1_i_attributes.html#874219751c3a52d781cdfa372cd8bcf5">getAttributeAsStringW</a>(<span class="stringliteral">"Caption"</span>).<a class="code" href="classirr_1_1core_1_1string.html#4abad222c478c108096ee9297870068c" title="Returns character string.">c_str</a>()); <a name="l00841"></a>00841 <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#ed537cb0b16c670b8f895179f0027bad" title="Sets the visible state of this element.">setVisible</a>(in-><a class="code" href="classirr_1_1io_1_1_i_attributes.html#197407f5b0f1d0c1aefab3e1b8d7c02d">getAttributeAsBool</a>(<span class="stringliteral">"Visible"</span>)); <a name="l00842"></a>00842 <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#2e3fd4a5f1ae52296f98cf36fdcffd1b" title="Sets the enabled state of this element.">setEnabled</a>(in-><a class="code" href="classirr_1_1io_1_1_i_attributes.html#197407f5b0f1d0c1aefab3e1b8d7c02d">getAttributeAsBool</a>(<span class="stringliteral">"Enabled"</span>)); <a name="l00843"></a>00843 <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#f98dfbfc8776221b3a70ceea43fc4f9a" title="tab stop like in windows">IsTabStop</a> = in-><a class="code" href="classirr_1_1io_1_1_i_attributes.html#197407f5b0f1d0c1aefab3e1b8d7c02d">getAttributeAsBool</a>(<span class="stringliteral">"TabStop"</span>); <a name="l00844"></a>00844 <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#8ea1b4a60653c8cc157e806e14ae0558" title="tab groups are containers like windows, use ctrl+tab to navigate">IsTabGroup</a> = in-><a class="code" href="classirr_1_1io_1_1_i_attributes.html#197407f5b0f1d0c1aefab3e1b8d7c02d">getAttributeAsBool</a>(<span class="stringliteral">"TabGroup"</span>); <a name="l00845"></a>00845 <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#90fcd9d502bb0f6e8e5f2d091f54bafb" title="tab order">TabOrder</a> = in-><a class="code" href="classirr_1_1io_1_1_i_attributes.html#753cca00d54d1e36f6ef9c4e04b2ab01">getAttributeAsInt</a>(<span class="stringliteral">"TabOrder"</span>); <a name="l00846"></a>00846 <a name="l00847"></a>00847 <a class="code" href="classirr_1_1core_1_1vector2d.html" title="2d vector template class with lots of operators and methods.">core::position2di</a> p = in-><a class="code" href="classirr_1_1io_1_1_i_attributes.html#bedde01b678c482be20735e4d730942f">getAttributeAsPosition2d</a>(<span class="stringliteral">"MaxSize"</span>); <a name="l00848"></a>00848 <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#e80ad7253fb9fb2ebbeda2a8148fff3e" title="Sets the maximum size allowed for this element.">setMaxSize</a>(<a class="code" href="classirr_1_1core_1_1dimension2d.html" title="Specifies a 2 dimensional size.">core::dimension2du</a>(p.<a class="code" href="classirr_1_1core_1_1vector2d.html#8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a>,p.<a class="code" href="classirr_1_1core_1_1vector2d.html#a4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a>)); <a name="l00849"></a>00849 <a name="l00850"></a>00850 p = in-><a class="code" href="classirr_1_1io_1_1_i_attributes.html#bedde01b678c482be20735e4d730942f">getAttributeAsPosition2d</a>(<span class="stringliteral">"MinSize"</span>); <a name="l00851"></a>00851 <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#e1ddcdd58af93fea900bd6295d4d8e61" title="Sets the minimum size allowed for this element.">setMinSize</a>(<a class="code" href="classirr_1_1core_1_1dimension2d.html" title="Specifies a 2 dimensional size.">core::dimension2du</a>(p.<a class="code" href="classirr_1_1core_1_1vector2d.html#8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a>,p.<a class="code" href="classirr_1_1core_1_1vector2d.html#a4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a>)); <a name="l00852"></a>00852 <a name="l00853"></a>00853 <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#1eb3d7ec13ebbf8c73859810088f666b">setAlignment</a>((<a class="code" href="namespaceirr_1_1gui.html#19eb5fb40e67f108cb16aba922ddaa2d">EGUI_ALIGNMENT</a>) in-><a class="code" href="classirr_1_1io_1_1_i_attributes.html#2a204c332735a0b15fa555ae6e785214">getAttributeAsEnumeration</a>(<span class="stringliteral">"LeftAlign"</span>, <a class="code" href="namespaceirr_1_1gui.html#356f87c7a79af136d7128f4cf2a3ad9a" title="Names for alignments.">GUIAlignmentNames</a>), <a name="l00854"></a>00854 (<a class="code" href="namespaceirr_1_1gui.html#19eb5fb40e67f108cb16aba922ddaa2d">EGUI_ALIGNMENT</a>)in-><a class="code" href="classirr_1_1io_1_1_i_attributes.html#2a204c332735a0b15fa555ae6e785214">getAttributeAsEnumeration</a>(<span class="stringliteral">"RightAlign"</span>, <a class="code" href="namespaceirr_1_1gui.html#356f87c7a79af136d7128f4cf2a3ad9a" title="Names for alignments.">GUIAlignmentNames</a>), <a name="l00855"></a>00855 (<a class="code" href="namespaceirr_1_1gui.html#19eb5fb40e67f108cb16aba922ddaa2d">EGUI_ALIGNMENT</a>)in-><a class="code" href="classirr_1_1io_1_1_i_attributes.html#2a204c332735a0b15fa555ae6e785214">getAttributeAsEnumeration</a>(<span class="stringliteral">"TopAlign"</span>, <a class="code" href="namespaceirr_1_1gui.html#356f87c7a79af136d7128f4cf2a3ad9a" title="Names for alignments.">GUIAlignmentNames</a>), <a name="l00856"></a>00856 (<a class="code" href="namespaceirr_1_1gui.html#19eb5fb40e67f108cb16aba922ddaa2d">EGUI_ALIGNMENT</a>)in-><a class="code" href="classirr_1_1io_1_1_i_attributes.html#2a204c332735a0b15fa555ae6e785214">getAttributeAsEnumeration</a>(<span class="stringliteral">"BottomAlign"</span>, <a class="code" href="namespaceirr_1_1gui.html#356f87c7a79af136d7128f4cf2a3ad9a" title="Names for alignments.">GUIAlignmentNames</a>)); <a name="l00857"></a>00857 <a name="l00858"></a>00858 <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#0e5bb2d0a2e88e30d3697652f8dd7034" title="Sets the relative rectangle of this element.">setRelativePosition</a>(in-><a class="code" href="classirr_1_1io_1_1_i_attributes.html#c2d077105e2e7c263ea181f67a005cc2">getAttributeAsRect</a>(<span class="stringliteral">"Rect"</span>)); <a name="l00859"></a>00859 <a name="l00860"></a>00860 <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#814d322989acafa74c895e5c13908b86" title="Sets whether the element will ignore its parent&#39;s clipping rectangle.">setNotClipped</a>(in-><a class="code" href="classirr_1_1io_1_1_i_attributes.html#197407f5b0f1d0c1aefab3e1b8d7c02d">getAttributeAsBool</a>(<span class="stringliteral">"NoClip"</span>)); <a name="l00861"></a>00861 } <a name="l00862"></a>00862 <a name="l00863"></a>00863 <span class="keyword">protected</span>: <a name="l00864"></a>00864 <a name="l00866"></a><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#90a100897814da93cbbf45f12bbf0198">00866</a> <a class="code" href="classirr_1_1core_1_1list.html" title="Doubly linked list template.">core::list<IGUIElement*></a> <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#90a100897814da93cbbf45f12bbf0198" title="List of all children of this element.">Children</a>; <a name="l00867"></a>00867 <a name="l00869"></a><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#d769c75857869ecdfe0b021699d934ef">00869</a> <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html" title="Base class of all GUI elements.">IGUIElement</a>* <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#d769c75857869ecdfe0b021699d934ef" title="Pointer to the parent.">Parent</a>; <a name="l00870"></a>00870 <a name="l00872"></a><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#f093935f3d5f6c3efedddc8bcdf7fc82">00872</a> <a class="code" href="classirr_1_1core_1_1rect.html" title="Rectangle template.">core::rect<s32></a> <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#f093935f3d5f6c3efedddc8bcdf7fc82" title="relative rect of element">RelativeRect</a>; <a name="l00873"></a>00873 <a name="l00875"></a><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#05ba78d5e6f11c5a64d9da2fcfd4ded1">00875</a> <a class="code" href="classirr_1_1core_1_1rect.html" title="Rectangle template.">core::rect<s32></a> <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#05ba78d5e6f11c5a64d9da2fcfd4ded1" title="absolute rect of element">AbsoluteRect</a>; <a name="l00876"></a>00876 <a name="l00878"></a><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#1000af90afbbe92344fb000f5af5c8fb">00878</a> <a class="code" href="classirr_1_1core_1_1rect.html" title="Rectangle template.">core::rect<s32></a> <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#1000af90afbbe92344fb000f5af5c8fb" title="absolute clipping rect of element">AbsoluteClippingRect</a>; <a name="l00879"></a>00879 <a name="l00882"></a><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#d85b5d446a0dfb2fa46ee3753e664cd2">00882</a> <a class="code" href="classirr_1_1core_1_1rect.html" title="Rectangle template.">core::rect<s32></a> <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#d85b5d446a0dfb2fa46ee3753e664cd2">DesiredRect</a>; <a name="l00883"></a>00883 <a name="l00885"></a><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#02f0934eefcc2191cfd665daf529ce0b">00885</a> <a class="code" href="classirr_1_1core_1_1rect.html" title="Rectangle template.">core::rect<s32></a> <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#02f0934eefcc2191cfd665daf529ce0b" title="for calculating the difference when resizing parent">LastParentRect</a>; <a name="l00886"></a>00886 <a name="l00888"></a><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#f8fc66b7504e9a073b02fc69a63f0b49">00888</a> <a class="code" href="classirr_1_1core_1_1rect.html" title="Rectangle template.">core::rect<f32></a> <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#f8fc66b7504e9a073b02fc69a63f0b49" title="relative scale of the element inside its parent">ScaleRect</a>; <a name="l00889"></a>00889 <a name="l00891"></a><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#a604d54c9ebcae3b1bf053411a5cf60f">00891</a> <a class="code" href="classirr_1_1core_1_1dimension2d.html" title="Specifies a 2 dimensional size.">core::dimension2du</a> <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#1649a1c740c333bfb026397411c4da95" title="maximum and minimum size of the element">MaxSize</a>, <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#a604d54c9ebcae3b1bf053411a5cf60f">MinSize</a>; <a name="l00892"></a>00892 <a name="l00894"></a><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#d8dd8fdfb5be3e4cca1f1603cbcfaccf">00894</a> <span class="keywordtype">bool</span> <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#d8dd8fdfb5be3e4cca1f1603cbcfaccf" title="is visible?">IsVisible</a>; <a name="l00895"></a>00895 <a name="l00897"></a><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#ba90d3c36184d3b6d62a8856a8734590">00897</a> <span class="keywordtype">bool</span> <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#ba90d3c36184d3b6d62a8856a8734590" title="is enabled?">IsEnabled</a>; <a name="l00898"></a>00898 <a name="l00900"></a><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#19f65c7004c5b36c848dad776aabc151">00900</a> <span class="keywordtype">bool</span> <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#19f65c7004c5b36c848dad776aabc151" title="is a part of a larger whole and should not be serialized?">IsSubElement</a>; <a name="l00901"></a>00901 <a name="l00903"></a><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#8f9ad427fe094e0e8c49cf205c606526">00903</a> <span class="keywordtype">bool</span> <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#8f9ad427fe094e0e8c49cf205c606526" title="does this element ignore its parent&#39;s clipping rectangle?">NoClip</a>; <a name="l00904"></a>00904 <a name="l00906"></a><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#f37f64cdacde0959e4993d01f555eba8">00906</a> <a class="code" href="classirr_1_1core_1_1string.html">core::stringw</a> <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#f37f64cdacde0959e4993d01f555eba8" title="caption">Text</a>; <a name="l00907"></a>00907 <a name="l00909"></a><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#422166b880f7829ec4e7b31322df9061">00909</a> <a class="code" href="classirr_1_1core_1_1string.html">core::stringw</a> <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#422166b880f7829ec4e7b31322df9061" title="tooltip">ToolTipText</a>; <a name="l00910"></a>00910 <a name="l00912"></a><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#73a25c6d25bd673d92210fc2d60d916e">00912</a> <a class="code" href="namespaceirr.html#c66849b7a6ed16e30ebede579f9b47c6" title="32 bit signed variable.">s32</a> <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#73a25c6d25bd673d92210fc2d60d916e" title="id">ID</a>; <a name="l00913"></a>00913 <a name="l00915"></a><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#f98dfbfc8776221b3a70ceea43fc4f9a">00915</a> <span class="keywordtype">bool</span> <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#f98dfbfc8776221b3a70ceea43fc4f9a" title="tab stop like in windows">IsTabStop</a>; <a name="l00916"></a>00916 <a name="l00918"></a><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#90fcd9d502bb0f6e8e5f2d091f54bafb">00918</a> <a class="code" href="namespaceirr.html#c66849b7a6ed16e30ebede579f9b47c6" title="32 bit signed variable.">s32</a> <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#90fcd9d502bb0f6e8e5f2d091f54bafb" title="tab order">TabOrder</a>; <a name="l00919"></a>00919 <a name="l00921"></a><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#8ea1b4a60653c8cc157e806e14ae0558">00921</a> <span class="keywordtype">bool</span> <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#8ea1b4a60653c8cc157e806e14ae0558" title="tab groups are containers like windows, use ctrl+tab to navigate">IsTabGroup</a>; <a name="l00922"></a>00922 <a name="l00924"></a><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#bf9113bebfcde09e7f4a82269d6e2da1">00924</a> <a class="code" href="namespaceirr_1_1gui.html#19eb5fb40e67f108cb16aba922ddaa2d">EGUI_ALIGNMENT</a> <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#09873f314caf3144ebf470ccaa22762a" title="tells the element how to act when its parent is resized">AlignLeft</a>, <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#c0c5d7f233ebd05d535e9e9cf25f03fe">AlignRight</a>, <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#bf9113bebfcde09e7f4a82269d6e2da1">AlignTop</a>, <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#4204f1300a03ea597a48c5b4cfe134c0">AlignBottom</a>; <a name="l00925"></a>00925 <a name="l00927"></a><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#7ce2d55a64302d3df67a808a362f18bf">00927</a> <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_environment.html" title="GUI Environment. Used as factory and manager of all other GUI elements.">IGUIEnvironment</a>* <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#7ce2d55a64302d3df67a808a362f18bf" title="GUI Environment.">Environment</a>; <a name="l00928"></a>00928 <a name="l00930"></a><a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#d362880afa8ccb537b04032340e989e9">00930</a> <a class="code" href="namespaceirr_1_1gui.html#e4d66df0ecf4117cdbcf9f22404bd254" title="List of all basic Irrlicht GUI elements.">EGUI_ELEMENT_TYPE</a> <a class="code" href="classirr_1_1gui_1_1_i_g_u_i_element.html#d362880afa8ccb537b04032340e989e9" title="type of element">Type</a>; <a name="l00931"></a>00931 }; <a name="l00932"></a>00932 <a name="l00933"></a>00933 <a name="l00934"></a>00934 } <span class="comment">// end namespace gui</span> <a name="l00935"></a>00935 } <span class="comment">// end namespace irr</span> <a name="l00936"></a>00936 <a name="l00937"></a>00937 <span class="preprocessor">#endif</span> <a name="l00938"></a>00938 <span class="preprocessor"></span> </pre></div></div> <hr size="1"> <address style="align: right;"> <small> </small> </address> <table width="100%" border="0" cellspacing="0" cellpadding="2"> <tr> <td width="0"> <div align="left"><small><a href="http://irrlicht.sourceforge.net" target="_blank"><img src="irrlicht.png" alt="The Irrlicht Engine" align="middle" border=0 width=88 height=31></a></small></div></td> <td> <div align="left"><small><em><font size="2">The <a href="http://irrlicht.sourceforge.net" target="_blank">Irrlicht Engine</a> Documentation © 2003-2009 by Nikolaus Gebhardt. Generated on Sun Jan 10 09:24:03 2010 by <a href="http://www.doxygen.org" target="_blank">Doxygen</a> (1.5.6)</font></em></small></div></td> </tr> </table> <address style="align: right;"> </address> </body> </html>