Irrlicht 3D Engine
irr::gui Namespace Reference

The gui namespace contains useful classes for easy creation of a graphical user interface. More...

Classes

Enumerations

Variables


Detailed Description

The gui namespace contains useful classes for easy creation of a graphical user interface.


Enumeration Type Documentation

Close behavior. Default is ECMC_REMOVE

Enumerator:
ECMC_IGNORE 

do nothing - menu stays open

ECMC_REMOVE 

remove the gui element

ECMC_HIDE 

call setVisible(false)

Definition at line 16 of file IGUIContextMenu.h.

Default icons for cursors.

Enumerator:
ECI_NORMAL 
ECI_CROSS 
ECI_HAND 
ECI_HELP 
ECI_IBEAM 
ECI_NO 
ECI_WAIT 
ECI_SIZEALL 
ECI_SIZENESW 
ECI_SIZENWSE 
ECI_SIZENS 
ECI_SIZEWE 
ECI_UP 
ECI_COUNT 

Definition at line 20 of file ICursorControl.h.

platform specific behavior flags for the cursor

Enumerator:
ECPB_NONE 

default - no platform specific behavior

ECPB_X11_CACHE_UPDATES 

On X11 try caching cursor updates as XQueryPointer calls can be expensive.

Update cursor positions only when the irrlicht timer has been updated or the timer is stopped. This means you usually get one cursor update per device->run() which will be fine in most cases. See this forum-thread for a more detailed explanation: http://irrlicht.sourceforge.net/forum/viewtopic.php?f=7&t=45525

Definition at line 82 of file ICursorControl.h.

Enumerator:
EGUIA_UPPERLEFT 

Aligned to parent's top or left side (default)

EGUIA_LOWERRIGHT 

Aligned to parent's bottom or right side.

EGUIA_CENTER 

Aligned to the center of parent.

EGUIA_SCALE 

Stretched to fit parent.

Definition at line 12 of file EGUIAlignment.h.

Enumerator:
EGBS_BUTTON_UP 

The button is not pressed.

EGBS_BUTTON_DOWN 

The button is currently pressed down.

EGBS_BUTTON_MOUSE_OVER 

The mouse cursor is over the button.

EGBS_BUTTON_MOUSE_OFF 

The mouse cursor is not over the button.

EGBS_BUTTON_FOCUSED 

The button has the focus.

EGBS_BUTTON_NOT_FOCUSED 

The button doesn't have the focus.

EGBS_COUNT 

not used, counts the number of enumerated items

Definition at line 23 of file IGUIButton.h.

modes for ordering used when a column header is clicked

Enumerator:
EGCO_NONE 

Do not use ordering.

EGCO_CUSTOM 

Send a EGET_TABLE_HEADER_CHANGED message when a column header is clicked.

EGCO_ASCENDING 

Sort it ascending by it's ascii value like: a,b,c,...

EGCO_DESCENDING 

Sort it descending by it's ascii value like: z,x,y,...

EGCO_FLIP_ASCENDING_DESCENDING 

Sort it ascending on first click, descending on next, etc.

EGCO_COUNT 

Not used as mode, only to get maximum value for this enum.

Definition at line 19 of file IGUITable.h.

Enumeration for skin colors.

Enumerator:
EGDC_3D_DARK_SHADOW 

Dark shadow for three-dimensional display elements.

EGDC_3D_SHADOW 

Shadow color for three-dimensional display elements (for edges facing away from the light source).

EGDC_3D_FACE 

Face color for three-dimensional display elements and for dialog box backgrounds.

EGDC_3D_HIGH_LIGHT 

Highlight color for three-dimensional display elements (for edges facing the light source.)

EGDC_3D_LIGHT 

Light color for three-dimensional display elements (for edges facing the light source.)

EGDC_ACTIVE_BORDER 

Active window border.

EGDC_ACTIVE_CAPTION 

Active window title bar text.

EGDC_APP_WORKSPACE 

Background color of multiple document interface (MDI) applications.

EGDC_BUTTON_TEXT 

Text on a button.

EGDC_GRAY_TEXT 

Grayed (disabled) text.

EGDC_HIGH_LIGHT 

