The System class is the CEGUI class that provides access to all other elements in this system. More...
Inherits GUI::EventSet.
Public Member Functions | |
Renderer | getRenderer () |
Return a pointer to the Renderer object being used by the system. | |
void | setDefaultFont (string name) |
Set the default font to be used by the system. | |
void | setDefaultFont (Font font) |
Set the default font to be used by the system. | |
Font | getDefaultFont () |
Return a pointer to the default Font for the GUI system. | |
void | signalRedraw () |
Causes a full re-draw next time renderGUI() is called. | |
bool | isRedrawRequested () |
Return a boolean value to indicate whether a full re-draw is requested next time renderGUI() is called. | |
void | renderGUI () |
Render the GUI. | |
Window | setGUISheet (Window sheet) |
Set the active GUI sheet (root) window. | |
Window | getGUISheet () |
Return a pointer to the active GUI sheet (root) window. | |
float | getSingleClickTimeout () |
Return the current timeout for generation of single-click events. | |
float | getMultiClickTimeout () |
Return the current timeout for generation of multi-click events. | |
Size | getMultiClickToleranceAreaSize () |
Return the size of the allowable mouse movement tolerance used when generating multi-click events. | |
void | setSingleClickTimeout (float timeout) |
Set the timeout used for generation of single-click events. | |
void | setMultiClickTimeout (float timeout) |
Set the timeout to be used for the generation of multi-click events. | |
void | setMultiClickToleranceAreaSize (Size sz) |
Set the size of the allowable mouse movement tolerance used when generating multi-click events. | |
Image | getDefaultMouseCursor () |
Return the currently set default mouse cursor image. | |
void | setDefaultMouseCursor (string imageset, string image_name) |
Set the image to be used as the default mouse cursor. | |
Window | getWindowContainingMouse () |
Return the Window object that the mouse is presently within. | |
void | executeScriptFile (string filename) |
Execute a script file if possible. | |
int | executeScriptGlobal (string function_name) |
Execute a scripted global function if possible. The function should not take any parameters and should return an integer. | |
void | executeScriptString (string str) |
If possible, execute script code contained in the given CEGUI::String object. | |
float | getMouseMoveScaling () |
return the current mouse movement scaling factor. | |
void | setMouseMoveScaling (float scaling) |
Set the current mouse movement scaling factor. | |
void | notifyWindowDestroyed (Window window) |
Internal method used to inform the System object whenever a window is destroyed, so that System can perform any required housekeeping. | |
bool | isSystemKeyDown (int k) |
Return the current state of the given system key. | |
void | setDefaultTooltip (Tooltip tooltip) |
Set the system default Tooltip object. This value may be NULL to indicate that no default Tooltip will be available. | |
void | setDefaultTooltip (string tooltipType) |
Set the system default Tooltip to be used by specifying a Window type. | |
Tooltip | getDefaultTooltip () |
return a poiter to the system default tooltip. May return 0. | |
bool | injectMouseMove (float delta_x, float delta_y) |
Method that injects a mouse movement event into the system. | |
bool | injectMouseLeaves (void) |
Method that injects that the mouse has left the application window. | |
bool | injectMouseButtonDown (int button) |
Method that injects a mouse button down event into the system. | |
bool | injectMouseButtonUp (int button) |
Method that injects a mouse button up event into the system. | |
bool | injectKeyDown (int key_code) |
Method that injects a key down event into the system. | |
bool | injectKeyUp (int key_code) |
Method that injects a key up event into the system. | |
bool | injectChar (int code_point) |
Method that injects a typed character event into the system. | |
bool | injectMouseWheelChange (float delta) |
Method that injects a mouse-wheel / scroll-wheel event into the system. | |
bool | injectMousePosition (float x_pos, float y_pos) |
Method that injects a new position for the mouse cursor. | |
bool | injectTimePulse (float timeElapsed) |
Method to inject time pulses into the system. | |
Public Member Functions inherited from GUI::EventSet | |
void | addEvent (string name) |
Add a new Event to the EventSet with the given name. | |
void | removeEvent (string name) |
Removes the Event with the given name. All connections to the event are disconnected. | |
void | removeAllEvents () |
Remove all Event objects from the EventSet. | |
bool | isEventPresent (string name) |
Checks to see if an Event with the given name is present in the EventSet. | |
EventConnection | subscribeEvent (string name, string subscriber_name) |
Subscribes the named Event to a scripted funtion. | |
void | fireEvent (string name, EventArgs args, string eventNamespace="") |
Fires the named event passing the given EventArgs object. | |
bool | isMuted () |
Return whether the EventSet is muted or not. | |
void | setMutedState (bool setting) |
Set the mute state for this EventSet. |
Additional Inherited Members | |
Public Attributes inherited from GUI::EventSet | |
Event | Event |
Can be used to iterate over the events currently added to the EventSet. |
The System class is the CEGUI class that provides access to all other elements in this system.
This object must be created by the client application. The System object requires that you pass it an initialised Renderer object which it can use to interface to whatever rendering system will be used to display the GUI imagery.
Renderer GUI::System::getRenderer | ( | ) |
void GUI::System::setDefaultFont | ( | string | name | ) |
Set the default font to be used by the system.
name | String object containing the name of the font to be used as the system default. |
void GUI::System::setDefaultFont | ( | Font | font | ) |
Set the default font to be used by the system.
font | Pointer to the font to be used as the system default. |
Font GUI::System::getDefaultFont | ( | ) |
void GUI::System::signalRedraw | ( | ) |
Causes a full re-draw next time renderGUI() is called.
bool GUI::System::isRedrawRequested | ( | ) |
Return a boolean value to indicate whether a full re-draw is requested next time renderGUI() is called.
void GUI::System::renderGUI | ( | ) |
Render the GUI.
Depending upon the internal state, this may either re-use rendering from last time, or trigger a full re-draw from all elements.
Set the active GUI sheet (root) window.
sheet | Pointer to a Window object that will become the new GUI 'root' |
Window GUI::System::getGUISheet | ( | ) |
Return a pointer to the active GUI sheet (root) window.
float GUI::System::getSingleClickTimeout | ( | ) |
Return the current timeout for generation of single-click events.
A single-click is defined here as a button being pressed and then released.
float GUI::System::getMultiClickTimeout | ( | ) |
Return the current timeout for generation of multi-click events.
A multi-click event is a double-click, or a triple-click. The value returned here is the maximum allowable time between mouse button down events for which a multi-click event will be generated.
Size GUI::System::getMultiClickToleranceAreaSize | ( | ) |
Return the size of the allowable mouse movement tolerance used when generating multi-click events.
This size defines an area with the mouse at the centre. The mouse must stay within the tolerance defined for a multi-click (double click, or triple click) event to be generated.
void GUI::System::setSingleClickTimeout | ( | float | timeout | ) |
Set the timeout used for generation of single-click events.
A single-click is defined here as a button being pressed and then released.
timeout | float value equal to the single-click timeout value to be used from now onwards. |
void GUI::System::setMultiClickTimeout | ( | float | timeout | ) |
Set the timeout to be used for the generation of multi-click events.
A multi-click event is a double-click, or a triple-click. The value returned here is the maximum allowable time between mouse button down events for which a multi-click event will be generated.
timeout | float value equal to the multi-click timeout value to be used from now onwards. |
void GUI::System::setMultiClickToleranceAreaSize | ( | Size | sz | ) |
Set the size of the allowable mouse movement tolerance used when generating multi-click events.
This size defines an area with the mouse at the centre. The mouse must stay within the tolerance defined for a multi-click (double click, or triple click) event to be generated.
sz | Size object describing the multi-click tolerance area size to be used. |
Image GUI::System::getDefaultMouseCursor | ( | ) |
Return the currently set default mouse cursor image.
void GUI::System::setDefaultMouseCursor | ( | string | imageset, |
string | image_name | ||
) |
Set the image to be used as the default mouse cursor.
imageset | String object that contains the name of the Imageset that contains the image to be used. |
image_name | String object that contains the name of the Image on imageset that is to be used. |
UnknownObjectException | thrown if imageset is not known, or if imageset contains no Image named image_name. |
Window GUI::System::getWindowContainingMouse | ( | ) |
void GUI::System::executeScriptFile | ( | string | filename | ) |
Execute a script file if possible.
filename | String object holding the filename of the script file that is to be executed |
int GUI::System::executeScriptGlobal | ( | string | function_name | ) |
Execute a scripted global function if possible. The function should not take any parameters and should return an integer.
function_name | String object holding the name of the function, in the global script environment, that is to be executed. |
void GUI::System::executeScriptString | ( | string | str | ) |
If possible, execute script code contained in the given CEGUI::String object.
str | String object holding the valid script code that should be executed. |
float GUI::System::getMouseMoveScaling | ( | ) |
return the current mouse movement scaling factor.
void GUI::System::setMouseMoveScaling | ( | float | scaling | ) |
Set the current mouse movement scaling factor.
scaling | float value specifying the scaling to be applied to mouse movement inputs. |
void GUI::System::notifyWindowDestroyed | ( | Window | window | ) |
bool GUI::System::isSystemKeyDown | ( | int | k | ) |
Return the current state of the given system key.
k | system key to check |
void GUI::System::setDefaultTooltip | ( | Tooltip | tooltip | ) |
Set the system default Tooltip object. This value may be NULL to indicate that no default Tooltip will be available.
tooltip | Pointer to a valid Tooltip based object which should be used as the default tooltip for the system, or NULL to indicate that no system default tooltip is required. Note that when passing a pointer to a Tooltip object, ownership of the Tooltip does not pass to System. |
void GUI::System::setDefaultTooltip | ( | string | tooltipType | ) |
Set the system default Tooltip to be used by specifying a Window type.
System will internally attempt to create an instance of the specified window type (which must be derived from the base Tooltip class). If the Tooltip creation fails, the error is logged and no system default Tooltip will be available.
tooltipType | String object holding the name of the Tooltip based Window type which should be used as the Tooltip for the system default. |
Tooltip GUI::System::getDefaultTooltip | ( | ) |
return a poiter to the system default tooltip. May return 0.
bool GUI::System::injectMouseMove | ( | float | delta_x, |
float | delta_y | ||
) |
Method that injects a mouse movement event into the system.
delta_x | amount the mouse moved on the x axis. |
delta_y | amount the mouse moved on the y axis. |
bool GUI::System::injectMouseLeaves | ( | void | ) |
Method that injects that the mouse has left the application window.
bool GUI::System::injectMouseButtonDown | ( | int | button | ) |
Method that injects a mouse button down event into the system.
button | One of the MouseButton values indicating which button was pressed. |
bool GUI::System::injectMouseButtonUp | ( | int | button | ) |
Method that injects a mouse button up event into the system.
button | One of the MouseButton values indicating which button was released. |
bool GUI::System::injectKeyDown | ( | int | key_code | ) |
Method that injects a key down event into the system.
key_code | int value indicating which key was pressed. |
bool GUI::System::injectKeyUp | ( | int | key_code | ) |
Method that injects a key up event into the system.
key_code | int value indicating which key was released. |
bool GUI::System::injectChar | ( | int | code_point | ) |
Method that injects a typed character event into the system.
code_point | Unicode code point of the character that was typed. |
bool GUI::System::injectMouseWheelChange | ( | float | delta | ) |
Method that injects a mouse-wheel / scroll-wheel event into the system.
delta | float value representing the amount the wheel moved. |
bool GUI::System::injectMousePosition | ( | float | x_pos, |
float | y_pos | ||
) |
Method that injects a new position for the mouse cursor.
x_pos | New absolute pixel position of the mouse cursor on the x axis. |
y_pos | New absolute pixel position of the mouse cursoe in the y axis. |
bool GUI::System::injectTimePulse | ( | float | timeElapsed | ) |
Method to inject time pulses into the system.
timeElapsed | float value indicating the amount of time passed, in seconds, since the last time this method was called. |