Thrive
Public Member Functions | Static Public Member Functions | Protected Attributes | Friends | List of all members
thrive::CEGUIWindow Class Reference
Inheritance diagram for thrive::CEGUIWindow:
thrive::CEGUIVideoPlayer

Public Member Functions

 CEGUIWindow (std::string layoutName)
 Constructor. More...
 
 CEGUIWindow (std::string type, std::string name)
 Constructor. More...
 
virtual ~CEGUIWindow ()
 Destructor.
 
bool isNull () const
 Returns whether the underlying CEGUI::Window is a nullptr. More...
 
CEGUIWindow createChildWindow (std::string layoutName)
 Creates a new windows and adds it to the underlying CEGUI window. More...
 
void addChild (CEGUIWindow *window)
 Adds a child to the window. More...
 
void removeChild (CEGUIWindow *window)
 Removes a child from the window. More...
 
void destroy () const
 Destroys the underlying CEGUI Window.
 
std::string getText () const
 Get the underlying cegui windows text if it has any. More...
 
void setText (const std::string &text)
 Sets the underlying cegui windows text. More...
 
void appendText (const std::string &text)
 Appends to the underlying cegui windows text. More...
 
void setImage (const std::string &image)
 Sets the underlying windows image property. More...
 
void setProperty (const std::string &parameter, const std::string &property)
 Sets the underlying windows property. More...
 
void listWidgetAddStandardItem (StandardItemWrapper *item)
 Adds a StandardItem to the window if it is a ListWidget otherwise throws bad_cast exception.
 
void listWidgetAddItem (const std::string &text, int id)
 Creates and adds a StandardItem to the window if it is a ListWidget otherwise throws bad_cast exception.
 
void listWidgetAddTextItem (const std::string &text)
 Adds a string to the window if it is a ListWidget otherwise throws bad_cast exception.
 
void listWidgetUpdateItem (StandardItemWrapper *item, const std::string &text)
 Updates an item with the new text.
 
void listWidgetResetList ()
 Clears the list if the window is a ListWidget otherwise throws bad_cast exception.
 
std::string listWidgetGetFirstSelectedItemText ()
 
int listWidgetGetFirstSelectedID ()
 
void progressbarSetProgress (float progress)
 Sets the progress of the progressbar. More...
 
float scrollingpaneGetVerticalPosition ()
 Gets the vertical scroll position. More...
 
void scrollingpaneSetVerticalPosition (float position)
 Sets the vertical scroll position. More...
 
void scrollingpaneAddIcon (CEGUIWindow *icon)
 Adds an icon vertically to the scrollable pane. More...
 
CEGUIWindow getParent () const
 Gets the underlying cegui windows parent, wrapped as a CEGUIWindow*. More...
 
CEGUIWindow getChild (const std::string &name) const
 Gets one of the underlying cegui windows children by name, wrapped as a CEGUIWindow*. More...
 
void registerEventHandler (const std::string &eventName, CEGUI::Event::Subscriber callback) const
 Registers an callback for a given generic CEGUI event. More...
 
void registerEventHandler (const std::string &eventName, const luabind::object &callback) const
 Same as above but for lua callbacks.
 
void registerKeyEventHandler (CEGUI::Event::Subscriber callback) const
 Registers an callback for a given keypress CEGUI event. More...
 
void registerKeyEventHandler (const luabind::object &callback) const
 Same as above but for lua callbacks.
 
void enable ()
 Enables the window, allowing interaction.
 
void disable ()
 Disables interaction with the window.
 
void setFocus ()
 Sets focus to the underlying cegui window.
 
void show ()
 Makes the window visible.
 
void hide ()
 Hides the window.
 
void moveToFront ()
 Moves the window in front of all other windows.
 
void moveToBack ()
 Moves the window behind all other windows.
 
void moveInFront (const CEGUIWindow &target)
 Moves the window in front of target window. More...
 
void moveBehind (const CEGUIWindow &target)
 Moves the window behind target window. More...
 
void setPositionAbs (float x, float y)
 Sets the windows position. More...
 
void setPositionRel (float x, float y)
 
void setSizeAbs (float width, float height)
 Sets the windows size. More...
 
void setSizeRel (float width, float height)
 
std::string getName ()
 Returns the windows internal name.
 
void playAnimation (std::string name)
 Plays an animation by name. More...
 

Static Public Member Functions

static CEGUIWindow getRootWindow ()
 
static luabind::scope luaBindings ()
 Lua bindings. More...
 