Item(s) selected in a control.

EGDC_HIGH_LIGHT_TEXT 

Text of item(s) selected in a control.

EGDC_INACTIVE_BORDER 

Inactive window border.

EGDC_INACTIVE_CAPTION 

Inactive window caption.

EGDC_TOOLTIP 

Tool tip text color.

EGDC_TOOLTIP_BACKGROUND 

Tool tip background color.

EGDC_SCROLLBAR 

Scrollbar gray area.

EGDC_WINDOW 

Window background.

EGDC_WINDOW_SYMBOL 

Window symbols like on close buttons, scroll bars and check boxes.

EGDC_ICON 

Icons in a list or tree.

EGDC_ICON_HIGH_LIGHT 

Selected icons in a list or tree.

EGDC_GRAY_WINDOW_SYMBOL 

Grayed (disabled) window symbols like on close buttons, scroll bars and check boxes.

EGDC_EDITABLE 

Window background for editable field (editbox, checkbox-field)

EGDC_GRAY_EDITABLE 

Grayed (disabled) window background for editable field (editbox, checkbox-field)

EGDC_FOCUSED_EDITABLE 

Show focus of window background for editable field (editbox or when checkbox-field is pressed)

EGDC_COUNT 

this value is not used, it only specifies the amount of default colors available.

Definition at line 60 of file IGUISkin.h.

Enumerator:
EGDF_DEFAULT 

For static text, edit boxes, lists and most other places.

EGDF_BUTTON 

Font for buttons.

EGDF_WINDOW 

Font for window title bars.

EGDF_MENU 

Font for menu items.

EGDF_TOOLTIP 

Font for tooltips.

EGDF_COUNT 

this value is not used, it only specifies the amount of default fonts available.

Definition at line 350 of file IGUISkin.h.

Customizable symbols for GUI.

Enumerator:
EGDI_WINDOW_MAXIMIZE 

maximize window button

EGDI_WINDOW_RESTORE 

restore window button

EGDI_WINDOW_CLOSE 

close window button

EGDI_WINDOW_MINIMIZE 

minimize window button

EGDI_WINDOW_RESIZE 

resize icon for bottom right corner of a window

EGDI_CURSOR_UP 

scroll bar up button

EGDI_CURSOR_DOWN 

scroll bar down button

EGDI_CURSOR_LEFT 

scroll bar left button

EGDI_CURSOR_RIGHT 

scroll bar right button

EGDI_MENU_MORE 

icon for menu children

EGDI_CHECK_BOX_CHECKED 

tick for checkbox

EGDI_DROP_DOWN 

down arrow for dropdown menus

EGDI_SMALL_CURSOR_UP 

smaller up arrow

EGDI_SMALL_CURSOR_DOWN 

smaller down arrow

EGDI_RADIO_BUTTON_CHECKED 

selection dot in a radio button

EGDI_MORE_LEFT 

<< icon indicating there is more content to the left

EGDI_MORE_RIGHT 

>> icon indicating that there is more content to the right

EGDI_MORE_UP 

icon indicating that there is more content above

EGDI_MORE_DOWN 

icon indicating that there is more content below

EGDI_EXPAND 

plus icon for trees

EGDI_COLLAPSE 

minus icon for trees

EGDI_FILE 

file icon for file selection

EGDI_DIRECTORY 

folder icon for file selection

EGDI_COUNT 

value not used, it only specifies the number of icons

Definition at line 267 of file IGUISkin.h.

Enumeration for default sizes.

Enumerator:
EGDS_SCROLLBAR_SIZE 

default with / height of scrollbar

EGDS_MENU_HEIGHT 

height of menu

EGDS_WINDOW_BUTTON_WIDTH 

width of a window button

EGDS_CHECK_BOX_WIDTH 

width of a checkbox check

EGDS_MESSAGE_BOX_WIDTH 
Deprecated:
This may be removed by Irrlicht 1.9
EGDS_MESSAGE_BOX_HEIGHT 
Deprecated:
This may be removed by Irrlicht 1.9
EGDS_BUTTON_WIDTH 

width of a default button

EGDS_BUTTON_HEIGHT 

