Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

CEGUI::System Class Reference

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

#include <CEGUISystem.h>

Inheritance diagram for CEGUI::System:

Inheritance graph
[legend]
Collaboration diagram for CEGUI::System:

Collaboration graph
[legend]
List of all members.

Public Types

typedef ConstBaseIterator<
EventMap
EventIterator

Public Member Functions

 System (Renderer *renderer, utf8 *logFile=(utf8 *)"CEGUI.log")
 Constructs a System object.
 System (Renderer *renderer, ResourceProvider *resourceProvider, utf8 *logFile=(utf8 *)"CEGUI.log")
 Construct a new System object.
 System (Renderer *renderer, ScriptModule *scriptModule, utf8 *configFile=(utf8 *)"cegui.config")
 Construct a new System object.
 System (Renderer *renderer, ScriptModule *scriptModule, ResourceProvider *resourceProvider, utf8 *configFile=(utf8 *)"cegui.config")
 Construct a new System object.
 ~System (void)
 Destructor for System objects.
RenderergetRenderer (void) const
 Return a pointer to the Renderer object being used by the system.
void setDefaultFont (const 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.
FontgetDefaultFont (void) const
 Return a pointer to the default Font for the GUI system.
void signalRedraw ()
 Causes a full re-draw next time renderGUI() is called.
void renderGUI (void)
 Render the GUI.
WindowsetGUISheet (Window *sheet)
 Set the active GUI sheet (root) window.
WindowgetGUISheet (void) const
 Return a pointer to the active GUI sheet (root) window.
double getSingleClickTimeout (void) const
 Return the current timeout for generation of single-click events.
double getMultiClickTimeout (void) const
 Return the current timeout for generation of multi-click events.
const SizegetMultiClickToleranceAreaSize (void) const
 Return the size of the allowable mouse movement tolerance used when generating multi-click events.
void setSingleClickTimeout (double timeout)
 Set the timeout used for generation of single-click events.
void setMultiClickTimeout (double timeout)
 Set the timeout to be used for the generation of multi-click events.
void setMultiClickToleranceAreaSize (const Size &sz)
 Set the size of the allowable mouse movement tolerance used when generating multi-click events.
const ImagegetDefaultMouseCursor (void) const
 Return the currently set default mouse cursor image.
void setDefaultMouseCursor (const Image *image)
 Set the image to be used as the default mouse cursor.
void setDefaultMouseCursor (MouseCursorImage image)
 Set the image to be used as the default mouse cursor.
void setDefaultMouseCursor (const String &imageset, const String &image_name)
 Set the image to be used as the default mouse cursor.
WindowgetWindowContainingMouse (void) const
 Return the Window object that the mouse is presently within.
ScriptModulegetScriptingModule (void) const
 Return a pointer to the ScriptModule being used for scripting within the GUI system.
ResourceProvidergetResourceProvider (void) const
 Return a pointer to the ResourceProvider being used within the GUI system.
void executeScriptFile (const String &filename) const
 Execute a script file if possible.
int executeScriptGloabl (const String &function_name) const
 Execute a scripted global function if possible. The function should not take any parameters and should return an integer.
float getMouseMoveScaling (void) const
 return the current mouse movement scaling factor.
void setMouseMoveScaling (float scaling)
 Set the current mouse movement scaling factor.
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.
uint getSystemKeys (void) const
 Return the current system keys value.
bool injectMouseMove (float delta_x, float delta_y)
 Method that injects a mouse movement event into the system.
bool injectMouseButtonDown (MouseButton button)
 Method that injects a mouse button down event into the system.
bool injectMouseButtonUp (MouseButton button)
 Method that injects a mouse button up event into the system.
bool injectKeyDown (uint key_code)
 Method that injects a key down event into the system.
bool injectKeyUp (uint key_code)
 Method that injects a key up event into the system.
bool injectChar (utf32 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.
void addEvent (const String &name)
 Add a new Event to the EventSet with the given name.
void removeEvent (const String &name)
 Removes the Event with the given name. All connections to the event are disconnected.
void removeAllEvents (void)
 Remove all Event objects from the EventSet.
bool isEventPresent (const String &name)
 Checks to see if an Event with the given name is present in the EventSet.
virtual Event::Connection subscribeEvent (const String &name, Event::Subscriber subscriber)
 Subscribes the the named Event.
virtual Event::Connection subscribeEvent (const String &name, Event::Group group, Event::Subscriber subscriber)
 Subscribes the the specified group of the named Event.
virtual void fireEvent (const String &name, EventArgs &args, const String &eventNamespace="")
 Fires the named event passing the given EventArgs object.
bool isMuted (void) const
 Return whether the EventSet is muted or not.
void setMutedState (bool setting)
 Set the mute state for this EventSet.
EventIterator getIterator (void) const
 Return a EventSet::EventIterator object to iterate over the available events.

Static Public Member Functions

SystemgetSingleton (void)
 Return singleton System object.
SystemgetSingletonPtr (void)
 Return pointer to singleton System object.

Static Public Attributes

const String EventNamespace
 Namespace for global events.
const double DefaultSingleClickTimeout = 0.2
 Default timeout for generation of single click events.
const double DefaultMultiClickTimeout = 0.33
 Default timeout for generation of multi-click events.
const Size DefaultMultiClickAreaSize
 Default allowable mouse movement for multi-click event generation.
const String EventGUISheetChanged
 Name of event fired whenever the GUI sheet is changed.
const String EventSingleClickTimeoutChanged
 Name of event fired when the single-click timeout is changed.
const String EventMultiClickTimeoutChanged
 Name of event fired when the multi-click timeout is changed.
const String EventMultiClickAreaSizeChanged
 Name of event fired when the size of the multi-click tolerance area is changed.
const String EventDefaultFontChanged
 Name of event fired when the default font changes.
const String EventDefaultMouseCursorChanged
 Name of event fired when the default mouse cursor changes.
const String EventMouseMoveScalingChanged
 Name of event fired when the mouse move scaling factor changes.

Protected Types

typedef std::map< String,
Event * > 
EventMap

Protected Attributes

EventMap d_events
bool d_muted
 true if events for this EventSet have been muted.

Static Protected Attributes

Systemms_Singleton = NULL

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.

Definition at line 60 of file CEGUISystem.h.


Member Typedef Documentation

typedef ConstBaseIterator<EventMap> CEGUI::EventSet::EventIterator [inherited]
 

Definition at line 216 of file CEGUIEventSet.h.

Referenced by CEGUI::EventSet::getIterator().

typedef std::map<String, Event*> CEGUI::EventSet::EventMap [protected, inherited]
 

Definition at line 207 of file CEGUIEventSet.h.


Constructor & Destructor Documentation

CEGUI::System::System Renderer renderer,
utf8 logFile = (utf8 *)"CEGUI.log"
 

Constructs a System object.

Parameters:
renderer Pointer to the valid Renderer object that will be used to render GUI imagery
logFile pointer to a utf8 encoded buffer containing the name to use for the log file.

Definition at line 123 of file CEGUISystem.cpp.

References CEGUI::utf8.

CEGUI::System::System Renderer renderer,
ResourceProvider resourceProvider,
utf8 logFile = (utf8 *)"CEGUI.log"
 

Construct a new System object.

Parameters:
renderer Pointer to the valid Renderer object that will be used to render GUI imagery
resourceProvider Pointer to a ResourceProvider object.
logFile pointer to a utf8 encoded buffer containing the name to use for the log file.

Definition at line 131 of file CEGUISystem.cpp.

References CEGUI::utf8.

CEGUI::System::System Renderer renderer,
ScriptModule scriptModule,
utf8 configFile = (utf8 *)"cegui.config"
 

Construct a new System object.

Parameters:
renderer Pointer to the valid Renderer object that will be used to render GUI imagery
scriptModule Pointer to a ScriptModule object. may be NULL.
configFile pointer to a utf8 encoded buffer containing the name to use for the configuration file.

Definition at line 140 of file CEGUISystem.cpp.

References CEGUI::utf8.

CEGUI::System::System Renderer renderer,
ScriptModule scriptModule,
ResourceProvider resourceProvider,
utf8 configFile = (utf8 *)"cegui.config"
 

Construct a new System object.

Parameters:
renderer Pointer to the valid Renderer object that will be used to render GUI imagery
scriptModule Pointer to a ScriptModule object. may be NULL.
resourceProvider Pointer to a ResourceProvider object.
configFile pointer to a utf8 encoded buffer containing the name to use for the configuration file.

Definition at line 150 of file CEGUISystem.cpp.

References CEGUI::utf8.

CEGUI::System::~System void   ) 
 

Destructor for System objects.

Definition at line 406 of file CEGUISystem.cpp.

References CEGUI::String::empty(), executeScriptFile(), and CEGUI::utf8.


Member Function Documentation

void CEGUI::EventSet::addEvent const String name  )  [inherited]
 

