Crazy Eddies GUI System  0.7.2
Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
CEGUI::System Class Reference

The System class is the CEGUI class that provides access to all other elements in this system. More...

+ Inheritance diagram for CEGUI::System:
+ Collaboration diagram for CEGUI::System:

Public Member Functions

RenderergetRenderer (void) const
 Return a pointer to the Renderer object being used by the system. More...
 
void setDefaultFont (const String &name)
 Set the default font to be used by the system. More...
 
void setDefaultFont (Font *font)
 Set the default font to be used by the system. More...
 
FontgetDefaultFont (void) const
 Return a pointer to the default Font for the GUI system. More...
 
void signalRedraw ()
 Causes a full re-draw next time renderGUI() is called. More...
 
bool isRedrawRequested () const
 Return a boolean value to indicate whether a full re-draw is requested next time renderGUI() is called. More...
 
void renderGUI (void)
 Render the GUI. More...
 
WindowsetGUISheet (Window *sheet)
 Set the active GUI sheet (root) window. More...
 
WindowgetGUISheet (void) const
 Return a pointer to the active GUI sheet (root) window. More...
 
double getSingleClickTimeout (void) const
 Return the current timeout for generation of single-click events. More...
 
double getMultiClickTimeout (void) const
 Return the current timeout for generation of multi-click events. More...
 
const SizegetMultiClickToleranceAreaSize (void) const
 Return the size of the allowable mouse movement tolerance used when generating multi-click events. More...
 
void setSingleClickTimeout (double timeout)
 Set the timeout used for generation of single-click events. More...
 
void setMultiClickTimeout (double timeout)
 Set the timeout to be used for the generation of multi-click events. More...
 
void setMultiClickToleranceAreaSize (const Size &sz)
 Set the size of the allowable mouse movement tolerance used when generating multi-click events. More...
 
bool isMouseClickEventGenerationEnabled () const
 Return whether automatic mouse button click and multi-click (i.e. double-click and treble-click) event generation is enabled. More...
 
void setMouseClickEventGenerationEnabled (const bool enable)
 Set whether automatic mouse button click and multi-click (i.e. double-click and treble-click) event generation will occur. More...
 
const ImagegetDefaultMouseCursor (void) const
 Return the currently set default mouse cursor image. More...
 
void setDefaultMouseCursor (const Image *image)
 Set the image to be used as the default mouse cursor. More...
 
void setDefaultMouseCursor (MouseCursorImage image)
 Set the image to be used as the default mouse cursor. More...
 
void setDefaultMouseCursor (const String &imageset, const String &image_name)
 Set the image to be used as the default mouse cursor. More...
 
WindowgetWindowContainingMouse (void) const
 Return the Window object that the mouse is presently within. More...
 
ScriptModulegetScriptingModule (void) const
 Return a pointer to the ScriptModule being used for scripting within the GUI system. More...
 
void setScriptingModule (ScriptModule *scriptModule)
 Set the ScriptModule to be used for scripting within the GUI system. More...
 
ResourceProvidergetResourceProvider (void) const
 Return a pointer to the ResourceProvider being used within the GUI system. More...
 
void executeScriptFile (const String &filename, const String &resourceGroup="") const
 Execute a script file if possible. More...
 
int executeScriptGlobal (const String &function_name) const
 Execute a scripted global function if possible. The function should not take any parameters and should return an integer. More...
 
void executeScriptString (const String &str) const
 If possible, execute script code contained in the given CEGUI::String object. More...
 
float getMouseMoveScaling (void) const
 return the current mouse movement scaling factor. More...
 
void setMouseMoveScaling (float scaling)
 Set the current mouse movement scaling factor. More...
 
void notifyWindowDestroyed (const Window *window)
 Internal method used to inform the System object whenever a window is destroyed, so that System can perform any required housekeeping. More...
 
uint getSystemKeys (void) const
 Return the current system keys value. More...
 
void setXMLParser (const String &parserName)
 Set a new XML parser module to be used. More...
 
void setXMLParser (XMLParser *parser)
 Sets the XMLParser object to be used by the system. More...
 
XMLParsergetXMLParser (void) const
 Return the XMLParser object.
 