height of a default button

EGDS_TEXT_DISTANCE_X 

distance for text from background

EGDS_TEXT_DISTANCE_Y 

distance for text from background

EGDS_TITLEBARTEXT_DISTANCE_X 

distance for text in the title bar, from the left of the window rect

EGDS_TITLEBARTEXT_DISTANCE_Y 

distance for text in the title bar, from the top of the window rect

EGDS_MESSAGE_BOX_GAP_SPACE 

free space in a messagebox between borders and contents on all sides

EGDS_MESSAGE_BOX_MIN_TEXT_WIDTH 

minimal space to reserve for messagebox text-width

EGDS_MESSAGE_BOX_MAX_TEXT_WIDTH 

maximal space to reserve for messagebox text-width

EGDS_MESSAGE_BOX_MIN_TEXT_HEIGHT 

minimal space to reserve for messagebox text-height

EGDS_MESSAGE_BOX_MAX_TEXT_HEIGHT 

maximal space to reserve for messagebox text-height

EGDS_BUTTON_PRESSED_IMAGE_OFFSET_X 

pixels to move the button image to the right when a pushbutton is pressed

EGDS_BUTTON_PRESSED_IMAGE_OFFSET_Y 

pixels to move the button image down when a pushbutton is pressed

EGDS_BUTTON_PRESSED_TEXT_OFFSET_X 

pixels to move the button text to the right when a pushbutton is pressed

EGDS_BUTTON_PRESSED_TEXT_OFFSET_Y 

pixels to move the button text down when a pushbutton is pressed

EGDS_COUNT 

this value is not used, it only specifies the amount of default sizes available.

Definition at line 150 of file IGUISkin.h.

Enumerator:
EGDT_MSG_BOX_OK 

Text for the OK button on a message box.

EGDT_MSG_BOX_CANCEL 

Text for the Cancel button on a message box.

EGDT_MSG_BOX_YES 

Text for the Yes button on a message box.

EGDT_MSG_BOX_NO 

Text for the No button on a message box.

EGDT_WINDOW_CLOSE 

Tooltip text for window close button.

EGDT_WINDOW_MAXIMIZE 

Tooltip text for window maximize button.

EGDT_WINDOW_MINIMIZE 

Tooltip text for window minimize button.

EGDT_WINDOW_RESTORE 

Tooltip text for window restore button.

EGDT_COUNT 

this value is not used, it only specifies the number of default texts

Definition at line 229 of file IGUISkin.h.

List of all basic Irrlicht GUI elements.

An IGUIElement returns this when calling IGUIElement::getType();

Enumerator:
EGUIET_BUTTON 

A button (IGUIButton)

EGUIET_CHECK_BOX 

A check box (IGUICheckBox)

EGUIET_COMBO_BOX 

A combo box (IGUIComboBox)

EGUIET_CONTEXT_MENU 

A context menu (IGUIContextMenu)

EGUIET_MENU 

A menu (IGUIMenu)

EGUIET_EDIT_BOX 

An edit box (IGUIEditBox)

EGUIET_FILE_OPEN_DIALOG 

A file open dialog (IGUIFileOpenDialog)

EGUIET_COLOR_SELECT_DIALOG 

A color select open dialog (IGUIColorSelectDialog)

EGUIET_IN_OUT_FADER 

A in/out fader (IGUIInOutFader)

EGUIET_IMAGE 

An image (IGUIImage)

EGUIET_LIST_BOX 

A list box (IGUIListBox)

EGUIET_MESH_VIEWER 

A mesh viewer (IGUIMeshViewer)

EGUIET_MESSAGE_BOX 

A message box (IGUIWindow)

EGUIET_MODAL_SCREEN 

A modal screen.

EGUIET_SCROLL_BAR 

A scroll bar (IGUIScrollBar)

EGUIET_SPIN_BOX 

A spin box (IGUISpinBox)

EGUIET_STATIC_TEXT 

A static text (IGUIStaticText)

EGUIET_TAB 

A tab (IGUITab)

EGUIET_TAB_CONTROL 

A tab control.

EGUIET_TABLE 

A Table.

EGUIET_TOOL_BAR 