Add a new Event to the EventSet with the given name.

Parameters:
name String object containing the name to give the new Event. The name must be unique for the EventSet.
Returns:
Nothing
Exceptions:
AlreadyExistsException Thrown if an Event already exists named name.

Definition at line 54 of file CEGUIEventSet.cpp.

References CEGUI::EventSet::d_events, and CEGUI::EventSet::isEventPresent().

Referenced by CEGUI::Checkbox::addCheckboxEvents(), CEGUI::Combobox::addComboboxEvents(), CEGUI::ComboDropList::addComboDropListEvents(), CEGUI::Editbox::addEditboxEvents(), CEGUI::FrameWindow::addFrameWindowEvents(), CEGUI::ListHeaderSegment::addHeaderSegmentEvents(), CEGUI::Listbox::addListboxEvents(), CEGUI::ListHeader::addListHeaderEvents(), CEGUI::MouseCursor::addMouseCursorEvents(), CEGUI::MultiColumnList::addMultiColumnListboxEvents(), CEGUI::MultiLineEditbox::addMultiLineEditboxEvents(), CEGUI::ProgressBar::addProgressBarEvents(), CEGUI::PushButton::addPushButtonEvents(), CEGUI::RadioButton::addRadioButtonEvents(), CEGUI::Scrollbar::addScrollbarEvents(), CEGUI::Slider::addSliderEvents(), CEGUI::Window::addStandardEvents(), CEGUI::TabButton::addTabButtonEvents(), CEGUI::TabControl::addTabControlEvents(), CEGUI::Thumb::addThumbEvents(), CEGUI::Renderer::Renderer(), and CEGUI::GlobalEventSet::subscribeEvent().

