Description | Hierarchy | Fields | Methods | Properties |
type TGUIEnvironment = class(TReferenceCounted)
The engine's GUI Environment. Used as factory and manager of all other GUI elements.
![]() |
constructor Create(Ref: Pointer; NFileSystem: TFileSystem; NVideoDriver: TVideoDriver); |
![]() |
function AddButton(const Rectangle: TRect; Parent: TGUIElement = nil; ID: LongInt = -1; const Caption: StringType = ''; const ToolTip: StringType = ''): TGUIButton; inline; |
![]() |
function AddCheckBox(Checked: Boolean; const Rectangle: TRect; Parent: TGUIElement = nil; ID: LongInt = -1; const Caption: StringType = ''): TGUICheckBox; inline; |
![]() |
function AddColorSelectDialog(const Title: StringType = ''; Modal: Boolean = True; Parent: TGUIElement = nil; ID: LongInt = -1): TGUIColorSelectDialog; inline; |
![]() |
function AddComboBox(const Rectangle: TRect; Parent: TGUIElement = nil; ID: LongInt = -1): TGUIComboBox; inline; |
![]() |
function AddContextMenu(const Rectangle: TRect; Parent: TGUIElement = nil; ID: LongInt = -1): TGUIContextMenu; inline; |
![]() |
function AddEditBox(const Text: StringType; const Rectangle: TRect; Border: Boolean = True; Parent: TGUIElement = nil; ID: LongInt = -1): TGUIEditBox; inline; |
![]() |
function AddEmptySpriteBank(const Name: StringType): TGUISpriteBank; inline; |
![]() |
function AddFileOpenDialog(const Title: StringType; Modal: Boolean = True; Parent: TGUIElement = nil; ID: LongInt = -1): TGUIFileOpenDialog; inline; |
![]() |
function AddFont(const Name: StringType; Font: TGUIFont): TGUIFont; inline; |
![]() |
function AddGUIElement(const ElementName: AnsiString; Parent: TGUIElement = nil): TGUIElement; |
![]() |
function AddImage(Image: TTexture; const Pos: TPoint; UseAlphaChannel: Boolean = True; Parent: TGUIElement = nil; ID: LongInt = -1; const Caption: StringType = ''): TGUIImage; overload; inline; |
![]() |
function AddImage(const Rectangle: TRect; Parent: TGUIElement = nil; ID: LongInt = 1; const Caption: StringType = ''): TGUIImage; overload; inline; |
![]() |
function AddInOutFader(Parent: TGUIElement; ID: LongInt = -1): TGUIInOutFader; overload; inline; |
![]() |
function AddInOutFader(const Rectangle: TRect; Parent: TGUIElement = nil; ID: LongInt = -1): TGUIInOutFader; overload; inline; |
![]() |
function AddListBox(const Rectangle: TRect; Parent: TGUIElement = nil; ID: LongInt = -1; DrawBackground: Boolean = False): TGUIListBox; overload; inline; |
![]() |
function AddMenu(Parent: TGUIElement = nil; ID: LongInt = -1): TGUIContextMenu; inline; |
![]() |
function AddMeshViewer(const Rectangle: TRect; Parent: TGUIElement = nil; ID: LongInt = -1; const Caption: StringType = ''): TGUIMeshViewer; inline; |
![]() |
function AddMessageBox(const Caption: StringType; const Text: StringType = ''; Modal: Boolean = True; Flags: LongWord = LongWord(mbOK); Parent: TGUIElement = nil; ID: LongInt = -1; Image: TTexture = nil): TGUIWindow; inline; |
![]() |
function AddModalScreen(Parent: TGUIElement): TGUIElement; inline; |
![]() |
function AddScrollBar(Horizontal: Boolean; const Rectangle: TRect; Parent: TGUIElement = nil; ID: LongInt = -1): TGUIScrollBar; inline; |
![]() |
function AddSpinBox(const Text: StringType; const Rectangle: TRect; Border: Boolean = True; Parent: TGUIElement = nil; ID: LongInt = -1): TGUISpinBox; inline; |
![]() |
function AddStaticText(const Text: StringType; const Rectangle: TRect; Border: Boolean = False; WordWrap: Boolean = True; Parent: TGUIElement = nil; ID: LongInt = -1; FillBackground: Boolean = False): TGUIStaticText; inline; |
![]() |
function AddTab(const Rectangle: TRect; Parent: TGUIElement = nil; ID: LongInt = -1): TGUITab; inline; |
![]() |
function AddTabControl(const Rectangle: TRect; Parent: TGUIElement = nil; FillBackground: Boolean = False; Border: Boolean = True; ID: LongInt = -1): TGUITabControl; inline; |
![]() |
function AddTable(const Rectangle: TRect; Parent: TGUIElement = nil; ID: LongInt = -1; DrawBackground: Boolean = False): TGUITable; inline; |
![]() |
function AddToolBar(Parent: TGUIElement = nil; ID: LongInt = -1): TGUIToolBar; inline; |
![]() |
function AddTreeView(const Rectangle: TRect; Parent: TGUIElement = nil; ID: LongInt = -1; DrawBackground: Boolean = False; ScrollBarVertical: Boolean = True; ScrollBarHorizontal: Boolean = False): TGUITreeView; inline; |
![]() |
function AddWindow(const Rectangle: TRect; Modal: Boolean = False; const Text: StringType = ''; Parent: TGUIElement = nil; ID: LongInt = -1): TGUIWindow; inline; |
![]() |
function CreateImageList(Texture: TTexture; const ImageSize: TSize; UseAlphaChannel: Boolean): TGUIImageList; inline; |
![]() |
function CreateSkin(SkinType: TGUISkinType): TGUISkin; inline; |
![]() |
function GetBuiltInFont: TGUIFont; inline; |
![]() |
function GetDefaultGUIElementFactory: TGUIElementFactory; inline; |
![]() |
function GetFocus: TGUIElement; inline; |
![]() |
function GetFont(const FileName: StringType): TGUIFont; inline; |
![]() |
function GetGUIElementFactory(Index: LongWord): TGUIElementFactory; inline; |
![]() |
function GetOSOperator: TOSOperator; inline; |
![]() |
function GetRoot: TGUIElement; inline; |
![]() |
function GetSkin: TGUISkin; inline; |
![]() |
function GetSpriteBank(const FileName: StringType): TGUISpriteBank; inline; |
![]() |
function HasFocus(Element: TGUIElement): Boolean; inline; |
![]() |
function LoadGUI(RFile: TReadFile; Parent: TGUIElement = nil): Boolean; overload; inline; |
![]() |
function LoadGUI(const Path: StringType; Parent: TGUIElement = nil): Boolean; overload; inline; |
![]() |
function PostEventFromUser(Event: TIrrlichtEvent): Boolean; inline; |
![]() |
function RemoveFocus(Element: TGUIElement): Boolean; inline; |
![]() |
function SaveGUI(const Path: StringType; Start: TGUIElement = nil): Boolean; overload; inline; |
![]() |
function SaveGUI(WFile: TWriteFile; Start: TGUIElement = nil): Boolean; overload; inline; |
![]() |
function SetFocus(Element: TGUIElement): Boolean; inline; |
![]() |
procedure Clear; inline; |
![]() |
procedure DrawAll; inline; |
![]() |
procedure ReadGUIElement(Reader: TXMLReader; Node: TGUIElement); inline; |
![]() |
procedure RegisterGUIElementFactory(Factory: TGUIElementFactory); inline; |
![]() |
procedure SetSkin(NewSkin: TGUISkin); inline; |
![]() |
procedure SetUserEventReceiver(Receiver: TWrapper); inline; |
![]() |
procedure WriteGUIElement(Writer: TXMLWriter; Node: TGUIElement); inline; |
![]() |
property FileSystem: TFileSystem read FFileSystem; |
![]() |
property RegisteredGUIElementFactoryCount: LongWord
read GetRegisteredGUIElementFactoryCount; |
![]() |
property VideoDriver: TVideoDriver read FVideoDriver; |
![]() |
constructor Create(Ref: Pointer; NFileSystem: TFileSystem; NVideoDriver: TVideoDriver); |
Constructor. Only used internally. |
![]() |
function AddButton(const Rectangle: TRect; Parent: TGUIElement = nil; ID: LongInt = -1; const Caption: StringType = ''; const ToolTip: StringType = ''): TGUIButton; inline; |
Adds a button element. Parameters
ReturnsThe created button. Returns nil if an error occurred. This pointer should not be dropped. See TReferenceCounted.Drop for more information. |
![]() |
function AddCheckBox(Checked: Boolean; const Rectangle: TRect; Parent: TGUIElement = nil; ID: LongInt = -1; const Caption: StringType = ''): TGUICheckBox; inline; |
Adds a checkbox element. Parameters
ReturnsThe created check box. Returns nil if an error occurred. This pointer should not be dropped. See TReferenceCounted.Drop for more information. |
![]() |
function AddColorSelectDialog(const Title: StringType = ''; Modal: Boolean = True; Parent: TGUIElement = nil; ID: LongInt = -1): TGUIColorSelectDialog; inline; |
Adds a color select dialog. Parameters
ReturnsThe created file open dialog. Returns nil if an error occurred. This pointer should not be dropped. See TReferenceCounted.Drop for more information. |
![]() |
function AddComboBox(const Rectangle: TRect; Parent: TGUIElement = nil; ID: LongInt = -1): TGUIComboBox; inline; |
Adds a combo box to the environment. Parameters
ReturnsThe created combo box. Returns nil if an error occurred. This pointer should not be dropped. See TReferenceCounted.Drop for more information. |
![]() |
function AddContextMenu(const Rectangle: TRect; Parent: TGUIElement = nil; ID: LongInt = -1): TGUIContextMenu; inline; |
Adds a context menu to the environment. Parameters
ReturnsThe created context menu. Returns nil if an error occurred. This pointer should not be dropped. See TReferenceCounted.Drop for more information. |
![]() |
function AddEditBox(const Text: StringType; const Rectangle: TRect; Border: Boolean = True; Parent: TGUIElement = nil; ID: LongInt = -1): TGUIEditBox; inline; |
Adds an edit box. Parameters
ReturnsThe created edit box. Returns nil if an error occurred. This pointer should not be dropped. See TReferenceCounted.Drop for more information. |
![]() |
function AddEmptySpriteBank(const Name: StringType): TGUISpriteBank; inline; |
Adds an empty sprite bank to the manager. Parameters
ReturnsThe sprite bank. This pointer should not be dropped. See TReferenceCounted.Drop for more information. |
![]() |
function AddFileOpenDialog(const Title: StringType; Modal: Boolean = True; Parent: TGUIElement = nil; ID: LongInt = -1): TGUIFileOpenDialog; inline; |
Adds a file open dialog. Parameters
ReturnsThe created file open dialog. Returns 0 if an error occurred. This pointer should not be dropped. See TReferenceCounted.Drop for more information. |
![]() |
function AddFont(const Name: StringType; Font: TGUIFont): TGUIFont; inline; |
Adds an externally loaded font to the font list. Parameters
ReturnsThe stored font. This can differ from given parameter if the name previously existed. |
![]() |
function AddGUIElement(const ElementName: AnsiString; Parent: TGUIElement = nil): TGUIElement; |
Adds a GUI element by its name. Parameters
ReturnsThe New GUI element, or nil if no such element exists. |
![]() |
function AddImage(Image: TTexture; const Pos: TPoint; UseAlphaChannel: Boolean = True; Parent: TGUIElement = nil; ID: LongInt = -1; const Caption: StringType = ''): TGUIImage; overload; inline; |
Adds an image element. Parameters
ReturnsTthe created image element. Returns nil if an error occurred. This pointer should not be dropped. See TReferenceCounted.Drop for more information. |
![]() |
function AddImage(const Rectangle: TRect; Parent: TGUIElement = nil; ID: LongInt = 1; const Caption: StringType = ''): TGUIImage; overload; inline; |
Adds an image element. Parameters
ReturnsThe created image element. Returns nil if an error occurred. This pointer should |
![]() |
function AddInOutFader(Parent: TGUIElement; ID: LongInt = -1): TGUIInOutFader; overload; inline; |
Adds an element for fading in or out the whole screen. Parameters
|
![]() |
function AddInOutFader(const Rectangle: TRect; Parent: TGUIElement = nil; ID: LongInt = -1): TGUIInOutFader; overload; inline; |
Adds an element for fading in or out. Parameters
|
![]() |
function AddListBox(const Rectangle: TRect; Parent: TGUIElement = nil; ID: LongInt = -1; DrawBackground: Boolean = False): TGUIListBox; overload; inline; |
Adds a list box element. Parameters
ReturnsThe created list box. Returns nil if an error occurred. This pointer should not be dropped. See TReferenceCounted.Drop for more information. |
![]() |
function AddMenu(Parent: TGUIElement = nil; ID: LongInt = -1): TGUIContextMenu; inline; |
Adds a menu to the environment.
Parameters
ReturnsThe created menu. Returns nil if an error occurred. This pointer should not be dropped. See TReferenceCounted.Drop for more information. |
![]() |
function AddMeshViewer(const Rectangle: TRect; Parent: TGUIElement = nil; ID: LongInt = -1; const Caption: StringType = ''): TGUIMeshViewer; inline; |
Adds a mesh viewer. Not 100% implemented yet. (?) Parameters
ReturnsThe created mesh viewer. Returns nil if an error occurred. This pointer should not be dropped. See TReferenceCounted.Drop for more information. |
![]() |
function AddMessageBox(const Caption: StringType; const Text: StringType = ''; Modal: Boolean = True; Flags: LongWord = LongWord(mbOK); Parent: TGUIElement = nil; ID: LongInt = -1; Image: TTexture = nil): TGUIWindow; inline; |
Adds a message box. Parameters
ReturnsThe created message box. Returns nil if an error occurred. This pointer should not be dropped. See TReferenceCounted.Drop for more information. |
![]() |
function AddModalScreen(Parent: TGUIElement): TGUIElement; inline; |
Adds a modal screen. Parameters
ReturnsThe created modal. Returns nil if an error occurred. This pointer should not be dropped. See TReferenceCounted.Drop for more information. |
![]() |
function AddScrollBar(Horizontal: Boolean; const Rectangle: TRect; Parent: TGUIElement = nil; ID: LongInt = -1): TGUIScrollBar; inline; |
Adds a scrollbar. Parameters
ReturnsThe created scrollbar. Returns nil if an error occurred. This pointer should not be dropped. See TReferenceCounted.Drop for more information. |
![]() |
function AddSpinBox(const Text: StringType; const Rectangle: TRect; Border: Boolean = True; Parent: TGUIElement = nil; ID: LongInt = -1): TGUISpinBox; inline; |
Adds a spin box.
Parameters
ReturnsThe created spin box. Returns nil if an error occurred. This pointer should not be dropped. See TReferenceCounted.Drop for more information. |
![]() |
function AddStaticText(const Text: StringType; const Rectangle: TRect; Border: Boolean = False; WordWrap: Boolean = True; Parent: TGUIElement = nil; ID: LongInt = -1; FillBackground: Boolean = False): TGUIStaticText; inline; |
Adds a static text. Parameters
ReturnsThe created static text. Returns nil if an error occurred. This pointer should not be dropped. See TReferenceCounted.Drop for more information. |
![]() |
function AddTab(const Rectangle: TRect; Parent: TGUIElement = nil; ID: LongInt = -1): TGUITab; inline; |
Adds tab to the environment. Parameters
ReturnsThe created tab. Returns nil if an error occurred. This pointer should not be dropped. See TReferenceCounted.Drop for more information. |
![]() |
function AddTabControl(const Rectangle: TRect; Parent: TGUIElement = nil; FillBackground: Boolean = False; Border: Boolean = True; ID: LongInt = -1): TGUITabControl; inline; |
Adds a tab control to the environment. Parameters
ReturnsThe created tab control element. Returns nil if an error occurred. This pointer should not be dropped. See TReferenceCounted.Drop for more information. |
![]() |
function AddTable(const Rectangle: TRect; Parent: TGUIElement = nil; ID: LongInt = -1; DrawBackground: Boolean = False): TGUITable; inline; |
Adds a table to the environment. dropped. See TReferenceCounted.Drop for more information.) Parameters
Returns(The created table. Returns nil if an error occurred. This pointer should not be |
![]() |
function AddToolBar(Parent: TGUIElement = nil; ID: LongInt = -1): TGUIToolBar; inline; |
Adds a toolbar to the environment. Parameters
ReturnsThe created tool bar. Returns nil if an error occurred. This pointer should not be dropped. See TReferenceCounted.Drop for more information. |
![]() |
function AddTreeView(const Rectangle: TRect; Parent: TGUIElement = nil; ID: LongInt = -1; DrawBackground: Boolean = False; ScrollBarVertical: Boolean = True; ScrollBarHorizontal: Boolean = False): TGUITreeView; inline; |
Adds a tree view element. Parameters
ReturnsThe created list box. Returns nil if an error occurred. This pointer should not be dropped. See TReferenceCounted.Drop for more information. |
![]() |
function AddWindow(const Rectangle: TRect; Modal: Boolean = False; const Text: StringType = ''; Parent: TGUIElement = nil; ID: LongInt = -1): TGUIWindow; inline; |
Adds an empty window element. Parameters
ReturnsThe created window. Returns nil if an error occurred. This pointer should not be dropped. See TReferenceCounted.Drop for more information. |
![]() |
function CreateImageList(Texture: TTexture; const ImageSize: TSize; UseAlphaChannel: Boolean): TGUIImageList; inline; |
Creates the image list from the given texture. Parameters
ReturnsThe font. Returns nil if the font could not be loaded. This pointer should not be dropped. See TReferenceCounted.Drop for more information. |
![]() |
function CreateSkin(SkinType: TGUISkinType): TGUISkin; inline; |
Creates a new GUI Skin based on a template. Parameters
ReturnsThe created skin. If you no longer need it, you should call TGUISkin.Drop. See TReferenceCounted.Drop for more information. |
![]() |
function GetBuiltInFont: TGUIFont; inline; |
Returns the default built-in font. ReturnsThe default built-in font. This pointer should not be dropped. See TReferenceCounted.Drop for more information. |
![]() |
function GetDefaultGUIElementFactory: TGUIElementFactory; inline; |
Get the default element factory which can create all built-in elements. ReturnsThe factory. This pointer should not be dropped. See TReferenceCounted.Drop for more information. |
![]() |
function GetFocus: TGUIElement; inline; |
Returns the element which holds the focus. ReturnsThe element. |
![]() |
function GetFont(const FileName: StringType): TGUIFont; inline; |
Returns pointer to the font with the specified filename. Parameters
ReturnsThe font. Returns nil if the font could not be loaded. This pointer should not be dropped. See TReferenceCounted.Drop for more information. |
![]() |
function GetGUIElementFactory(Index: LongWord): TGUIElementFactory; inline; |
Get a GUI element factory by index. Parameters
ReturnsThe Factory at the given index, or nil if no such factory exists. |
![]() |
function GetOSOperator: TOSOperator; inline; |
Returns a pointer to the OS operator. |
![]() |
function GetRoot: TGUIElement; inline; |
Returns the root gui element. ReturnsThe root element of the GUI. The returned pointer should not be dropped. See TReferenceCounted.Drop for more information. |
![]() |
function GetSkin: TGUISkin; inline; |
Returns The current gui skin. ReturnsThe current GUI skin. The returned pointer should not be dropped. See TReferenceCounted.Drop for more information. |
![]() |
function GetSpriteBank(const FileName: StringType): TGUISpriteBank; inline; |
Returns pointer to the sprite bank with the specified file name. Parameters
ReturnsThe sprite bank. Returns nil if it could not be loaded. This pointer should not be dropped. See TReferenceCounted.Drop for more information. |
![]() |
function HasFocus(Element: TGUIElement): Boolean; inline; |
Returns whether an element has focus. Parameters
ReturnsTrue if the element is focused, else false. |
![]() |
function LoadGUI(RFile: TReadFile; Parent: TGUIElement = nil): Boolean; overload; inline; |
Loads a GUI from a TReadFile. Note that the current GUI is not cleared before. Parameters
ReturnsTrue if loading succeeded, else false. |
![]() |
function LoadGUI(const Path: StringType; Parent: TGUIElement = nil): Boolean; overload; inline; |
Loads a GUI from a path. Note that the current GUI is not cleared before. Parameters
ReturnsTrue if loading succeeded, else false. |
![]() |
function PostEventFromUser(Event: TIrrlichtEvent): Boolean; inline; |
Posts an input event to the environment. Parameters
ReturnsTrue if succeeded, else false. |
![]() |
function RemoveFocus(Element: TGUIElement): Boolean; inline; |
Removes the focus from an element. Parameters
ReturnsTrue on success, false on failure. |
![]() |
function SaveGUI(const Path: StringType; Start: TGUIElement = nil): Boolean; overload; inline; |
Saves the current GUI to a path. Parameters
ReturnsTrue if saving succeeded, else false. |
![]() |
function SaveGUI(WFile: TWriteFile; Start: TGUIElement = nil): Boolean; overload; inline; |
Saves the current GUI to a TWriteFile. Parameters
ReturnsTrue if saving succeeded, else false. |
![]() |
function SetFocus(Element: TGUIElement): Boolean; inline; |
Sets the focus to an element. Parameters
ReturnsTrue on success, false on failure. |
![]() |
procedure Clear; inline; |
Removes all elements from the environment. |
![]() |
procedure DrawAll; inline; |
Draws all gui elements by traversing the GUI environment starting at the root node. |
![]() |
procedure ReadGUIElement(Reader: TXMLReader; Node: TGUIElement); inline; |
Reads a single GUI element. (No more documentation on this method). |
![]() |
procedure RegisterGUIElementFactory(Factory: TGUIElementFactory); inline; |
Adds an element factory to the gui environment. Parameters
|
![]() |
procedure SetSkin(NewSkin: TGUISkin); inline; |
Sets a new GUI Skin.
var NewSkin: TGUISkin;
...
NewSkin := GUIEnvironment.CreateSkin(gsWindowsClassic);
GUIEnvironment.SetSkin(NewSkin);
NewSkin.Drop;
Parameters
|
![]() |
procedure SetUserEventReceiver(Receiver: TWrapper); inline; |
This sets a new event receiver for GUI events. Parameters
|
![]() |
procedure WriteGUIElement(Writer: TXMLWriter; Node: TGUIElement); inline; |
Writes a single GUI element. (No more documentation on this function). |
![]() |
property FileSystem: TFileSystem read FFileSystem; |
The file system associated with this GUI environment. |
![]() |
property RegisteredGUIElementFactoryCount: LongWord
read GetRegisteredGUIElementFactoryCount; |
The amount of registered gui element factories. |
![]() |
property VideoDriver: TVideoDriver read FVideoDriver; |
The video driver associated with this GUI environment. |