Class TCastleDialog

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TCastleDialog = class abstract(TUIControl)

Description

Dialog box that can display a long text, with automatic vertical scrollbar. You can also add buttons at the bottom. You can also have an input text area. This can be used to make either a modal or non-modal dialog boxes.

See CastleMessages for routines that intensively use this dialog underneath, giving you easy MessageXxx routines that ask user for confirmation and such.

Hierarchy

Overview

Fields

Public Answered: boolean;

Methods

Public constructor Create(AOwner: TComponent); override;
Public destructor Destroy; override;
Public procedure Initialize( const TextList: TStringList; const ATextAlign: TTextAlign; const AButtons: array of TCastleButton; const ADrawInputText: boolean; const AInputText: string; const ABackground: TCastleImage);
Public procedure ContainerResize(const AContainerWidth, AContainerHeight: Cardinal); override;
Public procedure GLContextOpen; override;
Public procedure GLContextClose; override;
Public function Press(const Event: TInputPressRelease): boolean; override;
Public function Release(const Event: TInputPressRelease): boolean; override;
Public function Motion(const Event: TInputMotion): boolean; override;
Public procedure Update(const SecondsPassed: Single; var HandleInput: boolean); override;
Public procedure Render; override;
Public function PositionInside(const Position: TVector2Single): boolean; override;

Properties

Public property InputText: string read FInputText write SetInputText;

Description

Fields

Public Answered: boolean;

Set this to True to signal that modal dialog window should be closed. This is not magically handled — if you implement a modal dialog box, you should check in your loop whether something set Answered to True.

Methods

Public constructor Create(AOwner: TComponent); override;
 
Public destructor Destroy; override;
 
Public procedure Initialize( const TextList: TStringList; const ATextAlign: TTextAlign; const AButtons: array of TCastleButton; const ADrawInputText: boolean; const AInputText: string; const ABackground: TCastleImage);

Assign display stuff. Call this before adding control to Controls list. ABackground instance becomes owned by this component.

Public procedure ContainerResize(const AContainerWidth, AContainerHeight: Cardinal); override;
 
Public procedure GLContextOpen; override;
 
Public procedure GLContextClose; override;
 
Public function Press(const Event: TInputPressRelease): boolean; override;
 
Public function Release(const Event: TInputPressRelease): boolean; override;
 
Public function Motion(const Event: TInputMotion): boolean; override;
 
Public procedure Update(const SecondsPassed: Single; var HandleInput: boolean); override;
 
Public procedure Render; override;
 
Public function PositionInside(const Position: TVector2Single): boolean; override;
 

Properties

Public property InputText: string read FInputText write SetInputText;

Input text. Displayed only if DrawInputText.


Generated by PasDoc 0.13.0 on 2014-08-30 12:10:33