void setDefaultTooltip (Tooltip *tooltip)
 Set the system default Tooltip object. This value may be NULL to indicate that no default Tooltip will be available. More...
 
void setDefaultTooltip (const String &tooltipType)
 Set the system default Tooltip to be used by specifying a Window type. More...
 
TooltipgetDefaultTooltip (void) const
 return a poiter to the system default tooltip. May return 0. More...
 
void setModalTarget (Window *target)
 Internal method to directly set the current modal target. More...
 
WindowgetModalTarget (void) const
 Return a pointer to the Window that is currently the modal target. More...
 
bool updateWindowContainingMouse ()
 Perform updates with regards to the window that contains the mouse cursor, firing any required MouseEnters / MouseLeaves events. More...
 
ImageCodecgetImageCodec () const
 Retrieve the image codec to be used by the system.
 
void setImageCodec (const String &codecName)
 Set the image codec to be used by the system.
 
void setImageCodec (ImageCodec &codec)
 Set the image codec to use from an existing image codec. More...
 
void notifyDisplaySizeChanged (const Size &new_size)
 Notification function to be called when the main display changes size. Client code should call this function when the host window changes size, or if the display resolution is changed in full-screen mode. More...
 
RenderedStringParsergetDefaultCustomRenderedStringParser () const
 Return pointer to the currently set global default custom RenderedStringParser object. More...
 
void setDefaultCustomRenderedStringParser (RenderedStringParser *parser)
 Set the global default custom RenderedStringParser object. This change is reflected the next time an affected window reparses it's text. This may be set to 0 for no system wide custom parser (which is the default). More...
 
void invalidateAllCachedRendering ()
 Invalidate all imagery and geometry caches for CEGUI managed elements. More...
 
bool injectMouseMove (float delta_x, float delta_y)
 Method that injects a mouse movement event into the system. More...
 
bool injectMouseLeaves (void)
 Method that injects that the mouse has left the application window. More...
 
bool injectMouseButtonDown (MouseButton button)
 Method that injects a mouse button down event into the system. More...
 
bool injectMouseButtonUp (MouseButton button)
 Method that injects a mouse button up event into the system. More...
 
bool injectKeyDown (uint key_code)
 Method that injects a key down event into the system. More...
 
bool injectKeyUp (uint key_code)
 Method that injects a key up event into the system. More...
 
bool injectChar (utf32 code_point)
 Method that injects a typed character event into the system. More...
 
bool injectMouseWheelChange (float delta)
 Method that injects a mouse-wheel / scroll-wheel event into the system. More...
 
bool injectMousePosition (float x_pos, float y_pos)
 Method that injects a new position for the mouse cursor. More...
 
bool injectTimePulse (float timeElapsed)
 Method to inject time pulses into the system. More...
 
bool injectMouseButtonClick (const MouseButton button)
 Function to directly inject a mouse button click event. More...
 
bool injectMouseButtonDoubleClick (const MouseButton button)
 Function to directly inject a mouse button double-click event. More...
 
bool injectMouseButtonTripleClick (const MouseButton button)
 Function to directly inject a mouse button triple-click event. More...
 
- Public Member Functions inherited from CEGUI::EventSet
 EventSet ()
 Constructor for EventSet objects.
 
virtual ~EventSet (void)
 Destructor for EventSet objects.
 
void addEvent (const String &name)
 Add a new Event to the EventSet with the given name. More...
 
void removeEvent (const String &name)
 Removes the Event with the given name. All connections to the event are disconnected. More...
 
void removeAllEvents (void)
 Remove all Event objects from the EventSet. More...
 
bool isEventPresent (const String &name)
 Checks to see if an Event with the given name is present in the EventSet. More...
 
virtual Event::Connection subscribeEvent (const String &name, Event::Subscriber subscriber)
 Subscribes a handler to the named Event. If the named Event is not yet present in the EventSet, it is created and added. More...
 
virtual Event::Connection subscribeEvent (const String &name, Event::Group group, Event::Subscriber subscriber)
 Subscribes a handler to the specified group of the named Event. If the named Event is not yet present in the EventSet, it is created and added. More...
 
