Class TCastleControl

Unit

Declaration

type TCastleControl = class(TPresentedControl)

Description

Control rendering "Castle Game Engine" on FMX form.

Source: src/delphi/fmx.castlecontrol.pas (line 64).

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.

Source: src/delphi/fmx.castlecontrol.pas (line 118).

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

This item has no description.

Source: src/delphi/fmx.castlecontrol.pas (line 120).

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

This item has no description.

Source: src/delphi/fmx.castlecontrol.pas (line 121).

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

This item has no description.

Source: src/delphi/fmx.castlecontrol.pas (line 123).

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

This item has no description.

Source: src/delphi/fmx.castlecontrol.pas (line 124).

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

This item has no description.

Source: src/delphi/fmx.castlecontrol.pas (line 125).

Protected function DefinePresentationName: String; override;

This item has no description.

Source: src/delphi/fmx.castlecontrol.pas (line 126).

Protected procedure Resize; override;

This item has no description.

Source: src/delphi/fmx.castlecontrol.pas (line 127).

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

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

Source: src/delphi/fmx.castlecontrol.pas (line 129).

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

This item has no description.

Source: src/delphi/fmx.castlecontrol.pas (line 130).

Public constructor Create(AOwner: TComponent); override;

This item has no description.

Source: src/delphi/fmx.castlecontrol.pas (line 132).

Public destructor Destroy; override;

This item has no description.

Source: src/delphi/fmx.castlecontrol.pas (line 133).

Public procedure Paint; override;

This item has no description.

Source: src/delphi/fmx.castlecontrol.pas (line 134).

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.

Source: src/delphi/fmx.castlecontrol.pas (line 140).

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.

Source: src/delphi/fmx.castlecontrol.pas (line 161).

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.

Source: src/delphi/fmx.castlecontrol.pas (line 171).

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.

Source: src/delphi/fmx.castlecontrol.pas (line 146).

Published property Container: TCastleControlContainer read GetContainer;

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

Source: src/delphi/fmx.castlecontrol.pas (line 175).

Published property Align;

This item has no description.

Source: src/delphi/fmx.castlecontrol.pas (line 177).

Published property Anchors;

This item has no description.

Source: src/delphi/fmx.castlecontrol.pas (line 178).

Published property OnClick;

This item has no description.

Source: src/delphi/fmx.castlecontrol.pas (line 179).

Published property OnDblClick;

This item has no description.

Source: src/delphi/fmx.castlecontrol.pas (line 180).

Published property Height;

This item has no description.

Source: src/delphi/fmx.castlecontrol.pas (line 181).

Published property Width;

This item has no description.

Source: src/delphi/fmx.castlecontrol.pas (line 182).

Published property Size;

This item has no description.

Source: src/delphi/fmx.castlecontrol.pas (line 183).

Published property Position;

This item has no description.

Source: src/delphi/fmx.castlecontrol.pas (line 184).

Published property Margins;

This item has no description.

Source: src/delphi/fmx.castlecontrol.pas (line 185).

Published property TabStop default true;

This item has no description.

Source: src/delphi/fmx.castlecontrol.pas (line 186).

Published property TabOrder;

This item has no description.

Source: src/delphi/fmx.castlecontrol.pas (line 187).

Published property CanFocus default True;

This item has no description.

Source: src/delphi/fmx.castlecontrol.pas (line 188).


Generated by PasDoc 0.17.0.snapshot.