27 #ifndef _CEGUIGUIContext_h_
28 #define _CEGUIGUIContext_h_
30 #include "CEGUI/RenderingSurface.h"
31 #include "CEGUI/InjectedInputReceiver.h"
32 #include "CEGUI/MouseCursor.h"
33 #include "CEGUI/SystemKeys.h"
35 #if defined (_MSC_VER)
36 # pragma warning(push)
37 # pragma warning(disable : 4251)
42 struct MouseClickTracker;
72 static const float DefaultMouseButtonClickTimeout;
73 static const float DefaultMouseButtonMultiClickTimeout;
74 static const Sizef DefaultMouseButtonMultiClickTolerance;
113 Window* getRootWindow()
const;
114 void setRootWindow(
Window* new_root);
124 void setModalWindow(
Window* window);
127 Window* getModalWindow()
const;
129 Window* getWindowContainingMouse()
const;
131 const Sizef& getSurfaceSize()
const;
137 bool isDirty()
const;
153 void setMouseMoveScalingFactor(
float factor);
154 float getMouseMoveScalingFactor()
const;
156 void setMouseButtonClickTimeout(
float seconds);
157 float getMouseButtonClickTimeout()
const;
159 void setMouseButtonMultiClickTimeout(
float seconds);
160 float getMouseButtonMultiClickTimeout()
const;
162 void setMouseButtonMultiClickTolerance(
const Sizef& sz);
163 const Sizef& getMouseButtonMultiClickTolerance()
const;
178 void setMouseClickEventGenerationEnabled(
const bool enable);
193 bool isMouseClickEventGenerationEnabled()
const;
196 void updateWindowContainingMouse();
198 Window* getInputCaptureWindow()
const;
199 void setInputCaptureWindow(
Window* window);
215 void setDefaultTooltipObject(
Tooltip* tooltip);
229 void setDefaultTooltipType(
const String& tooltip_type);
232 Tooltip* getDefaultTooltipObject()
const;
244 void setDefaultFont(
const String& name);
253 void setDefaultFont(
Font* font);
262 Font* getDefaultFont()
const;
265 bool injectMouseMove(
float delta_x,
float delta_y);
266 bool injectMouseLeaves(
void);
269 bool injectKeyDown(Key::Scan scan_code);
270 bool injectKeyUp(Key::Scan scan_code);
272 bool injectMouseWheelChange(
float delta);
273 bool injectMousePosition(
float x_pos,
float y_pos);
274 bool injectTimePulse(
float timeElapsed);
275 bool injectMouseButtonClick(
const MouseButton button);
276 bool injectMouseButtonDoubleClick(
const MouseButton button);
277 bool injectMouseButtonTripleClick(
const MouseButton button);
278 bool injectCopyRequest();
279 bool injectCutRequest();
280 bool injectPasteRequest();
286 void updateRootWindowAreaRects()
const;
287 void drawWindowContentToTarget();
288 void renderWindowHierarchyToSurfaces();
290 void createDefaultTooltipWindowInstance()
const;
291 void destroyDefaultTooltipWindowInstance();
294 void notifyDefaultFontChanged(
Window* hierarchy_root)
const;
297 Window* getTargetWindow(
const Vector2f& pt,
const bool allow_disabled)
const;
298 Window* getKeyboardTargetWindow()
const;
305 bool areaChangedHandler(
const EventArgs& args);
306 bool windowDestroyedHandler(
const EventArgs& args);
309 bool updateWindowContainingMouse_impl()
const;
310 void resetWindowContainingMouse();
319 virtual void onDefaultFontChanged(
EventArgs& args);
338 mutable Tooltip* d_defaultTooltipObject;
339 mutable bool d_weCreatedTooltipObject;
340 String d_defaultTooltipType;
347 mutable Window* d_windowContainingMouse;
348 mutable bool d_windowContainingMouseIsUpToDate;
353 MouseClickTracker* d_mouseClickTrackers;
361 #if defined(_MSC_VER)
362 # pragma warning(pop)