Description | Hierarchy | Fields | Methods | Properties |
type TGUIElementFactory = class(TReferenceCounted)
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.
![]() |
function AddGUIElement(EType: TGUIElementType; Parent: TGUIElement): TGUIElement; overload; inline; |
![]() |
function AddGUIElement(const TypeName: AnsiString; Parent: TGUIElement): TGUIElement; overload; inline; |
![]() |
function GetCreatableGUIElementType(Index: LongInt): TGUIElementType; inline; |
![]() |
function GetCreatableGUIElementTypeName(Index: LongInt): AnsiString; overload; inline; |
![]() |
function GetCreatableGUIElementTypeName(EType: TGUIElementType): AnsiString; overload; inline; |
![]() |
property CreatableGUIElementTypeCount: LongInt read GetCreatableGUIElementCount; |
![]() |
function AddGUIElement(EType: TGUIElementType; Parent: TGUIElement): TGUIElement; overload; inline; |
Adds an element to the gui environment based on its type. Parameters
ReturnsPointer to the new element or nil if unsuccessful. |
![]() |
function AddGUIElement(const TypeName: AnsiString; Parent: TGUIElement): TGUIElement; overload; inline; |
Adds a GUI element to the GUI Environment based on its type name. Parameters
ReturnsThe new element or nil, if unsuccessfull. |
![]() |
function GetCreatableGUIElementType(Index: LongInt): TGUIElementType; inline; |
Returns the type of a creatable GUI element. |
![]() |
function GetCreatableGUIElementTypeName(Index: LongInt): AnsiString; overload; inline; |
Returns the type of a creatable GUI element. |
![]() |
function GetCreatableGUIElementTypeName(EType: TGUIElementType): AnsiString; overload; inline; |
Returns the type name of a creatable GUI element by its type. |
![]() |
property CreatableGUIElementTypeCount: LongInt read GetCreatableGUIElementCount; |
The amount of GUI element types this factory is able to create. |