DigitalSpaces::DICEGUI1 Struct Reference
[CEGUI]

#include <CEGUIInterfaces.h>

Inherits DigitalSpaces::DIObjectBase.


Detailed Description

{755C4D31-8453-4600-94C9-A7E9CDA1D391}

This interface reflects the useful functionality of CEGUI::System.

Todo:
Event subscription
See also:
DICEGUI DID_CEGUI1

Public Member Functions

void setDefaultFont (const char *name)
 Set the default font to be used by the system.
const char * getDefaultFont ()
 Returns the name of the Font being used as system default.
DICEGUIWindowsetRootWindow (DICEGUIWindow *window)
 Set the active GUI sheet (root) window.
DICEGUIWindowgetRootWindow ()
 Return a pointer to the active GUI sheet (root) window.
DICEGUIWindowgetWindowContainingMouse ()
 Return the DICEGUIWindow object that the mouse is presently within.
DICEGUIWindowcreateWindow (const char *pszType, const char *pszName)
 Creates a new Window object of the specified type, and gives it the specified unique name.
DICEGUIWindowgetWindow (const char *pszName)
 Return a pointer to the specified Window object.
DICEGUIWindowloadWindowLayout (const char *pszFileName)
 Creates a set of windows (a Gui layout) from the information in the specified XML file.
DICEGUIWindowloadGzipWindowLayoutFromMemory (const char *pszGzippedData, unsigned long dataLength)
void getMouseCursorPosition (out_Pairf *position)
 Return the mouse cursor position.
void setGUISize (unsigned int width, unsigned int height)
 Resize the GUI.

Member Function Documentation

void DigitalSpaces::DICEGUI1::setDefaultFont ( const char *  name  ) 

Set the default font to be used by the system.

Parameters:
name Character string containing the name of the font to be used.
Note:
This possibly (probably) wont cover all system fonts, only those defined in the Scheme & Font definitions. Default behaviour when attepting to set a font that is not defined: Currently: Ignore Future On Windows: Attempt to locate a Windows TTF file that will provide the font and create a Font definition using it. Else, ignore.

const char* DigitalSpaces::DICEGUI1::getDefaultFont (  ) 

Returns the name of the Font being used as system default.

Note that this is the name of the Font definition, and may not match the TTF file being used, if any (could be using bitmap).

DICEGUIWindow* DigitalSpaces::DICEGUI1::setRootWindow ( DICEGUIWindow window  ) 

Set the active GUI sheet (root) window.

Maps to CEGUI::System::setGUISheet. May consider changing name, but RootWindow makes more sense to me.

Parameters:
window Pointer to a DICEGUIWindow object that will become the new GUI 'root'.
Returns:
Pointer to the window that was previously set as the GUI root.

DICEGUIWindow* DigitalSpaces::DICEGUI1::getRootWindow (  ) 

Return a pointer to the active GUI sheet (root) window.

Maps to CEGUI::System::getGUISheet. May consider changing name, but RootWindow makes more sense to me.

Returns:
Pointer to the window object that has been set as the GUI root element.

DICEGUIWindow* DigitalSpaces::DICEGUI1::getWindowContainingMouse (  ) 

Return the DICEGUIWindow object that the mouse is presently within.

Returns:
Pointer to the Window object that currently contains the mouse cursor, or NULL if none.

DICEGUIWindow* DigitalSpaces::DICEGUI1::createWindow ( const char *  pszType,
const char *  pszName 
)

Creates a new Window object of the specified type, and gives it the specified unique name.

Parameters:
pszType String that describes the type of Window to be created. A valid WindowFactory for the specified type must be registered.
pszName String that holds a unique name that is to be given to the new window.
Returns:
Pointer to the newly created Window object, or NULL if creation failed.
Note:
If a Window of the same name exists, it will be returned, even if it is not the same type. If the Window cannot be created, NULL will be returned.

DICEGUIWindow* DigitalSpaces::DICEGUI1::getWindow ( const char *  pszName  ) 

Return a pointer to the specified Window object.

Parameters:
pszName String holding the name of the Window object to be returned.
Returns:
Pointer to the Window object with the name name, or NULL if not found.

DICEGUIWindow* DigitalSpaces::DICEGUI1::loadWindowLayout ( const char *  pszFileName  ) 

Creates a set of windows (a Gui layout) from the information in the specified XML file.

Parameters:
pszFileName String object holding the filename of the XML file to be processed.
Returns:
Pointer to the root Window object defined in the layout, or NULL if it could not be loaded.
Note:
A common use of this is to load an XML file, then using the returned Window, get the current root Window, and add it as a child. This is not done automatically.

DICEGUIWindow* DigitalSpaces::DICEGUI1::loadGzipWindowLayoutFromMemory ( const char *  pszGzippedData,
unsigned long  dataLength 
)

void DigitalSpaces::DICEGUI1::getMouseCursorPosition ( out_Pairf position  ) 

Return the mouse cursor position.

Parameters:
[out] position The position of the cursor. Values range from 0.0 to 1.0, where 0,0 is the top left and 1,1 is the bottom right.

void DigitalSpaces::DICEGUI1::setGUISize ( unsigned int  width,
unsigned int  height 
)

Resize the GUI.

Needs to be called after a screen mode change.


The documentation for this struct was generated from the following file:

Generated on Sun Aug 31 17:46:30 2008 for Digital Spaces by  doxygen 1.5.6