Unit CastleUIControls

DescriptionUsesClasses, Interfaces, Objects and RecordsFunctions and ProceduresTypesConstantsVariables

Description

User interface (2D) basic classes.

Uses

Overview

Classes, Interfaces, Objects and Records

Name Description
Object TTouch  
Class TTouchList  
Class TUIContainer Abstract user interface container.
Class TInputListener Base class for things that listen to user input: cameras and 2D controls.
Class TUIControl Basic user interface control class.
Class TUIRectangularControl TUIControl that has a position and takes some rectangular space on the container.
Class TUIControlList  
Class TGLContextEventList  

Functions and Procedures

function OnGLContextOpen: TGLContextEventList;
function OnGLContextClose: TGLContextEventList;

Types

TRenderStyle = (...);
TContainerEvent = procedure (Container: TUIContainer);
TContainerObjectEvent = procedure (Container: TUIContainer) of object;
TInputPressReleaseEvent = procedure (Container: TUIContainer; const Event: TInputPressRelease);
TInputMotionEvent = procedure (Container: TUIContainer; const Event: TInputMotion);
PTouch = ˆTTouch;
TUIControlDrawStyle = TRenderStyle deprecated;
TPositionRelative = (...);
TUIControlPos = TUIRectangularControl deprecated;
TGLContextEvent = procedure;

Constants

DefaultDpi = 96;
DefaultTooltipDelay = 1000;
DefaultTooltipDistance = 10;
ds2D = rs2D deprecated;
ds3D = rs3D deprecated;

Description

Functions and Procedures

function OnGLContextOpen: TGLContextEventList;

Global callbacks called when OpenGL context (like Lazarus TCastleControl or TCastleWindow) is open/closed. Useful for things that want to be notified about OpenGL context existence, but cannot refer to a particular instance of TCastleControl or TCastleWindow.

Note that we may have many OpenGL contexts (TCastleWindow or TCastleControl) open simultaneously. They all share OpenGL resources. OnGLContextOpen is called when first OpenGL context is open, that is: no previous context was open. OnGLContextClose is called when last OpenGL context is closed, that is: no more contexts remain open. Note that this implies that they may be called many times: e.g. if you open one window, then close it, then open another window then close it.

Callbacks on OnGLContextOpen are called from first to last. Callbacks on OnGLContextClose are called in reverse order, so OnGLContextClose[0] is called last.

function OnGLContextClose: TGLContextEventList;
 

Types

TRenderStyle = (...);

In what projection TUIControl.Render will be called. See TUIControl.Render, TUIControl.RenderStyle.

Values
  • rs2D:  
  • rs3D:  
TContainerEvent = procedure (Container: TUIContainer);
 
TContainerObjectEvent = procedure (Container: TUIContainer) of object;
 
TInputPressReleaseEvent = procedure (Container: TUIContainer; const Event: TInputPressRelease);
 
TInputMotionEvent = procedure (Container: TUIContainer; const Event: TInputMotion);
 
PTouch = ˆTTouch;
 
TUIControlDrawStyle = TRenderStyle deprecated;

Warning: this symbol is deprecated.

Deprecated name for TRenderStyle.

TPositionRelative = (...);

Position for relative layout of one control in respect to another.

This is for now used by TCastleOnScreenMenu.Position and TUIControlPos.AlignHorizontal, TUIControlPos.AlignVertical, to specify the alignment of TUIControl in respect to the container (TCastleWindow or TCastleControl). In the future, it will probably be used more.

This is used to talk both about position of the control and the container.

  1. When we talk about the position of the control (for example for TCastleOnScreenMenu.PositionRelativeMenu, or OurBorder for TUIControlPos.AlignHorizontal), it determines which border of the control to align.

  2. When we talk about the position of the container (for example for TCastleOnScreenMenu.PositionRelativeScreen or ContainerBorder for TUIControlPos.AlignHorizontal), this specifies the container border.

Meaning of the values:

  • prLow refers to the left (or bottom) border,

  • prMiddle refers to the middle,

  • prHigh refers to the right (or top) border.

In most cases you use equal both control and container borders. For example, both OurBorder and ContainerBorder are equal for TUIControlPos.AlignHorizontal call.

  • If both are prLow, then X/Y specify position of left/bottom control border relative to left/bottom container border. X/Y should be >= 0 if you want to see the control completely within the container.

  • If both are prMiddle, then X/Y (most often just 0/0) specify the shift between container middle to control middle. If X/Y are zero, then control is just in the middle of the container.

  • If both are prHigh, then X/Y specify position of right/top control border relative to right/top container border. X/Y should be <= 0 if you want to see the control completely within the container.

Values
  • prLow:  
  • prMiddle:  
  • prHigh:  
TUIControlPos = TUIRectangularControl deprecated;

Warning: this symbol is deprecated.

 
TGLContextEvent = procedure;
 

Constants

DefaultDpi = 96;

Default value for container's Dpi, as is usually set on desktops.

DefaultTooltipDelay = 1000;
 
DefaultTooltipDistance = 10;
 
ds2D = rs2D deprecated;

Warning: this symbol is deprecated.

Deprecated name for rs2D.

ds3D = rs3D deprecated;

Warning: this symbol is deprecated.

Deprecated name for rs3D.


Generated by PasDoc 0.13.0 on 2014-10-26 05:15:15