Class TCastleControlContainer
Unit
Declaration
type TCastleControlContainer = class(TCastleContainer)
Description
TCastleContainer that cooperates with TCastleControl.
Hierarchy
- TObject
- TPersistent
- TComponent
- TCastleContainer
- TCastleControlContainer
Overview
Methods
![]() |
function GetMousePosition: TVector2; override; |
![]() |
procedure SetMousePosition(const Value: TVector2); override; |
![]() |
constructor Create(AParent: TCastleControl); reintroduce; |
![]() |
procedure Invalidate; override; |
![]() |
function GLInitialized: boolean; override; |
![]() |
function Width: Integer; override; |
![]() |
function Height: Integer; override; |
![]() |
procedure SetInternalCursor(const Value: TMouseCursor); override; |
![]() |
function SaveScreen(const SaveRect: TRectangle): TRGBImage; override; overload; |
![]() |
procedure EventOpen(const OpenWindowsCount: Cardinal); override; |
![]() |
procedure EventClose(const OpenWindowsCount: Cardinal); override; |
![]() |
function EventPress(const Event: TInputPressRelease): boolean; override; |
![]() |
function EventRelease(const Event: TInputPressRelease): boolean; override; |
![]() |
procedure EventUpdate; override; |
![]() |
procedure EventMotion(const Event: TInputMotion); override; |
![]() |
procedure EventBeforeRender; override; |
![]() |
procedure EventRender; override; |
![]() |
procedure EventResize; override; |
![]() |
function DesignedComponent(const ComponentName: String; const Required: Boolean = true): TComponent; |
Properties
![]() |
property DesignUrl: String read FDesignUrl write SetDesignUrl; |
Description
Methods
![]() |
function GetMousePosition: TVector2; override; |
This item has no description. |
![]() |
procedure SetMousePosition(const Value: TVector2); override; |
This item has no description. |
![]() |
constructor Create(AParent: TCastleControl); reintroduce; |
This item has no description. |
![]() |
procedure Invalidate; override; |
This item has no description. Showing description inherited from TCastleContainer.Invalidate.
Redraw the contents of of this window, at the nearest suitable time. This method does not redraw immediately (it does not call EventBeforeRender and EventRender inside), it only makes sure that they will be called very soon. Calling this on a closed container (with GLInitialized = |
![]() |
function GLInitialized: boolean; override; |
This item has no description. Showing description inherited from TCastleContainer.GLInitialized. Is the OpenGL context initialized. |
![]() |
function Width: Integer; override; |
This item has no description. Showing description inherited from TCastleContainer.Width.
Container size, in pixels. This is expressed in real device pixels. Prefer using UnscaledWidth instead of this. UnscaledWidth is more natural when you use UI scaling (UIScaling), and it's simply equal to |
![]() |
function Height: Integer; override; |
This item has no description. Showing description inherited from TCastleContainer.Height.
Container size, in pixels. This is expressed in real device pixels. Prefer using UnscaledHeight instead of this. UnscaledHeight is more natural when you use UI scaling (UIScaling), and it's simply equal to |
![]() |
procedure SetInternalCursor(const Value: TMouseCursor); override; |
This item has no description. |
![]() |
function SaveScreen(const SaveRect: TRectangle): TRGBImage; override; overload; |
This item has no description. |
![]() |
procedure EventOpen(const OpenWindowsCount: Cardinal); override; |
This item has no description. Showing description inherited from TCastleContainer.EventOpen. Propagate the event to all the Controls. You can call these methods explicitly if you want to "fake" some event, e.g. fake pressing or releasing a key by calling EventPress or EventRelease. Deprecated: these methods also call our (deprecated) callbacks like OnPress. These methods are called automatically by TCastleWindow or TCastleControl. So if you don't need to "fake" any event, you should not call them from your application. Note: EventUpdate is special in that it also calls (for now) EventJoyAxisMove, EventJoyButtonPress, EventSensorRotation, EventSensorTranslation. |
![]() |
procedure EventClose(const OpenWindowsCount: Cardinal); override; |
This item has no description. |
![]() |
function EventPress(const Event: TInputPressRelease): boolean; override; |
This item has no description. |
![]() |
function EventRelease(const Event: TInputPressRelease): boolean; override; |
This item has no description. |
![]() |
procedure EventUpdate; override; |
This item has no description. |
![]() |
procedure EventMotion(const Event: TInputMotion); override; |
This item has no description. |
![]() |
procedure EventBeforeRender; override; |
This item has no description. |
![]() |
procedure EventRender; override; |
This item has no description. |
![]() |
procedure EventResize; override; |
This item has no description. |
![]() |
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 See also
|
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-snapshot.