void CEGUI::System::executeScriptFile const String filename  )  const
 

Execute a script file if possible.

Parameters:
filename String object holding the filename of the script file that is to be executed

Definition at line 596 of file CEGUISystem.cpp.

References CEGUI::Errors, CEGUI::ScriptModule::executeScriptFile(), and CEGUI::utf8.

Referenced by ~System().

int CEGUI::System::executeScriptGloabl 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_name String 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.

Definition at line 622 of file CEGUISystem.cpp.

References CEGUI::Errors, CEGUI::ScriptModule::executeScriptGloabl(), and CEGUI::utf8.

void CEGUI::EventSet::fireEvent const String name,
EventArgs args,
const String eventNamespace = ""
[virtual, inherited]
 

Fires the named event passing the given EventArgs object.

Parameters:
name String object holding the name of the Event that is to be fired (triggered)
args The EventArgs (or derived) object that is to be bassed to each subscriber of the Event. Once all subscribers have been called the 'handled' field of the event is updated appropriately.
eventNamespace String object describing the global event namespace prefix for this event.
Returns:
Nothing.
Exceptions:
UnknownObjectException Thrown if no Event named name was found in the EventSet.

Reimplemented in CEGUI::GlobalEventSet.

Definition at line 141 of file CEGUIEventSet.cpp.

References CEGUI::EventSet::d_events.

