1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
<html>
<head>
<title>Castle Game Engine: CastleUIControls: Class TUIControl</title>
<meta name="generator" content="PasDoc 0.13.0">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<link rel="StyleSheet" type="text/css" href="pasdoc.css">
</head>
<body>
<table class="container"><tr><td class="navigation">
<h2>Castle Game Engine</h2><p><a href="introduction.html" class="navigation">Introduction</a></p><p><a href="AllUnits.html" class="navigation">Units</a></p><p><a href="ClassHierarchy.html" class="navigation">Class Hierarchy</a></p><p><a href="AllClasses.html" class="navigation">Classes, Interfaces, Objects and Records</a></p><p><a href="AllTypes.html" class="navigation">Types</a></p><p><a href="AllVariables.html" class="navigation">Variables</a></p><p><a href="AllConstants.html" class="navigation">Constants</a></p><p><a href="AllFunctions.html" class="navigation">Functions and Procedures</a></p><p><a href="AllIdentifiers.html" class="navigation">Identifiers</a></p></td><td class="content">
<a name="TUIControl"></a><h1 class="cio">Class TUIControl</h1>
<table class="sections wide_list">
<tr>
<td><a class="section" href="#PasDoc-Description">Description</a></td><td><a class="section" href="#PasDoc-Hierarchy">Hierarchy</a></td><td>Fields</td><td><a class="section" href="#PasDoc-Methods">Methods</a></td><td><a class="section" href="#PasDoc-Properties">Properties</a></td></tr></table>
<a name="PasDoc-Description"></a><h2 class="unit">Unit</h2>
<p class="unitlink">
<a href="CastleUIControls.html">CastleUIControls</a></p>
<h2 class="declaration">Declaration</h2>
<p class="declaration">
<code>type TUIControl = class(<a class="normal" href="CastleUIControls.TInputListener.html">TInputListener</a>)</code></p>
<h2 class="description">Description</h2>
<p>
Basic user interface control class. All controls derive from this class, overriding chosen methods to react to some events. Various user interface containers (things that directly receive messages from something outside, like operating system, windowing library etc.) implement support for such controls.
<p>Control may handle mouse/keyboard input, see Press and Release methods.
<p>Various methods return boolean saying if input event is handled. The idea is that not handled events are passed to the next control suitable. Handled events are generally not processed more — otherwise the same event could be handled by more than one listener, which is bad. Generally, return <a class="normal" href="CastleUIControls.TInputListener.html#ExclusiveEvents">ExclusiveEvents</a> if anything (possibly) was done (you changed any field value etc.) as a result of this, and only return <code>False</code> when you're absolutely sure that nothing was done by this control.
<p>All screen (mouse etc.) coordinates passed here should be in the usual window system coordinates, that is (0, 0) is left-top window corner. (Note that this is contrary to the usual OpenGL 2D system, where (0, 0) is left-bottom window corner.)</p>
<a name="PasDoc-Hierarchy"></a><h2 class="hierarchy">Hierarchy</h2>
<ul class="hierarchy"><li class="ancestor">TComponent</li>
<li class="ancestor"><a class="normal" href="CastleUIControls.TInputListener.html">TInputListener</a></li>
<li class="thisitem">TUIControl</li></ul><h2 class="overview">Overview</h2>
<a name="PasDoc-Methods"></a><h3 class="summary">Methods</h3>
<table class="summary wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>constructor <b><a href="CastleUIControls.TUIControl.html#Create">Create</a></b>(AOwner: TComponent); override;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>destructor <b><a href="CastleUIControls.TUIControl.html#Destroy">Destroy</a></b>; override;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>function <b><a href="CastleUIControls.TUIControl.html#GetExists">GetExists</a></b>: boolean; virtual;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>function <b><a href="CastleUIControls.TUIControl.html#PositionInside">PositionInside</a></b>(const Position: <a href="CastleVectors.html#TVector2Single">TVector2Single</a>): boolean; virtual;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a href="CastleUIControls.TUIControl.html#BeforeRender">BeforeRender</a></b>; virtual;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a href="CastleUIControls.TUIControl.html#Render">Render</a></b>; virtual;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a href="CastleUIControls.TUIControl.html#Draw">Draw</a></b>; virtual; deprecated;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>function <b><a href="CastleUIControls.TUIControl.html#TooltipStyle">TooltipStyle</a></b>: <a href="CastleUIControls.html#TRenderStyle">TRenderStyle</a>; virtual;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>function <b><a href="CastleUIControls.TUIControl.html#TooltipExists">TooltipExists</a></b>: boolean; virtual;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a href="CastleUIControls.TUIControl.html#TooltipRender">TooltipRender</a></b>; virtual;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a href="CastleUIControls.TUIControl.html#GLContextOpen">GLContextOpen</a></b>; virtual;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a href="CastleUIControls.TUIControl.html#GLContextClose">GLContextClose</a></b>; virtual;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a href="CastleUIControls.TUIControl.html#SetFocused">SetFocused</a></b>(const Value: boolean); virtual;</code></td>
</tr>
</table>
<a name="PasDoc-Properties"></a><h3 class="summary">Properties</h3>
<table class="summary wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a href="CastleUIControls.TUIControl.html#RenderStyle">RenderStyle</a></b>: <a href="CastleUIControls.html#TRenderStyle">TRenderStyle</a> read FRenderStyle write FRenderStyle default rs2D;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a href="CastleUIControls.TUIControl.html#GLInitialized">GLInitialized</a></b>: boolean read FGLInitialized default false;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a href="CastleUIControls.TUIControl.html#DisableContextOpenClose">DisableContextOpenClose</a></b>: Cardinal
read FDisableContextOpenClose write FDisableContextOpenClose;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a href="CastleUIControls.TUIControl.html#Focused">Focused</a></b>: boolean read FFocused write <a href="CastleUIControls.TUIControl.html#SetFocused">SetFocused</a>;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="published.gif" alt="Published" title="Published"></a></td>
<td class="itemcode"><code>property <b><a href="CastleUIControls.TUIControl.html#Exists">Exists</a></b>: boolean read FExists write SetExists default true;</code></td>
</tr>
</table>
<h2 class="description">Description</h2>
<h3 class="detail">Methods</h3>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="Create"></a><code>constructor <b>Create</b>(AOwner: TComponent); override;</code></td>
</tr>
<tr><td colspan="2">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="Destroy"></a><code>destructor <b>Destroy</b>; override;</code></td>
</tr>
<tr><td colspan="2">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="GetExists"></a><code>function <b>GetExists</b>: boolean; virtual;</code></td>
</tr>
<tr><td colspan="2">
<p>
Return whether item really <a class="normal" href="CastleUIControls.TUIControl.html#Exists">exists</a>, see <a class="normal" href="CastleUIControls.TUIControl.html#Exists">Exists</a>. Non-existing item does not receive any of the render or input or update calls. They only receive <a class="normal" href="CastleUIControls.TUIControl.html#GLContextOpen">GLContextOpen</a>, <a class="normal" href="CastleUIControls.TUIControl.html#GLContextClose">GLContextClose</a>, <a class="normal" href="CastleUIControls.TInputListener.html#ContainerResize">ContainerResize</a> calls.
<p>It <a class="normal" href="CastleUIControls.TUIControl.html">TUIControl</a> class, this returns the value of <a class="normal" href="CastleUIControls.TUIControl.html#Exists">Exists</a> property. May be overridden in descendants, to return something more complicated, but it should always be a logical "and" with the inherited <a class="normal" href="CastleUIControls.TUIControl.html#GetExists">GetExists</a> implementation (so setting the <code><a class="normal" href="CastleUIControls.TUIControl.html#Exists">Exists</a> := false</code> will always work), like
<p></p>
<pre class="longcode">
Result := (<span class="pascal_keyword">inherited</span> GetExists) <span class="pascal_keyword">and</span> MyComplicatedConditionForExists;
</pre>
<p></p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="PositionInside"></a><code>function <b>PositionInside</b>(const Position: <a href="CastleVectors.html#TVector2Single">TVector2Single</a>): boolean; virtual;</code></td>
</tr>
<tr><td colspan="2">
<p>
Is given position inside this control. Returns always <code>False</code> in this class. Always treated like <code>False</code> when <a class="normal" href="CastleUIControls.TUIControl.html#GetExists">GetExists</a> returns <code>False</code>, so the implementation of this method only needs to make checks assuming that <a class="normal" href="CastleUIControls.TUIControl.html#GetExists">GetExists</a> = <code>True</code>.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="BeforeRender"></a><code>procedure <b>BeforeRender</b>; virtual;</code></td>
</tr>
<tr><td colspan="2">
<p>
Prepare your resources, right before drawing. Called only when <a class="normal" href="CastleUIControls.TUIControl.html#GetExists">GetExists</a> and <a class="normal" href="CastleUIControls.TUIControl.html#GLInitialized">GLInitialized</a>.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="Render"></a><code>procedure <b>Render</b>; virtual;</code></td>
</tr>
<tr><td colspan="2">
<p>
Render a control. Called only when <a class="normal" href="CastleUIControls.TUIControl.html#GetExists">GetExists</a> and <a class="normal" href="CastleUIControls.TUIControl.html#GLInitialized">GLInitialized</a>, you can depend on it in the implementation of this method.
<p>Before calling this method we always set some OpenGL state, and you can depend on it (and you can carelessly change it, as it will be reset again before rendering other control). (In Castle Game Engine < 5.1.0, the rules were more complicated and depending on <a class="normal" href="CastleUIControls.TUIControl.html#RenderStyle">RenderStyle</a>. This is no longer the case, <a class="normal" href="CastleUIControls.TUIControl.html#RenderStyle">RenderStyle</a> now determines only the render order, allowing <a class="normal" href="CastleSceneManager.TCastleSceneManager.html">TCastleSceneManager</a> to be used in the middle of 2D controls.)
<p>OpenGL state always set:
<p></p>
<ul class="paragraph_spacing">
<li><p><i>(For fixed-function pipeline.)</i> The 2D orthographic projection is always set at the beginning. Useful for 2D controls, 3D controls can just override projection matrix, e.g. use <a class="normal" href="CastleGLUtils.html#PerspectiveProjection">PerspectiveProjection</a>.</p></li>
<li><p><a class="normal" href="CastleGLUtils.html#GLViewport">glViewport</a> is set to include whole container.</p></li>
<li><p><i>(For fixed-function pipeline.)</i> The modelview matrix is set to identity. The matrix mode is always identity.</p></li>
<li><p>The raster position <i>(for fixed-function pipeline.)</i> and (deprecated) <a class="normal" href="CastleGLUtils.html#WindowPos">WindowPos</a> are set to 0,0.</p></li>
<li><p>Scissor is off, depth test is off.</p></li>
<li><p><i>(For fixed-function pipeline.)</i> Texturing, lighting, fog is off.</p></li>
</ul>
<p></p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="Draw"></a><code>procedure <b>Draw</b>; virtual; deprecated;</code></td>
</tr>
<tr><td colspan="2">
<p class="hint_directive">Warning: this symbol is deprecated.</p><p>
Deprecated, you should rather override <a class="normal" href="CastleUIControls.TUIControl.html#Render">Render</a> method.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="TooltipStyle"></a><code>function <b>TooltipStyle</b>: <a href="CastleUIControls.html#TRenderStyle">TRenderStyle</a>; virtual;</code></td>
</tr>
<tr><td colspan="2">
<p>
Render a tooltip of this control. If you want to have tooltip for this control detected, you have to override <a class="normal" href="CastleUIControls.TUIControl.html#TooltipExists">TooltipExists</a>. Then the TCastleWindowCustom.TooltipVisible will be detected, and your <a class="normal" href="CastleUIControls.TUIControl.html#TooltipRender">TooltipRender</a> will be called.
<p>The values of rs2D and rs3D are interpreted in the same way as <a class="normal" href="CastleUIControls.TUIControl.html#RenderStyle">RenderStyle</a>. And <a class="normal" href="CastleUIControls.TUIControl.html#TooltipRender">TooltipRender</a> is called in the same way as <a class="normal" href="CastleUIControls.TUIControl.html#Render">Render</a>, so e.g. you can safely assume that modelview matrix is identity and (for 2D) <a class="normal" href="CastleGLUtils.html#WindowPos">WindowPos</a> is zero. <a class="normal" href="CastleUIControls.TUIControl.html#TooltipRender">TooltipRender</a> is always called as a last (front-most) 2D or 3D control.
<p></p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="TooltipExists"></a><code>function <b>TooltipExists</b>: boolean; virtual;</code></td>
</tr>
<tr><td colspan="2">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="TooltipRender"></a><code>procedure <b>TooltipRender</b>; virtual;</code></td>
</tr>
<tr><td colspan="2">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="GLContextOpen"></a><code>procedure <b>GLContextOpen</b>; virtual;</code></td>
</tr>
<tr><td colspan="2">
<p>
Initialize your OpenGL resources.
<p>This is called when OpenGL context of the container is created, or when the control is added to the already existing context. In other words, this is the moment when you can initialize OpenGL resources, like display lists, VBOs, OpenGL texture names, etc.
<p>As an exception, this is called regardless of the <a class="normal" href="CastleUIControls.TUIControl.html#GetExists">GetExists</a> value. This way a control can prepare it's resources, regardless if it <a class="normal" href="CastleUIControls.TUIControl.html#Exists">exists</a> now.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="GLContextClose"></a><code>procedure <b>GLContextClose</b>; virtual;</code></td>
</tr>
<tr><td colspan="2">
<p>
Destroy your OpenGL resources.
<p>Called when OpenGL context of the container is destroyed. Also called when controls is removed from the container <code>Controls</code> list. Also called from the destructor.
<p>You should release here any resources that are tied to the OpenGL context. In particular, the ones created in <a class="normal" href="CastleUIControls.TUIControl.html#GLContextOpen">GLContextOpen</a>.
<p>As an exception, this is called regardless of the <a class="normal" href="CastleUIControls.TUIControl.html#GetExists">GetExists</a> value. This way a control can release it's resources, regardless if it <a class="normal" href="CastleUIControls.TUIControl.html#Exists">exists</a> now.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="SetFocused"></a><code>procedure <b>SetFocused</b>(const Value: boolean); virtual;</code></td>
</tr>
<tr><td colspan="2">
<p>
Called when this control becomes or stops being focused. In this class, they simply update Focused property.</p>
</td></tr>
</table>
<h3 class="detail">Properties</h3>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="RenderStyle"></a><code>property <b>RenderStyle</b>: <a href="CastleUIControls.html#TRenderStyle">TRenderStyle</a> read FRenderStyle write FRenderStyle default rs2D;</code></td>
</tr>
<tr><td colspan="2">
<p>
Determines the rendering order. All controls with <code>RenderStyle</code> = rs3D are drawn first. Then all the controls with <code>RenderStyle</code> = rs2D are drawn. Among the controls with equal <code>RenderStyle</code>, their order on <a class="normal" href="CastleUIControls.TUIContainer.html#Controls">TUIContainer.Controls</a> list determines the rendering order.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="GLInitialized"></a><code>property <b>GLInitialized</b>: boolean read FGLInitialized default false;</code></td>
</tr>
<tr><td colspan="2">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="DisableContextOpenClose"></a><code>property <b>DisableContextOpenClose</b>: Cardinal
read FDisableContextOpenClose write FDisableContextOpenClose;</code></td>
</tr>
<tr><td colspan="2">
<p>
When non-zero, control will not receive <a class="normal" href="CastleUIControls.TUIControl.html#GLContextOpen">GLContextOpen</a> and <a class="normal" href="CastleUIControls.TUIControl.html#GLContextClose">GLContextClose</a> events when it is added/removed from the <a class="normal" href="CastleUIControls.TUIContainer.html#Controls">TUIContainer.Controls</a> list.
<p>This can be useful as an optimization, to keep the OpenGL resources created even for controls that are not present on the <a class="normal" href="CastleUIControls.TUIContainer.html#Controls">TUIContainer.Controls</a> list. <i>This must used very, very carefully</i>, as bad things will happen if the actual OpenGL context will be destroyed while the control keeps the OpenGL resources (because it had <code>DisableContextOpenClose</code> > 0). The control will then remain having incorrect OpenGL resource handles, and will try to use them, causing OpenGL errors or at least weird display artifacts.
<p>Most of the time, when you think of using this, you should instead use the <a class="normal" href="CastleUIControls.TUIControl.html#Exists">TUIControl.Exists</a> property. This allows you to keep the control of the <a class="normal" href="CastleUIControls.TUIContainer.html#Controls">TUIContainer.Controls</a> list, and it will be receive <a class="normal" href="CastleUIControls.TUIControl.html#GLContextOpen">GLContextOpen</a> and <a class="normal" href="CastleUIControls.TUIControl.html#GLContextClose">GLContextClose</a> events as usual, but will not exist for all other purposes.
<p>Using this mechanism is only sensible if you want to reliably hide a control, but also allow readding it to the <a class="normal" href="CastleUIControls.TUIContainer.html#Controls">TUIContainer.Controls</a> list, and then you want to show it again. This is useful for <a class="normal" href="CastleWindowModes.html">CastleWindowModes</a>, that must push (and then pop) the controls, but then allows the caller to modify the controls list. And some games, e.g. castle1, add back some (but not all) of the just-hidden controls. For example the <a class="normal" href="CastleNotifications.TCastleNotifications.html">TCastleNotifications</a> instance is added back, to be visible even in the menu mode. This means that <a class="normal" href="CastleWindowModes.html">CastleWindowModes</a> cannot just modify the TUIContainer.Exists value, leaving the control on the <a class="normal" href="CastleUIControls.TUIContainer.html#Controls">TUIContainer.Controls</a> list: it would leave the <a class="normal" href="CastleUIControls.TUIControl.html">TUIControl</a> existing many times on the <a class="normal" href="CastleUIControls.TUIContainer.html#Controls">TUIContainer.Controls</a> list, with the undefined TUIContainer.Exists value.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="Focused"></a><code>property <b>Focused</b>: boolean read FFocused write <a href="CastleUIControls.TUIControl.html#SetFocused">SetFocused</a>;</code></td>
</tr>
<tr><td colspan="2">
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="published.gif" alt="Published" title="Published"></a></td>
<td class="itemcode"><a name="Exists"></a><code>property <b>Exists</b>: boolean read FExists write SetExists default true;</code></td>
</tr>
<tr><td colspan="2">
<p>
Not existing control is not visible, it doesn't receive input and generally doesn't exist from the point of view of user. You can also remove this from controls list (like <a class="normal" href="CastleWindow.TCastleWindowCustom.html#Controls">TCastleWindowCustom.Controls</a>), but often it's more comfortable to set this property to false.</p>
</td></tr>
</table>
<!-- Piwik -->
<script type="text/javascript">
var _paq = _paq || [];
_paq.push(["trackPageView"]);
_paq.push(["enableLinkTracking"]);
(function() {
var u=(("https:" == document.location.protocol) ? "https" : "http") + "://michalis.ii.uni.wroc.pl/piwik-castle-engine/";
_paq.push(["setTrackerUrl", u+"piwik.php"]);
_paq.push(["setSiteId", "1"]);
var d=document, g=d.createElement("script"), s=d.getElementsByTagName("script")[0]; g.type="text/javascript";
g.defer=true; g.async=true; g.src=u+"piwik.js"; s.parentNode.insertBefore(g,s);
})();
</script>
<!-- End Piwik Code -->
<noscript>
<!-- Piwik Image Tracker -->
<img src="http://michalis.ii.uni.wroc.pl/piwik-castle-engine/piwik.php?idsite=1&rec=1" style="border:0" alt="" />
<!-- End Piwik -->
</noscript>
<hr noshade size="1"><span class="appinfo"><em>Generated by <a href="http://pasdoc.sourceforge.net/">PasDoc 0.13.0</a> on 2015-06-15 04:43:12</em>
</span>
</td></tr></table></body></html>
|