virtual Event::Connection subscribeScriptedEvent (const String &name, const String &subscriber_name)
 Subscribes the named Event to a scripted funtion. More...
 
virtual Event::Connection subscribeScriptedEvent (const String &name, Event::Group group, const String &subscriber_name)
 Subscribes the specified group of the named Event to a scripted funtion. More...
 
virtual void fireEvent (const String &name, EventArgs &args, const String &eventNamespace="")
 Fires the named event passing the given EventArgs object. More...
 
bool isMuted (void) const
 Return whether the EventSet is muted or not. More...
 
void setMutedState (bool setting)
 Set the mute state for this EventSet. More...
 
Iterator getIterator (void) const
 Return a EventSet::Iterator object to iterate over the events currently added to the EventSet.
 

Static Public Member Functions

static Systemcreate (Renderer &renderer, ResourceProvider *resourceProvider=0, XMLParser *xmlParser=0, ImageCodec *imageCodec=0, ScriptModule *scriptModule=0, const String &configFile="", const String &logFile="CEGUI.log")
 Create the System object and return a reference to it. More...
 
static void destroy ()
 Destroy the System object.
 
static SystemgetSingleton (void)
 Return singleton System object. More...
 
static SystemgetSingletonPtr (void)
 Return pointer to singleton System object. More...
 
static void setDefaultXMLParserName (const String &parserName)
 Static member to set the name of the default XML parser module that should be used. More...
 
static const String getDefaultXMLParserName ()
 Return the name of the currently set default xml parser module. More...
 
static void setDefaultImageCodecName (const String &codecName)
 Set the name of the default image codec to be used.
 
static const StringgetDefaultImageCodecName ()
 Get the name of the default image codec.
 
- Static Public Member Functions inherited from CEGUI::Singleton< System >
static SystemgetSingleton (void)
 
static SystemgetSingletonPtr (void)
 

Static Public Attributes

static const String EventNamespace
 Namespace for global events.
 
static const double DefaultSingleClickTimeout
 Default timeout for generation of single click events.
 
static const double DefaultMultiClickTimeout
 Default timeout for generation of multi-click events.
 
static const Size DefaultMultiClickAreaSize
 Default allowable mouse movement for multi-click event generation.
 
static const String EventGUISheetChanged
 
static const String EventSingleClickTimeoutChanged
 
static const String EventMultiClickTimeoutChanged
 
static const String EventMultiClickAreaSizeChanged
 
static const String EventDefaultFontChanged
 
static const String EventDefaultMouseCursorChanged
 
static const String EventMouseMoveScalingChanged
 
static const String EventDisplaySizeChanged
 
static const String EventRenderedStringParserChanged
 

Additional Inherited Members

- Public Types inherited from CEGUI::EventSet
typedef ConstBaseIterator
< EventMap > 
Iterator
 
- Protected Types inherited from CEGUI::EventSet
typedef std::map< String,
Event
*, String::FastLessCompare
EventMap
 
- Protected Member Functions inherited from CEGUI::EventSet
EventgetEventObject (const String &name, bool autoAdd=false)
 Return a pointer to the Event object with the given name, optionally adding such an Event object to the EventSet if it does not already exist. More...
 
void fireEvent_impl (const String &name, EventArgs &args)
 Implementation event firing member.
 
 EventSet (EventSet &)
 
EventSetoperator= (EventSet &)
 
- Protected Attributes inherited from CEGUI::EventSet
EventMap d_events
 
bool d_muted
 true if events for this EventSet have been muted.
 
- Static Protected Attributes inherited from CEGUI::Singleton< System >
static Systemms_Singleton
 

Detailed Description

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.

Member Function Documentation

static System& CEGUI::System::create ( Renderer renderer,
ResourceProvider resourceProvider = 0,
XMLParser xmlParser = 0,
ImageCodec imageCodec = 0,
ScriptModule scriptModule = 0,
const String configFile = "",
const String logFile = "CEGUI.log" 
)
static

Create the System object and return a reference to it.