Referenced by CEGUI::Window::onActivated(), CEGUI::Window::onAlphaChanged(), CEGUI::Window::onAlwaysOnTopChanged(), CEGUI::Window::onCaptureGained(), CEGUI::Window::onCaptureLost(), CEGUI::MultiLineEditbox::onCaratMoved(), CEGUI::Editbox::onCaratMoved(), CEGUI::Combobox::onCaratMoved(), CEGUI::Window::onCharacter(), CEGUI::Window::onChildAdded(), CEGUI::Window::onChildRemoved(), CEGUI::ListHeaderSegment::onClickableSettingChanged(), CEGUI::TabButton::onClicked(), CEGUI::PushButton::onClicked(), CEGUI::Window::onClippingChanged(), CEGUI::FrameWindow::onCloseClicked(), CEGUI::Window::onDeactivated(), CEGUI::Window::onDestructionStarted(), CEGUI::Window::onDisabled(), CEGUI::ListHeader::onDragMoveSettingChanged(), CEGUI::ListHeader::onDragSizeSettingChanged(), CEGUI::Combobox::onDropListDisplayed(), CEGUI::Combobox::onDroplistRemoved(), CEGUI::MultiLineEditbox::onEditboxFullEvent(), CEGUI::Editbox::onEditboxFullEvent(), CEGUI::Combobox::onEditboxFullEvent(), CEGUI::Window::onEnabled(), CEGUI::Window::onFontChanged(), CEGUI::Window::onHidden(), CEGUI::MultiLineEditbox::onHorzScrollbarModeChanged(), CEGUI::MultiColumnList::onHorzScrollbarModeChanged(), CEGUI::Listbox::onHorzScrollbarModeChanged(), CEGUI::Combobox::onHorzScrollbarModeChanged(), CEGUI::Window::onIDChanged(), CEGUI::MouseCursor::onImageChanged(), CEGUI::Window::onInheritsAlphaChanged(), CEGUI::Editbox::onInvalidEntryAttempted(), CEGUI::Combobox::onInvalidEntryAttempted(), CEGUI::Window::onKeyDown(), CEGUI::Window::onKeyUp(), CEGUI::MultiColumnList::onListColumnMoved(), CEGUI::MultiColumnList::onListColumnSized(), CEGUI::MultiColumnList::onListContentsChanged(), CEGUI::Listbox::onListContentsChanged(), CEGUI::Combobox::onListContentsChanged(), CEGUI::ComboDropList::onListSelectionAccepted(), CEGUI::Combobox::onListSelectionAccepted(), CEGUI::Combobox::onListSelectionChanged(), CEGUI::Editbox::onMaskCodePointChanged(), CEGUI::Editbox::onMaskedRenderingModeChanged(), CEGUI::MultiLineEditbox::onMaximumTextLengthChanged(), CEGUI::Editbox::onMaximumTextLengthChanged(), CEGUI::Combobox::onMaximumTextLengthChanged(), CEGUI::Window::onMetricsChanged(), CEGUI::Window::onMouseButtonDown(), CEGUI::Window::onMouseButtonUp(), CEGUI::Window::onMouseClicked(), CEGUI::Window::onMouseDoubleClicked(), CEGUI::Window::onMouseEnters(), CEGUI::Window::onMouseLeaves(), CEGUI::Window::onMouseMove(), CEGUI::Window::onMouseTripleClicked(), CEGUI::Window::onMouseWheel(), CEGUI::ListHeaderSegment::onMovableSettingChanged(), CEGUI::Window::onMoved(), CEGUI::Listbox::onMultiselectModeChanged(), CEGUI::MultiColumnList::onNominatedSelectColumnChanged(), CEGUI::MultiColumnList::onNominatedSelectRowChanged(), CEGUI::Window::onParentDestroyChanged(), CEGUI::Window::onParentSized(), CEGUI::ProgressBar::onProgressChanged(), CEGUI::ProgressBar::onProgressDone(), CEGUI::MultiLineEditbox::onReadOnlyChanged(), CEGUI::Editbox::onReadOnlyChanged(), CEGUI::Combobox::onReadOnlyChanged(), CEGUI::Window::onRenderingEnded(), CEGUI::Window::onRenderingStarted(), CEGUI::FrameWindow::onRollupToggled(), CEGUI::Scrollbar::onScrollConfigChanged(), CEGUI::Scrollbar::onScrollPositionChanged(), CEGUI::ListHeader::onSegmentAdded(), CEGUI::ListHeaderSegment::onSegmentClicked(), CEGUI::ListHeader::onSegmentClicked(), CEGUI::ListHeaderSegment::onSegmentDragPositionChanged(), CEGUI::ListHeaderSegment::onSegmentDragStart(), CEGUI::ListHeaderSegment::onSegmentDragStop(), CEGUI::ListHeader::onSegmentOffsetChanged(), CEGUI::ListHeader::onSegmentRemoved(), CEGUI::ListHeader::onSegmentSequenceChanged(), CEGUI::ListHeaderSegment::onSegmentSized(), CEGUI::ListHeader::onSegmentSized(), CEGUI::TabControl::onSelectionChanged(), CEGUI::MultiColumnList::onSelectionChanged(), CEGUI::Listbox::onSelectionChanged(), CEGUI::MultiColumnList::onSelectionModeChanged(), CEGUI::Checkbox::onSelectStateChange(), CEGUI::RadioButton::onSelectStateChanged(), CEGUI::Window::onShown(), CEGUI::Window::onSized(), CEGUI::ListHeaderSegment::onSizingSettingChanged(), CEGUI::MultiColumnList::onSortColumnChanged(), CEGUI::ListHeader::onSortColumnChanged(), CEGUI::MultiColumnList::onSortDirectionChanged(), CEGUI::ListHeaderSegment::onSortDirectionChanged(), CEGUI::ListHeader::onSortDirectionChanged(), CEGUI::Listbox::onSortModeChanged(), CEGUI::Combobox::onSortModeChanged(), CEGUI::ListHeader::onSortSettingChanged(), CEGUI::ListHeaderSegment::onSplitterDoubleClicked(), CEGUI::ListHeader::onSplitterDoubleClicked(), CEGUI::Editbox::onTextAcceptedEvent(), CEGUI::Combobox::onTextAcceptedEvent(), CEGUI::Window::onTextChanged(), CEGUI::Editbox::onTextInvalidatedEvent(), CEGUI::Combobox::onTextInvalidatedEvent(), CEGUI::MultiLineEditbox::onTextSelectionChanged(), CEGUI::Editbox::onTextSelectionChanged(), CEGUI::Combobox::onTextSelectionChanged(), CEGUI::Thumb::onThumbPositionChanged(), CEGUI::Thumb::onThumbTrackEnded(), CEGUI::Slider::onThumbTrackEnded(), CEGUI::Scrollbar::onThumbTrackEnded(), CEGUI::Thumb::onThumbTrackStarted(), CEGUI::Slider::onThumbTrackStarted(), CEGUI::Scrollbar::onThumbTrackStarted(), CEGUI::Editbox::onValidationStringChanged(), CEGUI::Combobox::onValidationStringChanged(), CEGUI::Slider::onValueChanged(), CEGUI::MultiLineEditbox::onVertScrollbarModeChanged(), CEGUI::MultiColumnList::onVertScrollbarModeChanged(), CEGUI::Listbox::onVertScrollbarModeChanged(), CEGUI::Combobox::onVertScrollbarModeChanged(), CEGUI::MultiLineEditbox::onWordWrapModeChanged(), CEGUI::Window::onZChanged(), CEGUI::DirectX81Renderer::setDisplaySize(), and CEGUI::DirectX9Renderer::setDisplaySize().

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.

