Class TGUIElementFactory

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TGUIElementFactory = class(TReferenceCounted)

Description

Interface making it possible to dynamically create GUI elements.
To be able to add custom elements to Irrlicht and to make it possible for the scene manager to save and load them, simply implement this interface and register it in your gui environment via TGUIEnvironment.RegisterGUIElementFactory.
Note: When implementing your own element factory, don't call TGUIEnvironment.Grab to increase the reference counter of the environment. This is not necessary because the it will Grab the factory anyway, and otherwise cyclic references will be created.

Hierarchy

Overview

Methods

Public function AddGUIElement(EType: TGUIElementType; Parent: TGUIElement): TGUIElement; overload; inline;
Public function AddGUIElement(const TypeName: AnsiString; Parent: TGUIElement): TGUIElement; overload; inline;
Public function GetCreatableGUIElementType(Index: LongInt): TGUIElementType; inline;
Public function GetCreatableGUIElementTypeName(Index: LongInt): AnsiString; overload; inline;
Public function GetCreatableGUIElementTypeName(EType: TGUIElementType): AnsiString; overload; inline;

Properties

Public property CreatableGUIElementTypeCount: LongInt read GetCreatableGUIElementCount;

Description

Methods

Public function AddGUIElement(EType: TGUIElementType; Parent: TGUIElement): TGUIElement; overload; inline;

Adds an element to the gui environment based on its type.

Parameters
Type
Type of the element to add.
Paren
Parent scene node of the new element, can be nil to add to the root.
Returns

Pointer to the new element or nil if unsuccessful.

Public function AddGUIElement(const TypeName: AnsiString; Parent: TGUIElement): TGUIElement; overload; inline;

Adds a GUI element to the GUI Environment based on its type name.

Parameters
TypeName
Type name of the element to add.
Parent
Parent scene node of the new element, can be null to add it to the ?
Returns

The new element or nil, if unsuccessfull.

Public function GetCreatableGUIElementType(Index: LongInt): TGUIElementType; inline;

Returns the type of a creatable GUI element.

Public function GetCreatableGUIElementTypeName(Index: LongInt): AnsiString; overload; inline;

Returns the type of a creatable GUI element.

Public function GetCreatableGUIElementTypeName(EType: TGUIElementType): AnsiString; overload; inline;

Returns the type name of a creatable GUI element by its type.

Properties

Public property CreatableGUIElementTypeCount: LongInt read GetCreatableGUIElementCount;

The amount of GUI element types this factory is able to create.
Use this count to iterate over the types with GetCreatable*().


Generated by PasDoc 0.12.1 on 2012-09-14 17:32:22