A tool bar (IGUIToolBar)

EGUIET_TREE_VIEW 

A Tree View.

EGUIET_WINDOW 

A window.

EGUIET_ELEMENT 

Unknown type.

EGUIET_ROOT 

The root of the GUI.

EGUIET_COUNT 

Not an element, amount of elements in there.

EGUIET_FORCE_32_BIT 

This enum is never used, it only forces the compiler to compile this enumeration to 32 bit.

Definition at line 17 of file EGUIElementTypes.h.

Enumeration for all events which are sendable by the gui system.

Enumerator:
EGET_ELEMENT_FOCUS_LOST 

A gui element has lost its focus.

GUIEvent.Caller is losing the focus to GUIEvent.Element. If the event is absorbed then the focus will not be changed.

EGET_ELEMENT_FOCUSED 

A gui element has got the focus.

If the event is absorbed then the focus will not be changed.

EGET_ELEMENT_HOVERED 

The mouse cursor hovered over a gui element.

If an element has sub-elements you also get this message for the subelements

EGET_ELEMENT_LEFT 

The mouse cursor left the hovered element.

If an element has sub-elements you also get this message for the subelements

EGET_ELEMENT_CLOSED 

An element would like to close.

Windows and context menus use this event when they would like to close, this can be cancelled by absorbing the event.

EGET_BUTTON_CLICKED 

A button was clicked.

EGET_SCROLL_BAR_CHANGED 

A scrollbar has changed its position.

EGET_CHECKBOX_CHANGED 

A checkbox has changed its check state.

EGET_LISTBOX_CHANGED 

A new item in a listbox was selected.

NOTE: You also get this event currently when the same item was clicked again after more than 500 ms.

EGET_LISTBOX_SELECTED_AGAIN 

An item in the listbox was selected, which was already selected.

NOTE: You get the event currently only if the item was clicked again within 500 ms or selected by "enter" or "space".

EGET_FILE_SELECTED 

A file has been selected in the file dialog.

EGET_DIRECTORY_SELECTED 

A directory has been selected in the file dialog.

EGET_FILE_CHOOSE_DIALOG_CANCELLED 

A file open dialog has been closed without choosing a file.

EGET_MESSAGEBOX_YES 

'Yes' was clicked on a messagebox

EGET_MESSAGEBOX_NO 

'No' was clicked on a messagebox

EGET_MESSAGEBOX_OK 

'OK' was clicked on a messagebox

EGET_MESSAGEBOX_CANCEL 

'Cancel' was clicked on a messagebox

EGET_EDITBOX_ENTER 

In an editbox 'ENTER' was pressed.

EGET_EDITBOX_CHANGED 

The text in an editbox was changed. This does not include automatic changes in text-breaking.

EGET_EDITBOX_MARKING_CHANGED 

The marked area in an editbox was changed.

EGET_TAB_CHANGED 

The tab was changed in an tab control.

EGET_MENU_ITEM_SELECTED 

A menu item was selected in a (context) menu.

EGET_COMBO_BOX_CHANGED 

The selection in a combo box has been changed.

EGET_SPINBOX_CHANGED 

The value of a spin box has changed.

EGET_TABLE_CHANGED 

A table has changed.

EGET_TABLE_HEADER_CHANGED 
EGET_TABLE_SELECTED_AGAIN 
EGET_TREEVIEW_NODE_DESELECT 

A tree view node lost selection. See IGUITreeView::getLastEventNode().

EGET_TREEVIEW_NODE_SELECT 

A tree view node was selected. See IGUITreeView::getLastEventNode().

EGET_TREEVIEW_NODE_EXPAND 

A tree view node was expanded. See IGUITreeView::getLastEventNode().

EGET_TREEVIEW_NODE_COLLAPSE 

A tree view node was collapsed. See IGUITreeView::getLastEventNode().

EGET_TREEVIEW_NODE_COLLAPS 

deprecated - use EGET_TREEVIEW_NODE_COLLAPSE instead. This may be removed by Irrlicht 1.9

EGET_COUNT 

No real event. Just for convenience to get number of events.

Definition at line 151 of file IEventReceiver.h.