Definition at line 218 of file CEGUISystem.h.

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.

Definition at line 361 of file CEGUISystem.h.

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.

Definition at line 263 of file CEGUISystem.h.

EventSet::EventIterator CEGUI::EventSet::getIterator void   )  const [inherited]
 

Return a EventSet::EventIterator object to iterate over the available events.

Definition at line 183 of file CEGUIEventSet.cpp.

References CEGUI::EventSet::d_events, and CEGUI::EventSet::EventIterator.

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.

Definition at line 648 of file CEGUISystem.cpp.

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.

Definition at line 289 of file CEGUISystem.h.

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.

Definition at line 302 of file CEGUISystem.h.

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.

Definition at line 162 of file CEGUISystem.h.

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.

Definition at line 588 of file CEGUISystem.cpp.

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.

Definition at line 579 of file CEGUISystem.cpp.

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.

Definition at line 275 of file CEGUISystem.h.

System & CEGUI::System::getSingleton void   )  [static]
 

Return singleton System object.

Returns:
Singleton System object

Reimplemented from CEGUI::Singleton< System >.

Definition at line 1106 of file CEGUISystem.cpp.

Referenced by CEGUI::EventPusher::OnKeyDown(), CEGUI::EventPusher::OnKeyUp(), and CEGUI::EventPusher::OnMouse().

System * CEGUI::System::getSingletonPtr void   )  [static]
 

Return pointer to singleton System object.

Returns:
Pointer to singleton System object

Reimplemented from CEGUI::Singleton< System >.

Definition at line 1112 of file CEGUISystem.cpp.

uint CEGUI::System::getSystemKeys void   )  const [inline]
 

Return the current system keys value.

Returns:
uint value representing a combination of the SystemKey bits.

Definition at line 502 of file CEGUISystem.h.

References CEGUI::uint.

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.

Definition at line 416 of file CEGUISystem.h.

bool CEGUI::System::injectChar utf32  code_point  ) 
 

Method that injects a typed character event into the system.

Parameters:
code_point Unicode 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.

Definition at line 908 of file CEGUISystem.cpp.

References CEGUI::KeyEventArgs::codepoint, CEGUI::Window::getActiveChild(), CEGUI::Window::getParent(), CEGUI::EventArgs::handled, CEGUI::Window::onCharacter(), CEGUI::KeyEventArgs::sysKeys, and CEGUI::WindowEventArgs::window.

Referenced by CEGUI::EventPusher::OnKeyDown().

bool CEGUI::System::injectKeyDown uint  key_code  ) 
 

Method that injects a key down event into the system.

Parameters:
key_code uint 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.

Definition at line 846 of file CEGUISystem.cpp.

References CEGUI::Window::getActiveChild(), CEGUI::Window::getParent(), CEGUI::EventArgs::handled, CEGUI::Window::onKeyDown(), CEGUI::KeyEventArgs::scancode, CEGUI::KeyEventArgs::sysKeys, and CEGUI::WindowEventArgs::window.

Referenced by CEGUI::EventPusher::OnKeyDown().

bool CEGUI::System::injectKeyUp uint  key_code  ) 
 

Method that injects a key up event into the system.

Parameters:
key_code uint 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.