Parameters
rendererReference to a valid Renderer object that will be used to render GUI imagery.
resourceProviderPointer to a ResourceProvider object, or NULL to use whichever default the Renderer provides.
xmlParserPointer to a valid XMLParser object to be used when parsing XML files, or NULL to use a default parser.
imageCodecPointer to a valid ImageCodec object to be used when loading image files, or NULL to use a default image codec.
scriptModulePointer to a ScriptModule object. may be NULL for none.
configFileString object containing the name of a configuration file to use.
logFileString object containing the name to use for the log file.
void CEGUI::System::executeScriptFile ( const String filename,
const String resourceGroup = "" 
) const

Execute a script file if possible.

Parameters
filenameString object holding the filename of the script file that is to be executed
resourceGroupResource group identifier to be passed to the ResourceProvider when loading the script file.
int CEGUI::System::executeScriptGlobal ( const String function_name) const

Execute a scripted global function if possible. The function should not take any parameters and should return an integer.

Parameters
function_nameString object holding the name of the function, in the global script environment, that is to be executed.
Returns
The integer value returned from the script function.
void CEGUI::System::executeScriptString ( const String str) const

If possible, execute script code contained in the given CEGUI::String object.

Parameters
strString object holding the valid script code that should be executed.
Returns
Nothing.
RenderedStringParser* CEGUI::System::getDefaultCustomRenderedStringParser ( ) const

Return pointer to the currently set global default custom RenderedStringParser object.

The returned RenderedStringParser is used for all windows that have parsing enabled and no custom RenderedStringParser set on the window itself.

If this global custom RenderedStringParser is set to 0, then all windows with parsing enabled and no custom RenderedStringParser set on the window itself will use the systems BasicRenderedStringParser.

Font* CEGUI::System::getDefaultFont ( void  ) const
inline

Return a pointer to the default Font for the GUI system.

Returns
Pointer to a Font object that is the default font in the system.
const Image* CEGUI::System::getDefaultMouseCursor ( void  ) const
inline

Return the currently set default mouse cursor image.

Returns
Pointer to the current default image used for the mouse cursor. May return NULL if default cursor has not been set, or has intentionally been set to NULL - which results in a blank default cursor.
Tooltip* CEGUI::System::getDefaultTooltip ( void  ) const

return a poiter to the system default tooltip. May return 0.

Returns
Pointer to the current system default tooltip. May return 0 if no system default tooltip is available.
static const String CEGUI::System::getDefaultXMLParserName ( )
static

Return the name of the currently set default xml parser module.

Returns
String holding the currently set default xml parser name. Note that if this name has been changed after instantiating the system, the name returned may not actually correspond to the module in use.
Window* CEGUI::System::getGUISheet ( void  ) const
inline

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

Returns
Pointer to the window object that has been set as the GUI root element.
Window* CEGUI::System::getModalTarget ( void  ) const
inline

Return a pointer to the Window that is currently the modal target.

Returns
Pointer to the current modal target. NULL if there is no modal target.
float CEGUI::System::getMouseMoveScaling ( void  ) const

return the current mouse movement scaling factor.

Returns
float value that is equal to the currently set mouse movement scaling factor. Defaults to 1.0f.
double CEGUI::System::getMultiClickTimeout ( void  ) const
inline

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.
Returns
double value equal to the current multi-click timeout value.
const Size& CEGUI::System::getMultiClickToleranceAreaSize ( void  ) const
inline

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.
Returns
Size object describing the current multi-click tolerance area size.
Renderer* CEGUI::System::getRenderer ( void  ) const
inline

Return a pointer to the Renderer object being used by the system.

Returns
Pointer to the Renderer object used by the system.
ResourceProvider* CEGUI::System::getResourceProvider ( void  ) const

Return a pointer to the ResourceProvider being used within the GUI system.

Returns
Pointer to a ResourceProvider based object.

Referenced by CEGUI::NamedXMLResourceManager< T, U >::createAll().

ScriptModule* CEGUI::System::getScriptingModule ( void  ) const

Return a pointer to the ScriptModule being used for scripting within the GUI system.

Returns
Pointer to a ScriptModule based object.
double CEGUI::System::getSingleClickTimeout ( void  ) const
inline

Return the current timeout for generation of single-click events.

    A single-click is defined here as a button being pressed and then released.
