Class TCastleControl

Unit

Declaration

type TCastleControl = class(TPresentedControl)

Description

Control rendering "Castle Game Engine" on FMX form.

Hierarchy

  • TObject
  • TPresentedControl
  • TCastleControl

Overview

Methods

Protected procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Single); override;
Protected procedure MouseMove(Shift: TShiftState; NewX, NewY: Single); override;
Protected procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Single); override;
Protected procedure MouseWheel(Shift: TShiftState; WheelDelta: Integer; var Handled: Boolean); override;
Protected procedure KeyDown(var Key: Word; var KeyChar: WideChar; Shift: TShiftState); override;
Protected procedure KeyUp(var Key: Word; var KeyChar: WideChar; Shift: TShiftState); override;
Protected function DefinePresentationName: String; override;
Protected procedure Resize; override;
Protected procedure DoRootChanging(const NewRoot: IRoot); override;
Protected procedure SetVisible(const AValue: Boolean); override;
Public constructor Create(AOwner: TComponent); override;
Public destructor Destroy; override;
Public procedure Paint; override;
Public procedure InternalHandleNeeded;
Public class procedure ProcessTasks;
Public class procedure ApplicationRun;

Properties

Public property ControlType default TControlType.Platform;
Published property Container: TCastleControlContainer read GetContainer;
Published property Align;
Published property Anchors;
Published property OnClick;
Published property OnDblClick;
Published property Height;
Published property Width;
Published property Size;
Published property Position;
Published property Margins;
Published property TabStop default true;
Published property TabOrder;
Published property CanFocus default True;

Description

Methods

Protected procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Single); override;

This item has no description.

Protected procedure MouseMove(Shift: TShiftState; NewX, NewY: Single); override;

This item has no description.

Protected procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Single); override;

This item has no description.

Protected procedure MouseWheel(Shift: TShiftState; WheelDelta: Integer; var Handled: Boolean); override;

This item has no description.

Protected procedure KeyDown(var Key: Word; var KeyChar: WideChar; Shift: TShiftState); override;

This item has no description.

Protected procedure KeyUp(var Key: Word; var KeyChar: WideChar; Shift: TShiftState); override;

This item has no description.

Protected function DefinePresentationName: String; override;

This item has no description.

Protected procedure Resize; override;

This item has no description.

Protected procedure DoRootChanging(const NewRoot: IRoot); override;

Not needed in the end // procedure DoRootChanged; override;

Protected procedure SetVisible(const AValue: Boolean); override;

This item has no description.

Public constructor Create(AOwner: TComponent); override;

This item has no description.

Public destructor Destroy; override;

This item has no description.

Public procedure Paint; override;

This item has no description.

Public 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.

Public 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.

Public 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

Public property ControlType default TControlType.Platform;

This control must always have "native style", which means it has ControlType = Platform. See FMX docs about native controls: https://docwiki.embarcadero.com/RADStudio/Sydney/en/FireMonkey_Native_Windows_Controls Native controls are always on top of non-native controls.

Published property Container: TCastleControlContainer read GetContainer;

Access Castle Game Engine container properties and events, not specific to FMX.

Published property Align;

This item has no description.

Published property Anchors;

This item has no description.

Published property OnClick;

This item has no description.

Published property OnDblClick;

This item has no description.

Published property Height;

This item has no description.

Published property Width;

This item has no description.

Published property Size;

This item has no description.

Published property Position;

This item has no description.

Published property Margins;

This item has no description.

Published property TabStop default true;

This item has no description.

Published property TabOrder;

This item has no description.

Published property CanFocus default True;

This item has no description.


Generated by PasDoc 0.16.0-snapshot.