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_