Definition at line 877 of file CEGUISystem.cpp.

References CEGUI::Window::getActiveChild(), CEGUI::Window::getParent(), CEGUI::EventArgs::handled, CEGUI::Window::onKeyUp(), CEGUI::KeyEventArgs::scancode, CEGUI::KeyEventArgs::sysKeys, and CEGUI::WindowEventArgs::window.

Referenced by CEGUI::EventPusher::OnKeyUp().

bool CEGUI::System::injectMouseButtonDown MouseButton  button  ) 
 

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

Parameters:
button One 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.

Definition at line 722 of file CEGUISystem.cpp.

References CEGUI::MouseEventArgs::button, CEGUI::MouseClickTrackerImpl::click_trackers, CEGUI::MouseClickTracker::d_click_area, CEGUI::MouseClickTracker::d_click_count, CEGUI::Size::d_height, CEGUI::MouseClickTracker::d_timer, CEGUI::Size::d_width, CEGUI::SimpleTimer::elapsed(), CEGUI::Window::getParent(), CEGUI::EventArgs::handled, CEGUI::Rect::isPointInRect(), CEGUI::MouseEventArgs::moveDelta, CEGUI::Rect::offset(), CEGUI::Window::onMouseButtonDown(), CEGUI::Window::onMouseDoubleClicked(), CEGUI::Window::onMouseTripleClicked(), CEGUI::Point, CEGUI::MouseEventArgs::position, CEGUI::SimpleTimer::restart(), CEGUI::Rect::setPosition(), CEGUI::Rect::setSize(), CEGUI::MouseEventArgs::sysKeys, CEGUI::Window::wantsMultiClickEvents(), CEGUI::MouseEventArgs::wheelChange, and CEGUI::WindowEventArgs::window.

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

bool CEGUI::System::injectMouseButtonUp MouseButton  button  ) 
 

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

Parameters:
button One 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.

Definition at line 799 of file CEGUISystem.cpp.

References CEGUI::MouseEventArgs::button, CEGUI::MouseClickTrackerImpl::click_trackers, CEGUI::MouseClickTracker::d_timer, CEGUI::SimpleTimer::elapsed(), CEGUI::Window::getParent(), CEGUI::EventArgs::handled, CEGUI::MouseEventArgs::moveDelta, CEGUI::Window::onMouseButtonUp(), CEGUI::Window::onMouseClicked(), CEGUI::MouseEventArgs::position, CEGUI::MouseEventArgs::sysKeys, CEGUI::MouseEventArgs::wheelChange, and CEGUI::WindowEventArgs::window.

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

bool CEGUI::System::injectMouseMove float  delta_x,
float  delta_y
 

Method that injects a mouse movement event into the system.

Parameters:
delta_x amount the mouse moved on the x axis.
delta_y amount 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.

Definition at line 670 of file CEGUISystem.cpp.

References CEGUI::Vector2::d_x, CEGUI::Vector2::d_y, CEGUI::Window::getParent(), CEGUI::MouseCursor::getPosition(), CEGUI::EventArgs::handled, CEGUI::MouseEventArgs::moveDelta, CEGUI::MouseCursor::offsetPosition(), CEGUI::Window::onMouseEnters(), CEGUI::Window::onMouseLeaves(), CEGUI::Window::onMouseMove(), CEGUI::MouseEventArgs::position, CEGUI::MouseEventArgs::sysKeys, CEGUI::MouseEventArgs::wheelChange, and CEGUI::WindowEventArgs::window.

Referenced by injectMousePosition(), and CEGUI::EventPusher::OnMouse().

bool CEGUI::System::injectMousePosition float  x_pos,
float  y_pos
 

Method that injects a new position for the mouse cursor.

Parameters:
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.
Returns:
  • true if the generated mouse move event was handled.
  • false if the generated mouse move event was not handled.

Definition at line 962 of file CEGUISystem.cpp.

References injectMouseMove(), and CEGUI::Point.

bool CEGUI::System::injectMouseWheelChange float  delta  ) 
 

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

Parameters:
delta float 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.

Definition at line 936 of file CEGUISystem.cpp.

References CEGUI::MouseEventArgs::button, CEGUI::Window::getParent(), CEGUI::EventArgs::handled, CEGUI::MouseEventArgs::moveDelta, CEGUI::Window::onMouseWheel(), CEGUI::MouseEventArgs::position, CEGUI::MouseEventArgs::sysKeys, CEGUI::MouseEventArgs::wheelChange, and CEGUI::WindowEventArgs::window.

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

bool CEGUI::System::injectTimePulse float  timeElapsed  ) 
 