An enum for the different types of GUI font.

Enumerator:
EGFT_BITMAP 

Bitmap fonts loaded from an XML file or a texture.

EGFT_VECTOR 

Scalable vector fonts loaded from an XML file.

These fonts reside in system memory and use no video memory until they are displayed. These are slower than bitmap fonts but can be easily scaled and rotated.

EGFT_OS 

A font which uses a the native API provided by the operating system.

Currently not used.

EGFT_CUSTOM 

An external font type provided by the user.

Definition at line 19 of file IGUIFont.h.

Enumeration for listbox colors.

Enumerator:
EGUI_LBC_TEXT 

Color of text.

EGUI_LBC_TEXT_HIGHLIGHT 

Color of selected text.

EGUI_LBC_ICON 

Color of icon.

EGUI_LBC_ICON_HIGHLIGHT 

Color of selected icon.

EGUI_LBC_COUNT 

Not used, just counts the number of available colors.

Definition at line 18 of file IGUIListBox.h.

Enumerator:
EGOM_NONE 

No element ordering.

EGOM_ASCENDING 

Elements are ordered from the smallest to the largest.

EGOM_DESCENDING 

Elements are ordered from the largest to the smallest.

EGOM_COUNT 

this value is not used, it only specifies the amount of default ordering types available.

Definition at line 51 of file IGUITable.h.

Enumeration of available default skins.

To set one of the skins, use the following code, for example to set the Windows classic skin:

    gui::IGUISkin* newskin = environment->createSkin(gui::EGST_WINDOWS_CLASSIC);
    environment->setSkin(newskin);
    newskin->drop();
Enumerator:
EGST_WINDOWS_CLASSIC 

Default windows look and feel.

EGST_WINDOWS_METALLIC 

Like EGST_WINDOWS_CLASSIC, but with metallic shaded windows and buttons.

EGST_BURNING_SKIN 

Burning's skin.

EGST_UNKNOWN 

An unknown skin, not serializable at present.

EGST_COUNT 

this value is not used, it only specifies the number of skin types

Definition at line 30 of file IGUISkin.h.

Enumerator:
EGTDF_ROWS 
EGTDF_COLUMNS 
EGTDF_ACTIVE_ROW 
EGTDF_COUNT 

Definition at line 75 of file IGUITable.h.

enumeration for message box layout flags

Enumerator:
EMBF_OK 

Flag for the ok button.

EMBF_CANCEL 

Flag for the cancel button.

EMBF_YES 

Flag for the yes button.

EMBF_NO 

Flag for the no button.

EMBF_FORCE_32BIT 

This value is not used. It only forces this enumeration to compile in 32 bit.

Definition at line 14 of file EMessageBoxFlags.h.


Variable Documentation

Initial value:
{
    "upperLeft",
    "lowerRight",
    "center",
    "scale",
    0
}

Names for alignments.

Definition at line 25 of file EGUIAlignment.h.

Referenced by irr::gui::IGUIElement::deserializeAttributes(), and irr::gui::IGUIElement::serializeAttributes().

Initial value:
    {
        "buttonUp",
        "buttonDown",
        "buttonMouseOver",
        "buttonMouseOff",
        "buttonFocused",
        "buttonNotFocused",
        0,
        0,
    }

Names for gui button state icons.

Definition at line 42 of file IGUIButton.h.

Initial value:
    {
        "none",
        "custom",
        "ascend",
        "descend",
        "ascend_descend",
        0,
    }

Names for EGUI_COLUMN_ORDERING types.

Definition at line 41 of file IGUITable.h.

const c8* const irr::gui::GUICursorIconNames[ECI_COUNT+1]
Initial value:
    {
        "normal",
        "cross",
        "hand",
        "help",
        "ibeam",
        "no",
        "wait",
        "sizeall",
        "sizenesw",
        "sizenwse",
        "sizens",
        "sizewe",
        "sizeup",
        0
    }

Names for ECURSOR_ICON.

Definition at line 45 of file ICursorControl.h.

