Crazy Eddies GUI System
0.6.0
|
The System class is the CEGUI class that provides access to all other elements in this system. More...
Public Member Functions | |
System (Renderer *renderer, ResourceProvider *resourceProvider=0, XMLParser *xmlParser=0, ScriptModule *scriptModule=0, const String &configFile="", const String &logFile="CEGUI.log") | |
Construct a new System object. More... | |
~System (void) | |
Destructor for System objects. | |
Renderer * | getRenderer (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... | |
Font * | getDefaultFont (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... | |
Window * | setGUISheet (Window *sheet) |
Set the active GUI sheet (root) window. More... | |
Window * | getGUISheet (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 Size & | getMultiClickToleranceAreaSize (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... | |
const Image * | getDefaultMouseCursor (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... | |
Window * | getWindowContainingMouse (void) const |
Return the Window object that the mouse is presently within. More... | |
ScriptModule * | getScriptingModule (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... | |
ResourceProvider * | getResourceProvider (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... | |
XMLParser * | getXMLParser (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... | |
Tooltip * | getDefaultTooltip (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... | |
Window * | getModalTarget (void) const |
Return a pointer to the Window that is currently the modal target. 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... | |
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 System & | getSingleton (void) |
Return singleton System object. More... | |
static System * | getSingletonPtr (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 Public Member Functions inherited from CEGUI::Singleton< System > | |
static System & | getSingleton (void) |
static System * | getSingletonPtr (void) |
Static Public Attributes | |
static const String | EventNamespace |
Namespace for global events. | |
static const double | DefaultSingleClickTimeout = 0.2 |
Default timeout for generation of single click events. | |
static const double | DefaultMultiClickTimeout = 0.33 |
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 |
Name of event fired whenever the GUI sheet is changed. | |
static const String | EventSingleClickTimeoutChanged |
Name of event fired when the single-click timeout is changed. | |
static const String | EventMultiClickTimeoutChanged |
Name of event fired when the multi-click timeout is changed. | |
static const String | EventMultiClickAreaSizeChanged |
Name of event fired when the size of the multi-click tolerance area is changed. | |
static const String | EventDefaultFontChanged |
Name of event fired when the default font changes. | |
static const String | EventDefaultMouseCursorChanged |
Name of event fired when the default mouse cursor changes. | |
static const String | EventMouseMoveScalingChanged |
Name of event fired when the mouse move scaling factor changes. | |
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 | |
Event * | getEventObject (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 &e) | |
EventSet & | operator= (EventSet &e) |
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 System * | ms_Singleton |
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.
CEGUI::System::System | ( | Renderer * | renderer, |
ResourceProvider * | resourceProvider = 0 , |
||
XMLParser * | xmlParser = 0 , |
||
ScriptModule * | scriptModule = 0 , |
||
const String & | configFile = "" , |
||
const String & | logFile = "CEGUI.log" |
||
) |
Construct a new System object.
renderer | Pointer to the valid Renderer object that will be used to render GUI imagery. |
resourceProvider | Pointer to a ResourceProvider object, or NULL to use whichever default the Renderer provides. |
xmlParser | Pointer to a valid XMLParser object to be used when parsing XML files, or NULL to use a default parser. |
scriptModule | Pointer to a ScriptModule object. may be NULL for none. |
configFile | String object containing the name of a configuration file to use. |
logFile | String object containing the name to use for the log file. |
References CEGUI::XMLParser::cleanup(), CEGUI::ScriptModule::createBindings(), CEGUI::String::empty(), CEGUI::Renderer::EventDisplaySizeChanged, executeScriptFile(), CEGUI::Config_xmlHandler::getDefaultFontName(), CEGUI::ResourceProvider::getDefaultResourceGroup(), CEGUI::Config_xmlHandler::getDefaultResourceGroup(), CEGUI::Config_xmlHandler::getInitScriptFilename(), CEGUI::Config_xmlHandler::getLayoutFilename(), CEGUI::Config_xmlHandler::getLogFilename(), CEGUI::Config_xmlHandler::getLoggingLevel(), CEGUI::Config_xmlHandler::getSchemeFilename(), CEGUI::Config_xmlHandler::getTermScriptFilename(), CEGUI::XMLParser::parseXMLFile(), setDefaultFont(), CEGUI::ResourceProvider::setDefaultResourceGroup(), setGUISheet(), CEGUI::EventSet::subscribeEvent(), and CEGUI::GUISheet::WidgetTypeName.
void CEGUI::System::executeScriptFile | ( | const String & | filename, |
const String & | resourceGroup = "" |
||
) | const |
Execute a script file if possible.
filename | String object holding the filename of the script file that is to be executed |
resourceGroup | Resource group identifier to be passed to the ResourceProvider when loading the script file. |
References CEGUI::Errors, and CEGUI::ScriptModule::executeScriptFile().
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.
function_name | String object holding the name of the function, in the global script environment, that is to be executed. |
References CEGUI::Errors, and CEGUI::ScriptModule::executeScriptGlobal().
void CEGUI::System::executeScriptString | ( | const String & | str | ) | const |
If possible, execute script code contained in the given CEGUI::String object.
str | String object holding the valid script code that should be executed. |
References CEGUI::Errors, and CEGUI::ScriptModule::executeString().
|
inline |
Return a pointer to the default Font for the GUI system.
Referenced by CEGUI::ListboxTextItem::getFont(), CEGUI::TreeItem::getFont(), and CEGUI::Window::getFont().
|
inline |
Return the currently set default mouse cursor image.
Referenced by CEGUI::DragContainer::getDragCursorImage(), and CEGUI::Window::getMouseCursor().
|
inline |
return a poiter to the system default tooltip. May return 0.
Referenced by CEGUI::Window::getTooltip().
|
static |
Return the name of the currently set default xml parser module.
|
inline |
Return a pointer to the active GUI sheet (root) window.
Referenced by CEGUI::PushButton::onMouseButtonUp(), CEGUI::TabButton::onMouseButtonUp(), CEGUI::Checkbox::onMouseButtonUp(), CEGUI::RadioButton::onMouseButtonUp(), and CEGUI::Tooltip::setTargetWindow().
|
inline |
Return a pointer to the Window that is currently the modal target.
float CEGUI::System::getMouseMoveScaling | ( | void | ) | const |
return the current mouse movement scaling factor.
|
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.
|
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.
|
inline |
Return a pointer to the Renderer object being used by the system.
Referenced by CEGUI::ListHeaderSegment::doDragSizing(), CEGUI::Font::Font(), CEGUI::MouseCursor::getConstraintArea(), CEGUI::Window::getParentPixelHeight(), CEGUI::Window::getParentPixelWidth(), CEGUI::FreeTypeFont::getTextureSize(), CEGUI::ScrolledContainer::getUnclippedInnerRect_impl(), CEGUI::FrameWindow::moveBottomEdge(), CEGUI::FrameWindow::moveLeftEdge(), CEGUI::FrameWindow::moveRightEdge(), CEGUI::FrameWindow::moveTopEdge(), CEGUI::Titlebar::onMouseButtonDown(), CEGUI::Tree::populateRenderCache(), CEGUI::FreeTypeFont::rasterize(), CEGUI::Window::render(), CEGUI::CoordConverter::screenToWindow(), CEGUI::Window::setArea_impl(), CEGUI::MouseCursor::setConstraintArea(), CEGUI::MouseCursor::setUnifiedConstraintArea(), CEGUI::Imageset::unload(), and CEGUI::FreeTypeFont::updateFont().
ResourceProvider * CEGUI::System::getResourceProvider | ( | void | ) | const |
Return a pointer to the ResourceProvider being used within the GUI system.
Referenced by CEGUI::FreeTypeFont::free(), and CEGUI::FreeTypeFont::updateFont().
ScriptModule * CEGUI::System::getScriptingModule | ( | void | ) | const |
Return a pointer to the ScriptModule being used for scripting within the GUI system.
Referenced by CEGUI::EventSet::subscribeScriptedEvent().
|
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.
|
static |
Return singleton System object.
Referenced by CEGUI::FontManager::createFont(), CEGUI::WindowManager::destroyWindow(), CEGUI::ListHeaderSegment::doDragSizing(), CEGUI::MouseCursor::draw(), CEGUI::Font::Font(), CEGUI::FreeTypeFont::free(), CEGUI::Window::generateAutoRepeatEvent(), CEGUI::MouseCursor::getConstraintArea(), CEGUI::MouseCursor::getDisplayIndependantPosition(), CEGUI::DragContainer::getDragCursorImage(), CEGUI::ListboxTextItem::getFont(), CEGUI::TreeItem::getFont(), CEGUI::Window::getFont(), CEGUI::Window::getInnerRect(), CEGUI::Window::getModalState(), CEGUI::Window::getMouseCursor(), CEGUI::Window::getParentPixelHeight(), CEGUI::Window::getParentPixelWidth(), CEGUI::Window::getPixelRect_impl(), CEGUI::Tooltip::getTextSize_impl(), CEGUI::FreeTypeFont::getTextureSize(), CEGUI::Window::getTooltip(), CEGUI::ScrolledContainer::getUnclippedInnerRect_impl(), CEGUI::Imageset::load(), CEGUI::WindowManager::loadWindowLayout(), CEGUI::MouseCursor::MouseCursor(), CEGUI::FrameWindow::moveBottomEdge(), CEGUI::FrameWindow::moveLeftEdge(), CEGUI::FrameWindow::moveRightEdge(), CEGUI::FrameWindow::moveTopEdge(), CEGUI::Window::onAlwaysOnTopChanged(), CEGUI::Window::onCaptureLost(), CEGUI::Window::onChildAdded(), CEGUI::Window::onChildRemoved(), CEGUI::DragContainer::onDragPositionChanged(), CEGUI::Titlebar::onMouseButtonDown(), CEGUI::PushButton::onMouseButtonUp(), CEGUI::TabButton::onMouseButtonUp(), CEGUI::Checkbox::onMouseButtonUp(), CEGUI::MenuItem::onMouseButtonUp(), CEGUI::RadioButton::onMouseButtonUp(), CEGUI::FrameWindow::onMouseMove(), CEGUI::Window::onMoved(), CEGUI::Window::onZChanged(), CEGUI::WidgetLookManager::parseLookNFeelSpecification(), CEGUI::Tree::populateRenderCache(), CEGUI::Tooltip::positionSelf(), CEGUI::FreeTypeFont::rasterize(), CEGUI::RenderCache::render(), CEGUI::Window::render(), CEGUI::Window::requestRedraw(), CEGUI::CoordConverter::screenToWindow(), CEGUI::CoordConverter::screenToWindowX(), CEGUI::CoordConverter::screenToWindowY(), CEGUI::Window::setArea_impl(), CEGUI::MouseCursor::setConstraintArea(), CEGUI::Window::setModalState(), CEGUI::Imageset::setNativeResolution(), CEGUI::Font::setNativeResolution(), CEGUI::Tooltip::setTargetWindow(), CEGUI::MouseCursor::setUnifiedConstraintArea(), CEGUI::Imageset::unload(), and CEGUI::FreeTypeFont::updateFont().
|
static |
Return pointer to singleton System object.
Referenced by CEGUI::ItemListbox::notifyItemClicked(), CEGUI::ItemListbox::onKeyDown(), CEGUI::EventSet::subscribeScriptedEvent(), CEGUI::ButtonBase::updateInternalState(), and CEGUI::MenuItem::updateInternalState().
|
inline |
Return the current system keys value.
Referenced by CEGUI::Window::generateAutoRepeatEvent(), CEGUI::ItemListbox::notifyItemClicked(), and CEGUI::ItemListbox::onKeyDown().
|
inline |
Return the Window object that the mouse is presently within.
Referenced by CEGUI::ButtonBase::updateInternalState(), and CEGUI::MenuItem::updateInternalState().
bool CEGUI::System::injectChar | ( | utf32 | code_point | ) |
Method that injects a typed character event into the system.
code_point | Unicode code point of the character that was typed. |
References CEGUI::KeyEventArgs::codepoint, CEGUI::EventArgs::handled, CEGUI::Window::onCharacter(), CEGUI::KeyEventArgs::sysKeys, and CEGUI::WindowEventArgs::window.
bool CEGUI::System::injectKeyDown | ( | uint | key_code | ) |
Method that injects a key down event into the system.
key_code | uint value indicating which key was pressed. |
References CEGUI::EventArgs::handled, CEGUI::Window::onKeyDown(), CEGUI::KeyEventArgs::scancode, CEGUI::KeyEventArgs::sysKeys, and CEGUI::WindowEventArgs::window.
bool CEGUI::System::injectKeyUp | ( | uint | key_code | ) |
Method that injects a key up event into the system.
key_code | uint value indicating which key was released. |
References CEGUI::EventArgs::handled, CEGUI::Window::onKeyUp(), CEGUI::KeyEventArgs::scancode, CEGUI::KeyEventArgs::sysKeys, and CEGUI::WindowEventArgs::window.
bool CEGUI::System::injectMouseButtonDown | ( | MouseButton | button | ) |
Method that injects a mouse button down event into the system.
button | One of the MouseButton values indicating which button was pressed. |
References CEGUI::MouseEventArgs::button, CEGUI::MouseEventArgs::clickCount, CEGUI::MouseClickTracker::d_click_area, CEGUI::MouseClickTracker::d_click_count, CEGUI::MouseClickTracker::d_target_window, CEGUI::MouseClickTracker::d_timer, CEGUI::MouseCursor::getPosition(), CEGUI::MouseCursor::getSingleton(), CEGUI::EventArgs::handled, CEGUI::Rect::isPointInRect(), CEGUI::MouseEventArgs::moveDelta, CEGUI::Rect::offset(), CEGUI::Window::onMouseButtonDown(), CEGUI::Window::onMouseDoubleClicked(), CEGUI::Window::onMouseTripleClicked(), CEGUI::MouseEventArgs::position, CEGUI::Rect::setPosition(), CEGUI::Rect::setSize(), CEGUI::MouseEventArgs::sysKeys, CEGUI::Window::wantsMultiClickEvents(), CEGUI::MouseEventArgs::wheelChange, and CEGUI::WindowEventArgs::window.
bool CEGUI::System::injectMouseButtonUp | ( | MouseButton | button | ) |
Method that injects a mouse button up event into the system.
button | One of the MouseButton values indicating which button was released. |
References CEGUI::MouseEventArgs::button, CEGUI::MouseEventArgs::clickCount, CEGUI::MouseClickTracker::d_click_area, CEGUI::MouseClickTracker::d_click_count, CEGUI::MouseClickTracker::d_target_window, CEGUI::MouseClickTracker::d_timer, CEGUI::MouseCursor::getPosition(), CEGUI::MouseCursor::getSingleton(), CEGUI::EventArgs::handled, CEGUI::Rect::isPointInRect(), CEGUI::MouseEventArgs::moveDelta, CEGUI::Window::onMouseButtonUp(), CEGUI::Window::onMouseClicked(), CEGUI::MouseEventArgs::position, CEGUI::MouseEventArgs::sysKeys, CEGUI::MouseEventArgs::wheelChange, and CEGUI::WindowEventArgs::window.
bool CEGUI::System::injectMouseLeaves | ( | void | ) |
Method that injects that the mouse has left the application window.
References CEGUI::MouseEventArgs::button, CEGUI::MouseEventArgs::clickCount, CEGUI::MouseCursor::getPosition(), CEGUI::MouseCursor::getSingleton(), CEGUI::EventArgs::handled, CEGUI::MouseEventArgs::moveDelta, CEGUI::NoButton, CEGUI::Window::onMouseLeaves(), CEGUI::MouseEventArgs::position, CEGUI::MouseEventArgs::sysKeys, CEGUI::MouseEventArgs::wheelChange, and CEGUI::WindowEventArgs::window.
bool CEGUI::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. |
References CEGUI::MouseEventArgs::button, CEGUI::MouseEventArgs::clickCount, CEGUI::MouseCursor::getPosition(), CEGUI::MouseCursor::getSingleton(), CEGUI::MouseEventArgs::moveDelta, CEGUI::NoButton, CEGUI::MouseCursor::offsetPosition(), CEGUI::MouseEventArgs::position, CEGUI::MouseEventArgs::sysKeys, and CEGUI::MouseEventArgs::wheelChange.
Referenced by CEGUI::Window::onCaptureLost().
bool CEGUI::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. |
References CEGUI::MouseEventArgs::button, CEGUI::MouseEventArgs::clickCount, CEGUI::MouseCursor::getPosition(), CEGUI::MouseCursor::getSingleton(), CEGUI::MouseEventArgs::moveDelta, CEGUI::NoButton, CEGUI::MouseEventArgs::position, CEGUI::MouseCursor::setPosition(), CEGUI::MouseEventArgs::sysKeys, and CEGUI::MouseEventArgs::wheelChange.
bool CEGUI::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. |
References CEGUI::MouseEventArgs::button, CEGUI::MouseEventArgs::clickCount, CEGUI::MouseCursor::getPosition(), CEGUI::MouseCursor::getSingleton(), CEGUI::EventArgs::handled, CEGUI::MouseEventArgs::moveDelta, CEGUI::NoButton, CEGUI::Window::onMouseWheel(), CEGUI::MouseEventArgs::position, CEGUI::MouseEventArgs::sysKeys, CEGUI::MouseEventArgs::wheelChange, and CEGUI::WindowEventArgs::window.
bool CEGUI::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. |
References CEGUI::Window::update().
|
inline |
Return a boolean value to indicate whether a full re-draw is requested next time renderGUI() is called.
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.
Referenced by CEGUI::WindowManager::destroyWindow().
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.
References CEGUI::Renderer::clearRenderList(), CEGUI::Renderer::doRender(), CEGUI::MouseCursor::draw(), CEGUI::MouseCursor::getSingleton(), CEGUI::Window::render(), CEGUI::Renderer::resetZValue(), and CEGUI::Renderer::setQueueingEnabled().
void CEGUI::System::setDefaultFont | ( | const 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. |
References CEGUI::String::empty().
Referenced by CEGUI::FontManager::createFont(), and System().
void CEGUI::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. |
void CEGUI::System::setDefaultMouseCursor | ( | const Image * | image | ) |
Set the image to be used as the default mouse cursor.
image | Pointer 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. |
References CEGUI::DefaultMouseCursor, CEGUI::Window::getMouseCursor(), CEGUI::MouseCursor::getSingleton(), and CEGUI::MouseCursor::setImage().
Referenced by setDefaultMouseCursor().
|
inline |
Set the image to be used as the default mouse cursor.
image | One of the MouseCursorImage enumerated values. |
References setDefaultMouseCursor().
Referenced by setDefaultMouseCursor().
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. |
References setDefaultMouseCursor().
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.
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. |
References CEGUI::Window::setWritingXMLAllowed().
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.
tooltipType | String object holding the name of the Tooltip based Window type which should be used as the Tooltip for the system default. |
References CEGUI::String::empty(), and CEGUI::Window::setWritingXMLAllowed().
|
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
parserName | String describing the name of the xml parser module to be used as the default. |
Set the active GUI sheet (root) window.
sheet | Pointer to a Window object that will become the new GUI 'root' |
References CEGUI::Window::onParentSized().
Referenced by System().
|
inline |
Internal method to directly set the current modal target.
Referenced by CEGUI::Window::setModalState().
void CEGUI::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 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.
timeout | double value equal to the multi-click timeout value to be used from now onwards. |
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.
sz | Size object describing the multi-click tolerance area size to be used. |
void CEGUI::System::setScriptingModule | ( | ScriptModule * | scriptModule | ) |
Set the ScriptModule to be used for scripting within the GUI system.
scriptModule | Pointer to a ScriptModule based object, or 0 for none (be careful!) |
References CEGUI::ScriptModule::createBindings(), CEGUI::ScriptModule::destroyBindings(), and CEGUI::ScriptModule::getIdentifierString().
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.
timeout | double value equal to the single-click timeout value to be used from now onwards. |
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.
parserName | String object describing the name of the XML parser module to be used. |
References CEGUI::Errors, CEGUI::DynamicModule::getSymbolAddress(), and CEGUI::XMLParser::initialise().
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).
parser | Pointer to the XMLParser object to be used by the system, or 0 to cause the system to initialise a default parser. |
|
inline |
Causes a full re-draw next time renderGUI() is called.
Referenced by CEGUI::Window::onAlwaysOnTopChanged(), CEGUI::Window::onChildAdded(), CEGUI::Window::onChildRemoved(), CEGUI::Window::onMoved(), CEGUI::Window::onZChanged(), and CEGUI::Window::requestRedraw().