Method to inject time pulses into the system.

Parameters:
timeElapsed float value indicating the amount of time passed, in seconds, since the last time this method was called.
Returns:
Currently, this method always returns true.

Definition at line 975 of file CEGUISystem.cpp.

References CEGUI::Window::update().

bool CEGUI::EventSet::isEventPresent const String name  )  [inherited]
 

Checks to see if an Event with the given name is present in the EventSet.

Returns:
true if an Event named name was found, or false if the Event was not found

Definition at line 101 of file CEGUIEventSet.cpp.

References CEGUI::EventSet::d_events.

Referenced by CEGUI::EventSet::addEvent().

bool CEGUI::EventSet::isMuted void   )  const [inherited]
 

Return whether the EventSet is muted or not.

Returns:
  • true if the EventSet is muted. All requests to fire events will be ignored.
  • false if the EventSet is not muted. All requests to fire events are processed as normal.

Definition at line 164 of file CEGUIEventSet.cpp.

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!

Definition at line 1259 of file CEGUISystem.cpp.

void CEGUI::EventSet::removeAllEvents void   )  [inherited]
 

Remove all Event objects from the EventSet.

Returns:
Nothing

Definition at line 84 of file CEGUIEventSet.cpp.

References CEGUI::EventSet::d_events.

Referenced by CEGUI::EventSet::~EventSet().

void CEGUI::EventSet::removeEvent const String name  )  [inherited]
 

Removes the Event with the given name. All connections to the event are disconnected.

Parameters:
name String object containing the name of the Event to remove. If no such Event exists, nothing happens.
Returns:
Nothing.

Definition at line 68 of file CEGUIEventSet.cpp.

References CEGUI::EventSet::d_events.

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

Definition at line 460 of file CEGUISystem.cpp.

References CEGUI::Renderer::clearRenderList(), CEGUI::Renderer::doRender(), CEGUI::Window::render(), CEGUI::Renderer::resetZValue(), and CEGUI::Renderer::setQueueingEnabled().

void CEGUI::System::setDefaultFont Font font  ) 
 

Set the default font to be used by the system.

Parameters:
font Pointer to the font to be used as the system default.
Returns:
Nothing.

Definition at line 538 of file CEGUISystem.cpp.

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

Set the default font to be used by the system.

Parameters:
name String object containing the name of the font to be used as the system default.
Returns:
Nothing.

Definition at line 521 of file CEGUISystem.cpp.

References CEGUI::String::empty().

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

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

Parameters:
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.
Returns:
Nothing.
Exceptions:
UnknownObjectException thrown if imageset is not known, or if imageset contains no Image named image_name.

Definition at line 569 of file CEGUISystem.cpp.

References setDefaultMouseCursor().

void CEGUI::System::setDefaultMouseCursor MouseCursorImage  image  )  [inline]
 

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

Parameters:
image One of the MouseCursorImage enumerated values.
Returns:
Nothing.

Definition at line 388 of file CEGUISystem.h.

void CEGUI::System::setDefaultMouseCursor const Image image  ) 
 

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

Parameters:
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.
Returns:
Nothing.

Definition at line 551 of file CEGUISystem.cpp.

Referenced by setDefaultMouseCursor().

Window * CEGUI::System::setGUISheet Window sheet  ) 
 

Set the active GUI sheet (root) window.

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

Definition at line 497 of file CEGUISystem.cpp.

References CEGUI::Window::onParentSized().

void CEGUI::System::setMouseMoveScaling float  scaling  ) 
 

Set the current mouse movement scaling factor.

Parameters:
scaling float value specifying the scaling to be applied to mouse movement inputs.
Returns:
nothing.

Definition at line 657 of file CEGUISystem.cpp.

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:
timeout double value equal to the multi-click timeout value to be used from now onwards.
Returns:
Nothing.

Definition at line 1135 of file CEGUISystem.cpp.

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:
sz Size object describing the multi-click tolerance area size to be used.
Returns:
Nothing.

Definition at line 1149 of file CEGUISystem.cpp.

void CEGUI::EventSet::setMutedState bool  setting  )  [inherited]
 

Set the mute state for this EventSet.

Parameters:
setting 
  • true if the EventSet is to be muted (no further event firing requests will be honoured until EventSet is unmuted).
  • false if the EventSet is not to be muted and all events should fired as requested.
Returns:
Nothing.

Definition at line 173 of file CEGUIEventSet.cpp.

References CEGUI::EventSet::d_muted.

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:
timeout double value equal to the single-click timeout value to be used from now onwards.
Returns:
Nothing.

Definition at line 1122 of file CEGUISystem.cpp.

