30 #ifndef _CEGUISystem_h_
31 #define _CEGUISystem_h_
33 #include "CEGUIBase.h"
34 #include "CEGUIString.h"
35 #include "CEGUISingleton.h"
36 #include "CEGUIRenderer.h"
37 #include "CEGUIMouseCursor.h"
38 #include "CEGUIInputEvent.h"
39 #include "CEGUIResourceProvider.h"
43 # pragma warning(push)
44 # pragma warning(disable : 4275)
45 # pragma warning(disable : 4251)
53 struct MouseClickTrackerImpl;
155 const String& configFile =
"",
156 const String& logFile =
"CEGUI.log");
159 static void destroy();
178 static System& getSingleton(
void);
188 static System* getSingletonPtr(
void);
201 void setDefaultFont(
const String& name);
214 void setDefaultFont(
Font* font);
256 void renderGUI(
void);
340 void setSingleClickTimeout(
double timeout);
363 void setMultiClickTimeout(
double timeout);
379 void setMultiClickToleranceAreaSize(
const Size& sz);
394 bool isMouseClickEventGenerationEnabled()
const;
409 void setMouseClickEventGenerationEnabled(
const bool enable);
433 void setDefaultMouseCursor(
const Image* image);
464 void setDefaultMouseCursor(
const String& imageset,
const String& image_name);
517 void executeScriptFile(
const String& filename,
const String& resourceGroup =
"")
const;
531 int executeScriptGlobal(
const String& function_name)
const;
544 void executeScriptString(
const String& str)
const;
554 float getMouseMoveScaling(
void)
const;
567 void setMouseMoveScaling(
float scaling);
578 void notifyWindowDestroyed(
const Window* window);
602 void setXMLParser(
const String& parserName);
643 void setDefaultTooltip(
Tooltip* tooltip);
660 void setDefaultTooltip(
const String& tooltipType);
670 Tooltip* getDefaultTooltip(
void)
const;
735 static void setDefaultXMLParserName(
const String& parserName);
746 static const String getDefaultXMLParserName();
762 bool updateWindowContainingMouse();
774 void setImageCodec(
const String& codecName);
792 static void setDefaultImageCodecName(
const String& codecName);
798 static const String& getDefaultImageCodecName();
817 void notifyDisplaySizeChanged(
const Size& new_size);
860 void invalidateAllCachedRendering();
879 bool injectMouseMove(
float delta_x,
float delta_y);
890 bool injectMouseLeaves(
void);
932 bool injectKeyDown(uint key_code);
946 bool injectKeyUp(uint key_code);
960 bool injectChar(utf32 code_point);
974 bool injectMouseWheelChange(
float delta);
991 bool injectMousePosition(
float x_pos,
float y_pos);
1004 bool injectTimePulse(
float timeElapsed);
1030 bool injectMouseButtonClick(
const MouseButton button);
1056 bool injectMouseButtonDoubleClick(
const MouseButton button);
1082 bool injectMouseButtonTripleClick(
const MouseButton button);
1145 Window* getTargetWindow(
const Point& pt,
const bool allow_disabled)
const;
1155 Window* getKeyboardTargetWindow(
void)
const;
1199 SystemKey keyCodeToSyskey(Key::Scan key,
bool direction);
1202 void outputLogHeader();
1205 void addStandardWindowFactories();
1208 void createSingletons();
1211 void destroySingletons();
1214 void setupXMLParser();
1217 void cleanupXMLParser();
1223 void setupImageCodec(
const String& codecName);
1226 void cleanupImageCodec();
1229 void initialiseVersionString();
1232 void invalidateAllWindows();
1238 void notifyMouseTransition(
Window* top,
Window* bottom,
1242 void createSystemOwnedDefaultTooltipWindow()
const;
1244 void destroySystemOwnedDefaultTooltipWindow();
1262 void onSingleClickTimeoutChanged(
EventArgs& e);
1269 void onMultiClickTimeoutChanged(
EventArgs& e);
1276 void onMultiClickAreaSizeChanged(
EventArgs& e);
1283 void onDefaultFontChanged(
EventArgs& e);
1290 void onDefaultMouseCursorChanged(
EventArgs& e);
1297 void onMouseMoveScalingChanged(
EventArgs& e);
1305 bool d_ourResourceProvider;
1306 Font* d_defaultFont;
1323 double d_click_timeout;
1324 double d_dblclick_timeout;
1325 Size d_dblclick_size;
1327 MouseClickTrackerImpl*
const d_clickTrackerPimpl;
1330 const Image* d_defaultMouseCursor;
1336 float d_mouseScalingFactor;
1339 bool d_ourXmlParser;
1343 mutable Tooltip* d_defaultTooltip;
1345 mutable bool d_weOwnTooltip;
1347 String d_defaultTooltipType;
1349 static String d_defaultXMLParserName;
1354 bool d_ourImageCodec;
1360 static String d_defaultImageCodecName;
1366 bool d_generateMouseClickEvents;
1372 #if defined(_MSC_VER)
1373 # pragma warning(pop)
1376 #endif // end of guard _CEGUISystem_h_
Abstract ImageLoader class. An image loader encapsulate the loading of a texture. ...
Definition: CEGUIImageCodec.h:46
Abstract interface required for all scripting support modules to be used with the CEGUI system...
Definition: CEGUIScriptModule.h:46
void signalRedraw()
Causes a full re-draw next time renderGUI() is called.
Definition: CEGUISystem.h:234
Class used as a two dimensional vector (aka a Point)
Definition: CEGUIVector.h:45
Window * getGUISheet(void) const
Return a pointer to the active GUI sheet (root) window.
Definition: CEGUISystem.h:279
Class that wraps and gives access to a dynamically linked module (.dll, .so, etc...)
Definition: CEGUIDynamicModule.h:69
const Image * getDefaultMouseCursor(void) const
Return the currently set default mouse cursor image.
Definition: CEGUISystem.h:419
Abstract class that defines the required interface for all resource provider sub-classes.
Definition: CEGUIResourceProvider.h:48
Class that represents a single Image of an Imageset.
Definition: CEGUIImage.h:57
Base class used as the argument to all subscribers Event object.
Definition: CEGUIEventArgs.h:52
static const String EventGUISheetChanged
Definition: CEGUISystem.h:82
Class that holds the size (width & height) of something.
Definition: CEGUISize.h:43
static const String EventDefaultMouseCursorChanged
Definition: CEGUISystem.h:102
MouseButton
Enumeration of mouse buttons.
Definition: CEGUIInputEvent.h:204
const Size & getMultiClickToleranceAreaSize(void) const
Return the size of the allowable mouse movement tolerance used when generating multi-click events...
Definition: CEGUISystem.h:318
Window * getModalTarget(void) const
Return a pointer to the Window that is currently the modal target.
Definition: CEGUISystem.h:689
XMLParser * getXMLParser(void) const
Return the XMLParser object.
Definition: CEGUISystem.h:627
static const String EventMouseMoveScalingChanged
Definition: CEGUISystem.h:106
Window * getWindowContainingMouse(void) const
Return the Window object that the mouse is presently within.
Definition: CEGUISystem.h:474
void setDefaultMouseCursor(MouseCursorImage image)
Set the image to be used as the default mouse cursor.
Definition: CEGUISystem.h:446
static const String EventRenderedStringParserChanged
Definition: CEGUISystem.h:116
static const String EventDefaultFontChanged
Definition: CEGUISystem.h:98
static const String EventMultiClickTimeoutChanged
Definition: CEGUISystem.h:90
static const Size DefaultMultiClickAreaSize
Default allowable mouse movement for multi-click event generation.
Definition: CEGUISystem.h:74
static const String EventDisplaySizeChanged
Definition: CEGUISystem.h:112
void setModalTarget(Window *target)
Internal method to directly set the current modal target.
Definition: CEGUISystem.h:680
static const String EventNamespace
Namespace for global events.
Definition: CEGUISystem.h:67
Definition: CEGUISingleton.h:56
Abstract class defining the basic required interface for Renderer objects.
Definition: CEGUIRenderer.h:80
Class that encapsulates a typeface.
Definition: CEGUIFont.h:58
MouseCursorImage
Enumeration of special values used for mouse cursor settings in Window objects.
Definition: CEGUIMouseCursor.h:57
An abstract base class providing common functionality and specifying the required interface for deriv...
Definition: CEGUIWindow.h:138
SystemKey
System key flag values.
Definition: CEGUIInputEvent.h:227
static const String EventSingleClickTimeoutChanged
Definition: CEGUISystem.h:86
static const double DefaultSingleClickTimeout
Default timeout for generation of single click events.
Definition: CEGUISystem.h:72
Class that collects together a set of Event objects.
Definition: CEGUIEventSet.h:66
Specifies interface for classes that parse text into RenderedString objects.
Definition: CEGUIRenderedStringParser.h:37
static const double DefaultMultiClickTimeout
Default timeout for generation of multi-click events.
Definition: CEGUISystem.h:73
EventArgs based class that is used for objects passed to handlers triggered for events concerning som...
Definition: CEGUIInputEvent.h:245
bool isRedrawRequested() const
Return a boolean value to indicate whether a full re-draw is requested next time renderGUI() is calle...
Definition: CEGUISystem.h:244
double getSingleClickTimeout(void) const
Return the current timeout for generation of single-click events.
Definition: CEGUISystem.h:291
static const String EventMultiClickAreaSizeChanged
Definition: CEGUISystem.h:94
EventArgs based class that is used for objects passed to input event handlers concerning mouse input...
Definition: CEGUIInputEvent.h:274
Renderer * getRenderer(void) const
Return a pointer to the Renderer object being used by the system.
Definition: CEGUISystem.h:168
The System class is the CEGUI class that provides access to all other elements in this system...
Definition: CEGUISystem.h:64
Font * getDefaultFont(void) const
Return a pointer to the default Font for the GUI system.
Definition: CEGUISystem.h:224
This is an abstract class that is used by CEGUI to interface with XML parser libraries.
Definition: CEGUIXMLParser.h:42
String class used within the GUI system.
Definition: CEGUIString.h:57
uint getSystemKeys(void) const
Return the current system keys value.
Definition: CEGUISystem.h:588
double getMultiClickTimeout(void) const
Return the current timeout for generation of multi-click events.
Definition: CEGUISystem.h:305