Returns
double value equal to the current single-click timeout value.
static System& CEGUI::System::getSingleton ( void  )
static
static System* CEGUI::System::getSingletonPtr ( void  )
static

Return pointer to singleton System object.

Returns
Pointer to singleton System object
uint CEGUI::System::getSystemKeys ( void  ) const
inline

Return the current system keys value.

Returns
uint value representing a combination of the SystemKey bits.
Window* CEGUI::System::getWindowContainingMouse ( void  ) const
inline

Return the Window object that the mouse is presently within.

Returns
Pointer to the Window object that currently contains the mouse cursor, or NULL if none.
bool CEGUI::System::injectChar ( utf32  code_point)

Method that injects a typed character event into the system.

Parameters
code_pointUnicode code point of the character that was typed.
Returns
  • true if the input was processed by the gui system.
  • false if the input was not processed by the gui system.
bool CEGUI::System::injectKeyDown ( uint  key_code)

Method that injects a key down event into the system.

Parameters
key_codeuint value indicating which key was pressed.
Returns
  • true if the input was processed by the gui system.
  • false if the input was not processed by the gui system.
bool CEGUI::System::injectKeyUp ( uint  key_code)

Method that injects a key up event into the system.

Parameters
key_codeuint value indicating which key was released.
Returns
  • true if the input was processed by the gui system.
  • false if the input was not processed by the gui system.
bool CEGUI::System::injectMouseButtonClick ( const MouseButton  button)

Function to directly inject a mouse button click event.

Here 'click' means a mouse button down event followed by a mouse
button up event.
Note
Under normal, default settings, this event is automatically generated by the system from the regular up and down events you inject. You may use this function directly, though you'll probably want to disable the automatic click event generation first by using the setMouseClickEventGenerationEnabled function - this setting controls the auto-generation of events and also determines the default 'handled' state of the injected click events according to the rules used for mouse up/down events.
Parameters
buttonOne of the MouseButton enumerated values.
Returns
  • true if some window or handler reported that it handled the event.
  • false if nobody handled the event.
bool CEGUI::System::injectMouseButtonDoubleClick ( const MouseButton  button)

Function to directly inject a mouse button double-click event.

Here 'double-click' means a single mouse button had the sequence down,
up, down within a predefined period of time.
Note
Under normal, default settings, this event is automatically generated by the system from the regular up and down events you inject. You may use this function directly, though you'll probably want to disable the automatic click event generation first by using the setMouseClickEventGenerationEnabled function - this setting controls the auto-generation of events and also determines the default 'handled' state of the injected click events according to the rules used for mouse up/down events.
Parameters
buttonOne of the MouseButton enumerated values.
Returns
  • true if some window or handler reported that it handled the event.
  • false if nobody handled the event.
bool CEGUI::System::injectMouseButtonDown ( MouseButton  button)

Method that injects a mouse button down event into the system.

Parameters
buttonOne of the MouseButton values indicating which button was pressed.
Returns
  • true if the input was processed by the gui system.
  • false if the input was not processed by the gui system.

Referenced by CEGUI::IrrlichtEventPusher::OnMouse().

bool CEGUI::System::injectMouseButtonTripleClick ( const MouseButton  button)

Function to directly inject a mouse button triple-click event.

Here 'triple-click' means a single mouse button had the sequence down,
up, down, up, down within a predefined period of time.
Note
Under normal, default settings, this event is automatically generated by the system from the regular up and down events you inject. You may use this function directly, though you'll probably want to disable the automatic click event generation first by using the setMouseClickEventGenerationEnabled function - this setting controls the auto-generation of events and also determines the default 'handled' state of the injected click events according to the rules used for mouse up/down events.
Parameters
buttonOne of the MouseButton enumerated values.
Returns
  • true if some window or handler reported that it handled the event.
  • false if nobody handled the event.
bool CEGUI::System::injectMouseButtonUp ( MouseButton  button)

Method that injects a mouse button up event into the system.

Parameters
buttonOne of the MouseButton values indicating which button was released.
Returns
  • true if the input was processed by the gui system.
  • false if the input was not processed by the gui system.

Referenced by CEGUI::IrrlichtEventPusher::OnMouse().

