28 #ifndef _CEGUIGUIContext_h_
29 #define _CEGUIGUIContext_h_
31 #include "CEGUI/RenderingSurface.h"
32 #include "CEGUI/InjectedInputReceiver.h"
33 #include "CEGUI/MouseCursor.h"
34 #include "CEGUI/SystemKeys.h"
36 #if defined (_MSC_VER)
37 # pragma warning(push)
38 # pragma warning(disable : 4251)
43 struct MouseClickTracker;
73 static const float DefaultMouseButtonClickTimeout;
74 static const float DefaultMouseButtonMultiClickTimeout;
75 static const Sizef DefaultMouseButtonMultiClickTolerance;
114 Window* getRootWindow()
const;
115 void setRootWindow(
Window* new_root);
125 void setModalWindow(
Window* window);
128 Window* getModalWindow()
const;
130 Window* getWindowContainingMouse()
const;
132 const Sizef& getSurfaceSize()
const;
138 bool isDirty()
const;
143 void setMouseMoveScalingFactor(
float factor);
144 float getMouseMoveScalingFactor()
const;
146 void setMouseButtonClickTimeout(
float seconds);
147 float getMouseButtonClickTimeout()
const;
149 void setMouseButtonMultiClickTimeout(
float seconds);
150 float getMouseButtonMultiClickTimeout()
const;
152 void setMouseButtonMultiClickTolerance(
const Sizef& sz);
153 const Sizef& getMouseButtonMultiClickTolerance()
const;
168 void setMouseClickEventGenerationEnabled(
const bool enable);
183 bool isMouseClickEventGenerationEnabled()
const;
186 void updateWindowContainingMouse();
188 Window* getInputCaptureWindow()
const;
189 void setInputCaptureWindow(
Window* window);
205 void setDefaultTooltipObject(
Tooltip* tooltip);
219 void setDefaultTooltipType(
const String& tooltip_type);
222 Tooltip* getDefaultTooltipObject()
const;
234 void setDefaultFont(
const String& name);
243 void setDefaultFont(
Font* font);
252 Font* getDefaultFont()
const;
255 bool injectMouseMove(
float delta_x,
float delta_y);
256 bool injectMouseLeaves(
void);
259 bool injectKeyDown(Key::Scan scan_code);
260 bool injectKeyUp(Key::Scan scan_code);
262 bool injectMouseWheelChange(
float delta);
263 bool injectMousePosition(
float x_pos,
float y_pos);
264 bool injectTimePulse(
float timeElapsed);
265 bool injectMouseButtonClick(
const MouseButton button);
266 bool injectMouseButtonDoubleClick(
const MouseButton button);
267 bool injectMouseButtonTripleClick(
const MouseButton button);
268 bool injectCopyRequest();
269 bool injectCutRequest();
270 bool injectPasteRequest();
276 void updateRootWindowAreaRects()
const;
277 void drawWindowContentToTarget();
278 void renderWindowHierarchyToSurfaces();
280 void createDefaultTooltipWindowInstance()
const;
281 void destroyDefaultTooltipWindowInstance();
284 void notifyDefaultFontChanged(
Window* hierarchy_root)
const;
287 Window* getTargetWindow(
const Vector2f& pt,
const bool allow_disabled)
const;
288 Window* getKeyboardTargetWindow()
const;
295 bool areaChangedHandler(
const EventArgs& args);
296 bool windowDestroyedHandler(
const EventArgs& args);
299 bool updateWindowContainingMouse_impl()
const;
300 void resetWindowContainingMouse();
309 virtual void onDefaultFontChanged(
EventArgs& args);
328 mutable Tooltip* d_defaultTooltipObject;
329 mutable bool d_weCreatedTooltipObject;
330 String d_defaultTooltipType;
337 mutable Window* d_windowContainingMouse;
338 mutable bool d_windowContainingMouseIsUpToDate;
343 MouseClickTracker* d_mouseClickTrackers;
351 #if defined(_MSC_VER)
352 # pragma warning(pop)