Class TCastleControl
Unit
Fmx.CastleControl
Declaration
type TCastleControl = class(TPresentedControl)
Description
Control rendering "Castle Game Engine" on FMX form.
Hierarchy
- TObject
- TPresentedControl
- TCastleControl
Overview
Methods
 |
procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Single); override; |
 |
procedure MouseMove(Shift: TShiftState; NewX, NewY: Single); override; |
 |
procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Single); override; |
 |
procedure MouseWheel(Shift: TShiftState; WheelDelta: Integer; var Handled: Boolean); override; |
 |
procedure KeyDown(var Key: Word; var KeyChar: WideChar; Shift: TShiftState); override; |
 |
procedure KeyUp(var Key: Word; var KeyChar: WideChar; Shift: TShiftState); override; |
 |
function DefinePresentationName: String; override; |
 |
procedure Resize; override; |
 |
procedure DoRootChanging(const NewRoot: IRoot); override; |
 |
procedure SetVisible(const AValue: Boolean); override; |
 |
constructor Create(AOwner: TComponent); override; |
 |
destructor Destroy; override; |
 |
procedure Paint; override; |
 |
procedure InternalHandleNeeded; |
 |
class procedure ProcessTasks; |
 |
class procedure ApplicationRun; |
Properties
Description
Methods
 |
procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Single); override; |
|
 |
procedure MouseMove(Shift: TShiftState; NewX, NewY: Single); override; |
|
 |
procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Single); override; |
|
 |
procedure MouseWheel(Shift: TShiftState; WheelDelta: Integer; var Handled: Boolean); override; |
|
 |
procedure KeyDown(var Key: Word; var KeyChar: WideChar; Shift: TShiftState); override; |
|
 |
procedure KeyUp(var Key: Word; var KeyChar: WideChar; Shift: TShiftState); override; |
|
 |
function DefinePresentationName: String; override; |
|
 |
procedure Resize; override; |
|
 |
procedure DoRootChanging(const NewRoot: IRoot); override; |
Not needed in the end // procedure DoRootChanged; override;
|
 |
procedure SetVisible(const AValue: Boolean); override; |
|
 |
constructor Create(AOwner: TComponent); override; |
|
 |
destructor Destroy; override; |
|
 |
procedure Paint; override; |
|
 |
procedure InternalHandleNeeded; |
If Handle not allocated yet, allocate it now. This makes sure we have OpenGL context created. Our OpenBackend must guarantee it, we want to initialize GLVersion afterwards etc.
|
 |
class procedure ProcessTasks; |
On some platforms (Linux now) if you call Application.ProcessMessages, make sure to also call this method. E.g.
while SomeCondition do
begin
Application.ProcessMessages;
TCastleControl.ProcessTasks;
end;
This does nothing on some other platforms (Windows) when it is not necessary and Application.ProcessMessages does all CGE job.
|
 |
class procedure ApplicationRun; |
On some platforms (Linux now) you cannot just call Application.Run, as we need to call CGE processing regularly. So instead call this method. This ensures that engine updates / renders regularly.
On some other platforms (Windows) this just calls Application.Run, which already makes engine processing correct.
|
Properties
 |
property Container: TContainer read FContainer; |
Access Castle Game Engine container properties and events, not specific for FMX.
|
 |
property Align; |
|
 |
property Anchors; |
|
 |
property OnClick; |
|
 |
property OnDblClick; |
|
 |
property Height; |
|
 |
property Width; |
|
 |
property Size; |
|
 |
property Position; |
|
 |
property Margins; |
|
 |
property TabStop default true; |
|
 |
property TabOrder; |
|
 |
property CanFocus default True; |
|
Generated by PasDoc 0.16.0.