bool CEGUI::System::injectMouseLeaves ( void  )

Method that injects that the mouse has left the application window.

Returns
  • true if the generated mouse move event was handled.
  • false if the generated mouse move event was not handled.
bool CEGUI::System::injectMouseMove ( float  delta_x,
float  delta_y 
)

Method that injects a mouse movement event into the system.

Parameters
delta_xamount the mouse moved on the x axis.
delta_yamount the mouse moved on the y axis.
Returns
  • true if the input was processed by the gui system.
  • false if the input was not processed by the gui system.
bool CEGUI::System::injectMousePosition ( float  x_pos,
float  y_pos 
)

Method that injects a new position for the mouse cursor.

Parameters
x_posNew absolute pixel position of the mouse cursor on the x axis.
y_posNew absolute pixel position of the mouse cursoe in the y axis.
Returns
  • true if the generated mouse move event was handled.
  • false if the generated mouse move event was not handled.

Referenced by CEGUI::IrrlichtEventPusher::OnMouse().

bool CEGUI::System::injectMouseWheelChange ( float  delta)

Method that injects a mouse-wheel / scroll-wheel event into the system.

Parameters
deltafloat value representing the amount the wheel moved.
Returns
  • true if the input was processed by the gui system.
  • false if the input was not processed by the gui system.

Referenced by CEGUI::IrrlichtEventPusher::OnMouse().

bool CEGUI::System::injectTimePulse ( float  timeElapsed)

Method to inject time pulses into the system.

Parameters
timeElapsedfloat value indicating the amount of time passed, in seconds, since the last time this method was called.
Returns
Currently, this method always returns true.
void CEGUI::System::invalidateAllCachedRendering ( )

Invalidate all imagery and geometry caches for CEGUI managed elements.

This function will invalidate the caches used for both imagery and geometry for all content that is managed by the core CEGUI manager objects, causing a full and total redraw of that content. This includes Window object's cached geometry, rendering surfaces and rendering windows and the mouse pointer geometry.

bool CEGUI::System::isMouseClickEventGenerationEnabled ( ) const

Return whether automatic mouse button click and multi-click (i.e. double-click and treble-click) event generation is enabled.

Returns
  • true if mouse button click and multi-click events will be automatically generated by the system from the basic button up and down event injections.
  • false if no automatic generation of events will occur. In this instance the user may wish to use the additional event injectors to manually inform the system of such events.
bool CEGUI::System::isRedrawRequested ( ) const
inline

Return a boolean value to indicate whether a full re-draw is requested next time renderGUI() is called.

Returns
true if a re-draw has been requested
void CEGUI::System::notifyDisplaySizeChanged ( const Size new_size)

Notification function to be called when the main display changes size. Client code should call this function when the host window changes size, or if the display resolution is changed in full-screen mode.

Calling this function ensures that any other parts of the system that
need to know about display size changes are notified.  This affects
things such as the MouseCursor default constraint area, and also the
auto-scale functioning of Imagesets and Fonts.
Note
This function will also fire the System::EventDisplaySizeChanged event.
Parameters
new_sizeSize object describing the new display size in pixels.
void CEGUI::System::notifyWindowDestroyed ( const Window window)

Internal method used to inform the System object whenever a window is destroyed, so that System can perform any required housekeeping.

Note
This method is not intended for client code usage. If you use this method anything can, and probably will, go wrong!
void CEGUI::System::renderGUI ( void  )

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.
Returns
Nothing
void CEGUI::System::setDefaultCustomRenderedStringParser ( RenderedStringParser parser)

Set the global default custom RenderedStringParser object. This change is reflected the next time an affected window reparses it's text. This may be set to 0 for no system wide custom parser (which is the default).

The set RenderedStringParser is used for all windows that have parsing enabled and no custom RenderedStringParser set on the window itself.

If this global custom RenderedStringParser is set to 0, then all windows with parsing enabled and no custom RenderedStringParser set on the window itself will use the systems BasicRenderedStringParser.

void CEGUI::System::setDefaultFont ( const String name)

Set the default font to be used by the system.

Parameters
nameString object containing the name of the font to be used as the system default.
Returns
Nothing.
void CEGUI::System::setDefaultFont ( Font font)

