Class TUIElement

Unit

Declaration

type TUIElement = class(TInterfacedObject)

Description

Hierarchy

Overview

Methods

Protected procedure Paint(const AIsFocused: boolean); virtual;
Protected constructor Create(const AOwner: TUIElementsList); overload;
Protected constructor Create(const AOwner: TUIElementsList; const AOnClickProc: TNotifyProc); overload;
Protected constructor Create(const AOwner: TUIElementsList; const AOnClick: TNotifyEvent); overload;
Protected constructor Create(const AOwner: TUIElementsList; const ABounds: TUIElementBounds; const AOnClickProc: TNotifyProc = nil); overload;
Protected constructor Create(const AOwner: TUIElementsList; const ABounds: TUIElementBounds; const AOnClick: TNotifyEvent); overload;
Public procedure DoClick; virtual;
Public procedure DoPaint; virtual;
Public procedure KeyDown(var Key: Word; var KeyChar: WideChar; const Shift: TShiftState); virtual;
Public procedure GamepadButtonDown(const Button: TJoystickButtons; var Handled: boolean); virtual;
Public procedure SetFocus;
Public procedure ResetFocus;
Public destructor Destroy; override;

Properties

Public property Bounds: TUIElementBounds read FBounds write SetBounds;
Public property RightItem: TUIElement read FRightItem write SetRightItem;
Public property BottomItem: TUIElement read FBottomItem write SetBottomItem;
Public property LeftItem: TUIElement read FLeftItem write SetLeftItem;
Public property TopItem: TUIElement read FTopItem write SetTopItem;
Public property IsFocused: boolean read FIsFocused write SetIsFocused;
Public property GamePadButtons: TJoystickButtonsSet read FGamePadButtons write SetGamePadButtons;
Public property KeyShortcuts: TUIKeyShortCutList read FKeyShortcuts;
Public property OnClick: TNotifyEvent read FOnClick write SetOnClick;
Public property OnClickProc: TNotifyProc read FOnClickProc write SetOnClickProc;
Public property OnPaint: TNotifyEvent read FOnPaint write SetOnPaint;
Public property OnPaintProc: TNotifyProc read FOnPaintProc write SetOnPaintProc;
Public property Tag: integer read FTag write SetTag;
Public property TagBool: boolean read FTagBool write SetTagBool;
Public property TagFloat: single read FTagFloat write SetTagFloat;
Public property TagObject: TObject read FTagObject write SetTagObject;
Public property TagString: string read FTagString write SetTagString;

Description

Methods

Protected procedure Paint(const AIsFocused: boolean); virtual;
 
Protected constructor Create(const AOwner: TUIElementsList); overload;
 
Protected constructor Create(const AOwner: TUIElementsList; const AOnClickProc: TNotifyProc); overload;
 
Protected constructor Create(const AOwner: TUIElementsList; const AOnClick: TNotifyEvent); overload;
 
Protected constructor Create(const AOwner: TUIElementsList; const ABounds: TUIElementBounds; const AOnClickProc: TNotifyProc = nil); overload;
 
Protected constructor Create(const AOwner: TUIElementsList; const ABounds: TUIElementBounds; const AOnClick: TNotifyEvent); overload;
 
Public procedure DoClick; virtual;
 
Public procedure DoPaint; virtual;
 
Public procedure KeyDown(var Key: Word; var KeyChar: WideChar; const Shift: TShiftState); virtual;
 
Public procedure GamepadButtonDown(const Button: TJoystickButtons; var Handled: boolean); virtual;

If Handled is True, the button won't be propagated to the gamepad devices and components

Public procedure SetFocus;
 
Public procedure ResetFocus;
 
Public destructor Destroy; override;
 

Properties

Public property Bounds: TUIElementBounds read FBounds write SetBounds;
 
Public property RightItem: TUIElement read FRightItem write SetRightItem;
 
Public property BottomItem: TUIElement read FBottomItem write SetBottomItem;
 
Public property LeftItem: TUIElement read FLeftItem write SetLeftItem;
 
Public property TopItem: TUIElement read FTopItem write SetTopItem;
 
Public property IsFocused: boolean read FIsFocused write SetIsFocused;
 
Public property GamePadButtons: TJoystickButtonsSet read FGamePadButtons write SetGamePadButtons;
 
Public property KeyShortcuts: TUIKeyShortCutList read FKeyShortcuts;

TODO : pouvoir gérer un texte associé à chaque bouton (permettant de les lister depuis le layout en cours dans la liste des zones afin de les proposer à l'écran)

Public property OnClick: TNotifyEvent read FOnClick write SetOnClick;
 
Public property OnClickProc: TNotifyProc read FOnClickProc write SetOnClickProc;
 
Public property OnPaint: TNotifyEvent read FOnPaint write SetOnPaint;
 
Public property OnPaintProc: TNotifyProc read FOnPaintProc write SetOnPaintProc;
 
Public property Tag: integer read FTag write SetTag;
 
Public property TagBool: boolean read FTagBool write SetTagBool;
 
Public property TagFloat: single read FTagFloat write SetTagFloat;
 
Public property TagObject: TObject read FTagObject write SetTagObject;
 
Public property TagString: string read FTagString write SetTagString;
 
Delphi Game Engine (c) 2021-2025 Patrick PREMARTIN - Powered by PasDoc
Generated by PasDoc 0.16.0.