Class TCastleControlContainer
Unit
CastleControl
Declaration
type TCastleControlContainer = class(TCastleContainer)
Description
TCastleContainer that cooperates with TCastleControl.
Hierarchy
Overview
Methods
Properties
 |
property DesignUrl: String read FDesignUrl write SetDesignUrl; |
Description
Methods
 |
function GetMousePosition: TVector2; override; |
|
 |
procedure SetMousePosition(const Value: TVector2); override; |
|
 |
procedure Invalidate; override; |
|
 |
function GLInitialized: boolean; override; |
|
 |
function PixelsWidth: Integer; override; |
|
 |
function PixelsHeight: Integer; override; |
|
 |
procedure SetInternalCursor(const Value: TMouseCursor); override; |
|
 |
procedure EventOpen(const OpenWindowsCount: Cardinal); override; |
|
 |
procedure EventClose(const OpenWindowsCount: Cardinal); override; |
|
 |
procedure EventUpdate; override; |
|
 |
procedure EventBeforeRender; override; |
|
 |
procedure EventRender; override; |
|
 |
procedure EventResize; override; |
|
 |
function DesignedComponent(const ComponentName: String; const Required: Boolean = true): TComponent; |
When the DesignUrl is set you can use this method to find loaded components. Like this:
MyButton := MyCastleControl.DesignedComponent('MyButton') as TCastleButton;
When the name is not found, raises exception (unless Required is False , then it returns Nil ).
See also
- DesignUrl
- Load and show the design (.castle-user-interface file).
|
Properties
 |
property DesignUrl: String read FDesignUrl write SetDesignUrl; |
Load and show the design (.castle-user-interface file). You can reference the loaded components by name using DesignedComponent.
If you have more complicated control flow, we recommend to leave this property empty, and split your management into a number of states (TCastleView) instead. In this case, load design using TCastleView.DesignUrl. This property makes it however easy to use .castle-user-interface in simple cases, when TCastleControl just shows one UI.
The design loaded here is visible also at design-time, when editing the form in Lazarus/Delphi. Though we have no way to edit it now in Lazarus/Delphi (you have to use CGE editor to edit the design), so it is just a preview in this case.
See https://castle-engine.io/control_on_form for documentation how to use TCastleControl.
|
Generated by PasDoc 0.16.0.