Set the default font to be used by the system.

Parameters
fontPointer to the font to be used as the system default.
Returns
Nothing.
void CEGUI::System::setDefaultMouseCursor ( const Image image)

Set the image to be used as the default mouse cursor.

Parameters
imagePointer to an image object that is to be used as the default mouse cursor. To have no cursor rendered by default, you can specify NULL here.
Returns
Nothing.
void CEGUI::System::setDefaultMouseCursor ( MouseCursorImage  image)
inline

Set the image to be used as the default mouse cursor.

Parameters
imageOne of the MouseCursorImage enumerated values.
Returns
Nothing.

References setDefaultMouseCursor().

Referenced by setDefaultMouseCursor().

void CEGUI::System::setDefaultMouseCursor ( const String imageset,
const String image_name 
)

Set the image to be used as the default mouse cursor.

Parameters
imagesetString object that contains the name of the Imageset that contains the image to be used.
image_nameString object that contains the name of the Image on imageset that is to be used.
Returns
Nothing.
Exceptions
UnknownObjectExceptionthrown if imageset is not known, or if imageset contains no Image named image_name.
void CEGUI::System::setDefaultTooltip ( Tooltip tooltip)

Set the system default Tooltip object. This value may be NULL to indicate that no default Tooltip will be available.

Parameters
tooltipPointer 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.
Returns
Nothing.
void CEGUI::System::setDefaultTooltip ( const 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.
Parameters
tooltipTypeString object holding the name of the Tooltip based Window type which should be used as the Tooltip for the system default.
Returns
Nothing.
static void CEGUI::System::setDefaultXMLParserName ( const String parserName)
static

Static member to set the name of the default XML parser module that should be used.

If you want to modify the default parser from the one compiled in, you
need to call this static member prior to instantiating the main
CEGUI::System object.

Note that calling this member to change the name of the default module
after CEGUI::System, and therefore the default xml parser, has been
created will have no real effect - the default parser name will be
updated, though no actual changes to the xml parser module will occur.

The built-in options for this are:
 - XercesParser
 - ExpatParser
 - LibxmlParser
 - TinyXMLParser

Whether these are actually available, depends upon how you built the
system.  If you have some custom parser, you can provide the name of
that here to have it used as the default, though note that the
final filename of the parser module should be of the form:

[prefix]CEGUI[parserName][suffix]

where:
- [prefix] is some optional prefix; like 'lib' on linux.
- CEGUI is a required prefix.
- [parserName] is the name of the parser, as supplied to this function.
- [suffix] is the filename suffix, like .dll or .so

Final module filenames are, thus, of the form:
- CEGUIXercesParser.dll
- libCEGUIXercesParser.so
Parameters
parserNameString describing the name of the xml parser module to be used as the default.
Returns
Nothing.
Window* CEGUI::System::setGUISheet ( Window sheet)

Set the active GUI sheet (root) window.

Parameters
sheetPointer to a Window object that will become the new GUI 'root'
Returns
Pointer to the window that was previously set as the GUI root.
void CEGUI::System::setImageCodec ( ImageCodec codec)

Set the image codec to use from an existing image codec.

In this case the renderer does not take the ownership of the image codec
object.
Parameters
codecThe ImageCodec object to be used.
void CEGUI::System::setModalTarget ( Window target)
inline

Internal method to directly set the current modal target.

Note
This method is called internally by Window, and must be used by client code. Doing so will most likely not have the expected results.
void CEGUI::System::setMouseClickEventGenerationEnabled ( const bool  enable)

Set whether automatic mouse button click and multi-click (i.e. double-click and treble-click) event generation will occur.

Parameters
enable
  • true to have mouse button click and multi-click events automatically generated by the system from the basic button up and down event injections.
  • false if no automatic generation of events should occur. In this instance the user may wish to use the additional event injectors to manually inform the system of such events.
void CEGUI::System::setMouseMoveScaling ( float  scaling)

Set the current mouse movement scaling factor.

Parameters
scalingfloat value specifying the scaling to be applied to mouse movement inputs.
Returns
nothing.
void CEGUI::System::setMultiClickTimeout ( double  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.
Parameters
timeoutdouble value equal to the multi-click timeout value to be used from now onwards.
Note
A timeout value of 0 indicates infinity and so no timeout occurrs; as long as the mouse is in the prescribed area, an appropriate mouse button event will therefore always be raised.
Returns
Nothing.
void CEGUI::System::setMultiClickToleranceAreaSize ( const 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.
Parameters
szSize object describing the multi-click tolerance area size to be used.
Returns
Nothing.
void CEGUI::System::setScriptingModule ( ScriptModule scriptModule)

Set the ScriptModule to be used for scripting within the GUI system.

Parameters
scriptModulePointer to a ScriptModule based object, or 0 for none (be careful!)
Returns
Nothing
void CEGUI::System::setSingleClickTimeout ( double  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.
Parameters
timeoutdouble value equal to the single-click timeout value to be used from now onwards.
Note
A timeout value of 0 indicates infinity and so no timeout occurrs; as long as the mouse is in the prescribed area, a mouse button 'clicked' event will therefore always be raised.
Returns
Nothing.
void CEGUI::System::setXMLParser ( const String parserName)

Set a new XML parser module to be used.

The current XMLParser will be cleaned up and, if owned by the system,
also deleted, as will any dynamically loaded module associated with the
XMLParser object.  The newly created XMLParser object, and the
associated module will be owned by the system.
Parameters
parserNameString object describing the name of the XML parser module to be used.
void CEGUI::System::setXMLParser ( XMLParser parser)

Sets the XMLParser object to be used by the system.

The current XMLParser will be cleaned up and, if owned by the system,
also deleted, as will any dynamically loaded module associated with the
XMLParser object.

If the argument passed in the \a parser parameter is 0, the system will
cleanup any existing parser as described above, and revert to using
the parser provided by the default module (see getDefaultXMLParserName
and setDefaultXMLParserName).
Parameters
parserPointer to the XMLParser object to be used by the system, or 0 to cause the system to initialise a default parser.
void CEGUI::System::signalRedraw ( )
inline

Causes a full re-draw next time renderGUI() is called.

Returns
Nothing
bool CEGUI::System::updateWindowContainingMouse ( )

Perform updates with regards to the window that contains the mouse cursor, firing any required MouseEnters / MouseLeaves events.

Note
The CEGUI system components call this member as a matter of course, in most cases there will be no need for user / client code to call this member directly.
Returns
  • true if the window containing the mouse had changed.
  • false if the window containing the mouse had not changed.

Member Data Documentation

const String CEGUI::System::EventDefaultFontChanged
static

Event fired when the default font changes. Handlers are passed a const reference to a generic EventArgs struct.

const String CEGUI::System::EventDefaultMouseCursorChanged
static

Event fired when the default mouse cursor changes. Handlers are passed a const reference to a generic EventArgs struct.

const String CEGUI::System::EventDisplaySizeChanged
static

Event fired for display size changes (as notified by client code). Handlers are passed a const DisplayEventArgs reference with DisplayEventArgs::size set to the pixel size that was notifiied to the system.

const String CEGUI::System::EventGUISheetChanged
static

Event fired whenever the GUI sheet is changed. Handlers are passed a const WindowEventArgs reference with WindowEventArgs::window set to the old GUI sheet (the new one is obtained by querying System).

const String CEGUI::System::EventMouseMoveScalingChanged
static

Event fired when the mouse move scaling factor changes. Handlers are passed a const reference to a generic EventArgs struct.

const String CEGUI::System::EventMultiClickAreaSizeChanged
static

Event fired when the size of the multi-click tolerance area is changed. Handlers are passed a const reference to a generic EventArgs struct.

const String CEGUI::System::EventMultiClickTimeoutChanged
static

Event fired when the multi-click timeout is changed. Handlers are passed a const reference to a generic EventArgs struct.

const String CEGUI::System::EventRenderedStringParserChanged
static

Event fired when global custom RenderedStringParser is set. Handlers are passed a const reference to a generic EventArgs struct.

const String CEGUI::System::EventSingleClickTimeoutChanged
static

Event fired when the single-click timeout is changed. Handlers are passed a const reference to a generic EventArgs struct.