Initial value:
{
    "button",
    "checkBox",
    "comboBox",
    "contextMenu",
    "menu",
    "editBox",
    "fileOpenDialog",
    "colorSelectDialog",
    "inOutFader",
    "image",
    "listBox",
    "meshViewer",
    "messageBox",
    "modalScreen",
    "scrollBar",
    "spinBox",
    "staticText",
    "tab",
    "tabControl",
    "table",
    "toolBar",
    "treeview",
    "window",
    "element",
    "root",
    0
}

Names for built-in element types.

Definition at line 103 of file EGUIElementTypes.h.

Referenced by irr::gui::IGUIElement::getTypeName().

Initial value:
    {
        "none",
        "ascending",
        "descending",
        0
    }

Definition at line 67 of file IGUITable.h.

const c8* const irr::gui::GUISkinColorNames[EGDC_COUNT+1]
Initial value:
    {
        "3DDarkShadow",
        "3DShadow",
        "3DFace",
        "3DHighlight",
        "3DLight",
        "ActiveBorder",
        "ActiveCaption",
        "AppWorkspace",
        "ButtonText",
        "GrayText",
        "Highlight",
        "HighlightText",
        "InactiveBorder",
        "InactiveCaption",
        "ToolTip",
        "ToolTipBackground",
        "ScrollBar",
        "Window",
        "WindowSymbol",
        "Icon",
        "IconHighlight",
        "GrayWindowSymbol",
        "Editable",
        "GrayEditable",
        "FocusedEditable",
        0,
    }

Names for default skin colors.

Definition at line 119 of file IGUISkin.h.

const c8* const irr::gui::GUISkinFontNames[EGDF_COUNT+1]
Initial value:
    {
        "defaultFont",
        "buttonFont",
        "windowFont",
        "menuFont",
        "tooltipFont",
        0
    }

Definition at line 367 of file IGUISkin.h.

const c8* const irr::gui::GUISkinIconNames[EGDI_COUNT+1]
Initial value:
    {
        "windowMaximize",
        "windowRestore",
        "windowClose",
        "windowMinimize",
        "windowResize",
        "cursorUp",
        "cursorDown",
        "cursorLeft",
        "cursorRight",
        "menuMore",
        "checkBoxChecked",
        "dropDown",
        "smallCursorUp",
        "smallCursorDown",
        "radioButtonChecked",
        "moreLeft",
        "moreRight",
        "moreUp",
        "moreDown",
        "expand",
        "collapse",
        "file",
        "directory",
        0
    }

Definition at line 321 of file IGUISkin.h.

const c8* const irr::gui::GUISkinSizeNames[EGDS_COUNT+1]
Initial value:
    {
        "ScrollBarSize",
        "MenuHeight",
        "WindowButtonWidth",
        "CheckBoxWidth",
        "MessageBoxWidth",
        "MessageBoxHeight",
        "ButtonWidth",
        "ButtonHeight",
        "TextDistanceX",
        "TextDistanceY",
        "TitleBarTextX",
        "TitleBarTextY",
        "MessageBoxGapSpace",
        "MessageBoxMinTextWidth",
        "MessageBoxMaxTextWidth",
        "MessageBoxMinTextHeight",
        "MessageBoxMaxTextHeight",
        "ButtonPressedImageOffsetX",
        "ButtonPressedImageOffsetY"
        "ButtonPressedTextOffsetX",
        "ButtonPressedTextOffsetY",
        0
    }

Names for default skin sizes.

Definition at line 202 of file IGUISkin.h.

const c8* const irr::gui::GUISkinTextNames[EGDT_COUNT+1]
Initial value:
    {
        "MessageBoxOkay",
        "MessageBoxCancel",
        "MessageBoxYes",
        "MessageBoxNo",
        "WindowButtonClose",
        "WindowButtonMaximize",
        "WindowButtonMinimize",
        "WindowButtonRestore",
        0
    }

Names for default skin sizes.

Definition at line 253 of file IGUISkin.h.

const c8* const irr::gui::GUISkinTypeNames[EGST_COUNT+1]
Initial value:
    {
        "windowsClassic",
        "windowsMetallic",
        "burning",
        "unknown",
        0,
    }

Names for gui element types.

Definition at line 49 of file IGUISkin.h.