Unit CastleUIControls
Description
User interface basic classes: TCastleUserInterface, TUIContainer.
Uses
- SysUtils
- Classes
- Generics.Collections
- CastleKeysMouse
- CastleUtils
- CastleClassUtils
- CastleGLUtils
- CastleFonts
- CastleRectangles
- CastleTimeUtils
- CastleInternalPk3DConnexion
- CastleColors
- CastleImages
- CastleVectors
- CastleJoysticks
- CastleApplicationProperties
- CastleGLImages
- CastleRenderContext
- CastleComponentSerialize
Overview
Classes, Interfaces, Objects and Records
| Name | Description |
|---|---|
Object TTouch |
Tracking of a touch by a single finger, used by TTouchList. |
Class TTouchList |
Tracking of multi-touch, a position of each finger on the screen. |
Class TUIContainer |
Abstract user interface container. |
Class TInputListener |
Base class for things that listen to user input. |
Class TCastleUserInterface |
Basic user-interface class. |
Class TCastleUserInterfaceList |
Simple list of TCastleUserInterface instances. |
Class TChildrenControls |
List of UI controls, with a parent control and container. |
Functions and Procedures
function OnGLContextOpen: TGLContextEventList; deprecated 'use ApplicationProperties.OnGLContextOpen'; |
function OnGLContextClose: TGLContextEventList; deprecated 'use ApplicationProperties.OnGLContextClose'; |
function IsGLContextOpen: boolean; deprecated 'use ApplicationProperties.IsGLContextOpen'; |
function RenderControlToImage(const Container: TUIContainer; const Control: TCastleUserInterface; const ViewportRect: TRectangle; const BackgroundColor: TCastleColor): TRGBAlphaImage; overload; |
procedure UserInterfaceSave(const C: TCastleUserInterface; const Url: String); |
function UserInterfaceLoad(const Url: String; const Owner: TComponent): TCastleUserInterface; |
Types
Constants
DefaultDpi = 96.0; |
DefaultTooltipDelay = 1.0; |
DefaultTooltipDistance = 10; |
prLeft = prLow deprecated; |
prRight = prHigh deprecated; |
prBottom = prLow deprecated; |
prTop = prHigh deprecated; |
hpLeft = CastleRectangles.hpLeft ; |
hpMiddle = CastleRectangles.hpMiddle; |
hpRight = CastleRectangles.hpRight ; |
vpBottom = CastleRectangles.vpBottom; |
vpMiddle = CastleRectangles.vpMiddle; |
vpTop = CastleRectangles.vpTop ; |
Description
Functions and Procedures
function OnGLContextOpen: TGLContextEventList; deprecated 'use ApplicationProperties.OnGLContextOpen'; |
|
Warning: this symbol is deprecated: use ApplicationProperties.OnGLContextOpen |
function OnGLContextClose: TGLContextEventList; deprecated 'use ApplicationProperties.OnGLContextClose'; |
|
Warning: this symbol is deprecated: use ApplicationProperties.OnGLContextClose |
function IsGLContextOpen: boolean; deprecated 'use ApplicationProperties.IsGLContextOpen'; |
|
Warning: this symbol is deprecated: use ApplicationProperties.IsGLContextOpen |
function RenderControlToImage(const Container: TUIContainer; const Control: TCastleUserInterface; const ViewportRect: TRectangle; const BackgroundColor: TCastleColor): TRGBAlphaImage; overload; |
|
Render control contents to an RGBA image, using off-screen rendering. The background behind the control is filled with BackgroundColor (which may be transparent, e.g. with alpha = 0). The rendering is done using off-screen FBO. Which means that you can request any size, you are not limited to your current window / control size. Make sure that the control is nicely positioned to fill the ViewportRect. Usually you want to adjust control size and position, and disable UI scaling (set TCastleUserInterface.EnableUIScaling = This is the easiest way to make off-screen rendering, i.e. to render 3D things (like TCastleScene in TCastleViewport) into an image. This is not the fastest way, as it creates new TGLRenderToTexture instance each time, and it grabs the image contents to CPU. If you want a faster approach, use TUIContainer.RenderControl and render into TDrawableImage using TDrawableImage.RenderToImageBegin and TDrawableImage.RenderToImageEnd. |
procedure UserInterfaceSave(const C: TCastleUserInterface; const Url: String); |
|
Save / load TCastleUserInterface (or descendant) to a .castle-user-interface file. |
function UserInterfaceLoad(const Url: String; const Owner: TComponent): TCastleUserInterface; |
Types
TBorder = CastleVectors.TBorder; |
TContainerEvent = procedure (Container: TUIContainer); |
TContainerObjectEvent = procedure (Container: TUIContainer) of object; |
TInputPressReleaseEvent = procedure (Container: TUIContainer; const Event: TInputPressRelease); |
TInputMotionEvent = procedure (Container: TUIContainer; const Event: TInputMotion); |
TUiNotifyEvent = procedure (const Sender: TCastleUserInterface) of object; |
TUiUpdateEvent = procedure (const Sender: TInputListener; const SecondsPassed: Single; var HandleInput: Boolean) of object; |
TUiPressReleaseEvent = procedure (const Sender: TInputListener; const Event: TInputPressRelease; var Handled: Boolean) of object; |
TUiMotionEvent = procedure (const Sender: TInputListener; const Event: TInputMotion; var Handled: Boolean) of object; |
PTouch = ˆTTouch; |
TUIScaling = (...); |
|
Possible values for TUIContainer.UIScaling. Values
|
TCastleUserInterfaceChange = (...); |
|
Things that can cause TInputListener.VisibleChange notification. Values
|
TCastleUserInterfaceChanges = set of TCastleUserInterfaceChange; |
TCastleUserInterfaceChangeEvent = procedure(const Sender: TInputListener; const Changes: TCastleUserInterfaceChanges; const ChangeInitiatedByChildren: boolean) of object; |
TPositionRelative = (...) deprecated; |
|
Warning: this symbol is deprecated. Position for relative layout of one control in respect to another. Deprecated, rather use cleaner THorizontalPosition and TVerticalPosition. Values
|
TCastleUserInterfaceClass = class of TCastleUserInterface; |
TUIControlPos = TCastleUserInterface deprecated 'use TCastleUserInterface'; |
|
Warning: this symbol is deprecated: use TCastleUserInterface |
TUIRectangularControl = TCastleUserInterface deprecated 'use TCastleUserInterface'; |
|
Warning: this symbol is deprecated: use TCastleUserInterface |
TUIControl = TCastleUserInterface deprecated 'use TCastleUserInterface'; |
|
Warning: this symbol is deprecated: use TCastleUserInterface |
TUIControlSizeable = TCastleUserInterface deprecated 'use TCastleUserInterface'; |
|
Warning: this symbol is deprecated: use TCastleUserInterface |
TCastleUserInterfaceRect = TCastleUserInterface deprecated 'use TCastleUserInterface'; |
|
Warning: this symbol is deprecated: use TCastleUserInterface |
TUIControlChange = TCastleUserInterfaceChange; |
TUIControlChanges = TCastleUserInterfaceChanges; |
TUIControlList = TCastleUserInterfaceList; |
TUIControlChangeEvent = TCastleUserInterfaceChangeEvent; |
Constants
DefaultDpi = 96.0; |
|
Default value for container's Dpi, as is usually set on desktops. |
DefaultTooltipDelay = 1.0; |
DefaultTooltipDistance = 10; |
prLeft = prLow deprecated; |
|
Warning: this symbol is deprecated. |
prRight = prHigh deprecated; |
|
Warning: this symbol is deprecated. |
prBottom = prLow deprecated; |
|
Warning: this symbol is deprecated. |
prTop = prHigh deprecated; |
|
Warning: this symbol is deprecated. |
hpLeft = CastleRectangles.hpLeft ; |
hpMiddle = CastleRectangles.hpMiddle; |
hpRight = CastleRectangles.hpRight ; |
vpBottom = CastleRectangles.vpBottom; |
vpMiddle = CastleRectangles.vpMiddle; |
vpTop = CastleRectangles.vpTop ; |
Generated by PasDoc 0.16.0.