void CEGUI::System::signalRedraw  )  [inline]
 

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

Returns:
Nothing

Definition at line 228 of file CEGUISystem.h.

Event::Connection CEGUI::EventSet::subscribeEvent const String name,
Event::Group  group,
Event::Subscriber  subscriber
[virtual, inherited]
 

Subscribes the the specified group of the named Event.

Parameters:
name String object containing the name of the Event to subscribe to.
group Group which is to be subscribed to. Subscription groups are called in ascending order.
subscriber Function or object that is to be subscribed to the Event.
Returns:
Connection object that can be used to check the status of the Event connection and to disconnect (unsubscribe) from the Event.
Exceptions:
UnknownObjectException Thrown if an Event named name is not in the EventSet

Reimplemented in CEGUI::GlobalEventSet.

Definition at line 126 of file CEGUIEventSet.cpp.

References CEGUI::Event::Connection, CEGUI::EventSet::d_events, and CEGUI::Event::Subscriber.

Event::Connection CEGUI::EventSet::subscribeEvent const String name,
Event::Subscriber  subscriber
[virtual, inherited]
 

Subscribes the the named Event.

Parameters:
name String object containing the name of the Event to subscribe to.
subscriber Function or object that is to be subscribed to the Event.
Returns:
Connection object that can be used to check the status of the Event connection and to disconnect (unsubscribe) from the Event.
Exceptions:
UnknownObjectException Thrown if an Event named name is not in the EventSet

Reimplemented in CEGUI::GlobalEventSet.

Definition at line 110 of file CEGUIEventSet.cpp.

References CEGUI::Event::Connection, CEGUI::EventSet::d_events, and CEGUI::Event::Subscriber.

Referenced by CEGUI::TabControl::addButtonForTabContent(), CEGUI::TabControl::addTab(), CEGUI::ListHeader::createInitialisedSegment(), CEGUI::StaticText::initialise(), CEGUI::Slider::initialise(), CEGUI::Scrollbar::initialise(), CEGUI::MultiColumnList::initialise(), CEGUI::FrameWindow::initialise(), and CEGUI::Combobox::initialise().


Member Data Documentation

EventMap CEGUI::EventSet::d_events [protected, inherited]
 

Definition at line 208 of file CEGUIEventSet.h.

Referenced by CEGUI::EventSet::addEvent(), CEGUI::EventSet::fireEvent(), CEGUI::EventSet::getIterator(), CEGUI::EventSet::isEventPresent(), CEGUI::EventSet::removeAllEvents(), CEGUI::EventSet::removeEvent(), and CEGUI::EventSet::subscribeEvent().

bool CEGUI::EventSet::d_muted [protected, inherited]
 

true if events for this EventSet have been muted.

Definition at line 210 of file CEGUIEventSet.h.

Referenced by CEGUI::EventSet::setMutedState().

const Size CEGUI::System::DefaultMultiClickAreaSize [static]
 

Default allowable mouse movement for multi-click event generation.

const double CEGUI::System::DefaultMultiClickTimeout = 0.33 [static]
 

Default timeout for generation of multi-click events.

Definition at line 107 of file CEGUISystem.cpp.

const double CEGUI::System::DefaultSingleClickTimeout = 0.2 [static]
 

Default timeout for generation of single click events.

Definition at line 106 of file CEGUISystem.cpp.

const String CEGUI::System::EventDefaultFontChanged [static]
 

Name of event fired when the default font changes.

const String CEGUI::System::EventDefaultMouseCursorChanged [static]
 

Name of event fired when the default mouse cursor changes.

const String CEGUI::System::EventGUISheetChanged [static]
 

Name of event fired whenever the GUI sheet is changed.

const String CEGUI::System::EventMouseMoveScalingChanged [static]
 

Name of event fired when the mouse move scaling factor changes.

const String CEGUI::System::EventMultiClickAreaSizeChanged [static]
 

Name of event fired when the size of the multi-click tolerance area is changed.

const String CEGUI::System::EventMultiClickTimeoutChanged [static]
 

Name of event fired when the multi-click timeout is changed.

const String CEGUI::System::EventNamespace [static]
 

Namespace for global events.

const String CEGUI::System::EventSingleClickTimeoutChanged [static]
 

Name of event fired when the single-click timeout is changed.

System * CEGUI::Singleton< System >::ms_Singleton = NULL [static, protected, inherited]
 

Definition at line 103 of file CEGUISystem.cpp.


The documentation for this class was generated from the following files:
Generated on Wed Feb 16 12:41:11 2005 for Crazy Eddies GUI System by  doxygen 1.3.9.1