static void setGuiMoveMode (bool value)
 
static CEGUIWindow getWindowUnderMouse ()
 

Protected Attributes

CEGUI::Window * m_window = nullptr
 

Friends

class GameState
 

Constructor & Destructor Documentation

CEGUIWindow::CEGUIWindow ( std::string  layoutName)

Constructor.

Parameters
layoutNameThe name of the layout file to load the window from
CEGUIWindow::CEGUIWindow ( std::string  type,
std::string  name 
)

Constructor.

Parameters
typeThe type of CEGUI window (from .scheme) to create internally
namename of the window

Member Function Documentation

void CEGUIWindow::addChild ( CEGUIWindow *  window)

Adds a child to the window.

Parameters
windowWindow to add
void CEGUIWindow::appendText ( const std::string &  text)

Appends to the underlying cegui windows text.

Parameters
textThe text to append
CEGUIWindow CEGUIWindow::createChildWindow ( std::string  layoutName)

Creates a new windows and adds it to the underlying CEGUI window.

Parameters
layoutNameThe name of the layout to use (filename without fileending)
Returns
The newly created window
CEGUIWindow CEGUIWindow::getChild ( const std::string &  name) const

Gets one of the underlying cegui windows children by name, wrapped as a CEGUIWindow*.

Parameters
namename of the child to acquire
Returns
window
CEGUIWindow CEGUIWindow::getParent ( ) const

Gets the underlying cegui windows parent, wrapped as a CEGUIWindow*.

Returns
window
std::string CEGUIWindow::getText ( ) const

Get the underlying cegui windows text if it has any.

Returns
text The requested text or empty string if none exist
bool CEGUIWindow::isNull ( ) const

Returns whether the underlying CEGUI::Window is a nullptr.

Returns
isNull
luabind::scope CEGUIWindow::luaBindings ( )
static

Lua bindings.

Exposes:

Depending on version. Newer CEGUI versions:

Older versions:

Returns
void CEGUIWindow::moveBehind ( const CEGUIWindow &  target)

Moves the window behind target window.

Parameters
targetThe window to move behind
void CEGUIWindow::moveInFront ( const CEGUIWindow &  target)

Moves the window in front of target window.

Parameters
targetThe window to move in front of
void CEGUIWindow::playAnimation ( std::string  name)

Plays an animation by name.

Parameters
nameThe name of the animation to play
void CEGUIWindow::progressbarSetProgress ( float  progress)

Sets the progress of the progressbar.

Parameters
progressFloat between 0.0 and 1.0
void CEGUIWindow::registerEventHandler ( const std::string &  eventName,
CEGUI::Event::Subscriber  callback 
) const

Registers an callback for a given generic CEGUI event.

Parameters
eventNamename of the event to subscribe to
callbackcallback to use when event fires
void CEGUIWindow::registerKeyEventHandler ( CEGUI::Event::Subscriber  callback) const

Registers an callback for a given keypress CEGUI event.

Parameters
callbackcallback to use when key is pressed
void CEGUIWindow::removeChild ( CEGUIWindow *  window)

Removes a child from the window.

Parameters
windowWindow with the same underlying id as the window to remove
void CEGUIWindow::scrollingpaneAddIcon ( CEGUIWindow *  icon)

Adds an icon vertically to the scrollable pane.

Parameters
Windowto add
float CEGUIWindow::scrollingpaneGetVerticalPosition ( )

Gets the vertical scroll position.

Returns
void CEGUIWindow::scrollingpaneSetVerticalPosition ( float  position)

Sets the vertical scroll position.

Parameters
positionfloat between 0.0 - 1.0
void CEGUIWindow::setImage ( const std::string &  image)

Sets the underlying windows image property.

Parameters
textThe image to use
void CEGUIWindow::setPositionAbs ( float  x,
float  y 
)

Sets the windows position.

The positional system uses Falagard coordinate system. The position is offset from one of the corners and edges of this Element's parent element (depending on alignments)

Parameters
x
x
void CEGUIWindow::setProperty ( const std::string &  parameter,
const std::string &  property 
)

Sets the underlying windows property.

Parameters
textThe parameter to set
textThe property to be set
void CEGUIWindow::setSizeAbs ( float  width,
float  height 
)

Sets the windows size.

The positional system uses Falagard coordinate system.

Parameters
width
height
void CEGUIWindow::setText ( const std::string &  text)

Sets the underlying cegui windows text.

Parameters
textThe value to set the text to

The documentation for this class was generated from the following files: