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"
37# pragma warning(disable : 4251)
42struct MouseClickTracker;
72 static const float DefaultMouseButtonClickTimeout;
73 static const float DefaultMouseButtonMultiClickTimeout;
74 static const Sizef DefaultMouseButtonMultiClickTolerance;
113 Window* getRootWindow()
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;
198 Window* getInputCaptureWindow()
const;
199 void setInputCaptureWindow(
Window* window);
286 void updateRootWindowAreaRects()
const;
287 void drawWindowContentToTarget();
288 void renderWindowHierarchyToSurfaces();
290 void createDefaultTooltipWindowInstance()
const;
291 void destroyDefaultTooltipWindowInstance();
298 Window* getKeyboardTargetWindow()
const;
310 void resetWindowContainingMouse();
338 mutable Tooltip* d_defaultTooltipObject;
339 mutable bool d_weCreatedTooltipObject;
340 String d_defaultTooltipType;
347 mutable Window* d_windowContainingMouse;
348 mutable bool d_windowContainingMouseIsUpToDate;
Base class used as the argument to all subscribers Event object.
Definition EventArgs.h:51
Event::Connection wrapper that automatically disconnects the connection when the object is deleted (o...
Definition Event.h:92
Class that encapsulates a typeface.
Definition Font.h:62
EventArgs class passed to subscribers for (most) GUIContext events.
Definition GUIContext.h:46
GUIContext * context
pointer to the GUIContext that triggered the event.
Definition GUIContext.h:53
EventArgs class passed for GUIContext RenderTarget related events.
Definition GUIContext.h:58
Definition GUIContext.h:70
bool injectMouseButtonClick(const MouseButton button)
Function to directly inject a mouse button click event.
Sizef d_mouseButtonMultiClickTolerance
Movement tolerance used when detecting multi-click events.
Definition GUIContext.h:336
float d_mouseButtonMultiClickTimeout
Timeout used when detecting multi-click events.
Definition GUIContext.h:334
bool injectKeyDown(Key::Scan scan_code)
Function that injects a key down event into the receiver.
void setDefaultTooltipObject(Tooltip *tooltip)
Set the default Tooltip object for this GUIContext. This value may be 0 to indicate that no default T...
bool injectMouseButtonTripleClick(const MouseButton button)
Function to directly inject a mouse button triple-click event.
bool injectChar(String::value_type code_point)
Function that injects a typed character event into the receiver.
bool injectMousePosition(float x_pos, float y_pos)
Function that injects a new position for the mouse cursor.
bool injectKeyUp(Key::Scan scan_code)
Function that injects a key up event into the receiver.
static const String EventDefaultFontChanged
Definition GUIContext.h:108
float d_mouseMovementScalingFactor
Scaling factor applied to injected mouse move deltas.
Definition GUIContext.h:328
static const String EventRootWindowChanged
Definition GUIContext.h:82
static const String EventMouseButtonMultiClickTimeoutChanged
Definition GUIContext.h:94
void setMouseClickEventGenerationEnabled(const bool enable)
Set whether automatic mouse button click and multi-click (i.e. double-click and treble-click) event g...
bool injectPasteRequest()
Tells the system to perform a clipboard paste operation.
static const String EventRenderTargetChanged
Definition GUIContext.h:104
Window * getModalWindow() const
Return a pointer to the Window that is currently set as modal.
void notifyMouseTransition(Window *top, Window *bottom, void(Window::*func)(MouseEventArgs &), MouseEventArgs &args) const
call some function for a chain of windows: (top, bottom]
void setDefaultFont(Font *font)
Set the default font to be used by the GUIContext.
Font * getDefaultFont() const
Return a pointer to the default Font for the GUIContext.
bool injectMouseWheelChange(float delta)
Function that injects a mouse-wheel / scroll-wheel event into the receiver.
void setDefaultFont(const String &name)
Set the default font to be used by the GUIContext.
bool injectCopyRequest()
Tells the receiver to perform a clipboard copy operation.
static const String EventMouseButtonClickTimeoutChanged
Definition GUIContext.h:90
void setDefaultTooltipType(const String &tooltip_type)
Set the default Tooltip to be used by specifying a Window type.
Sizef d_surfaceSize
a cache of the target surface size, allows returning by ref.
Definition GUIContext.h:345
bool isMouseClickEventGenerationEnabled() const
Return whether automatic mouse button click and multi-click (i.e. double-click and treble-click) even...
float d_mouseButtonClickTimeout
Timeout used to when detecting a single-click.
Definition GUIContext.h:332
MouseCursor & getMouseCursor()
Retrieves MouseCursor used in this GUIContext.
void updateWindowContainingMouse()
Tell the context to reconsider which window it thinks the mouse is in.
bool injectMouseButtonDown(MouseButton button)
Function that injects a mouse button down event into the receiver.
void draw()
Draw the GeometryBuffers for all rendering queues to the RenderTarget that this RenderingSurface is t...
bool injectTimePulse(float timeElapsed)
Function to inject time pulses into the receiver.
void setModalWindow(Window *window)
Internal function to directly set the current modal window.
void notifyDefaultFontChanged(Window *hierarchy_root) const
notify windows in a hierarchy using default font, when font changes.
void markAsDirty()
call to indicate that some redrawing is required.
bool injectCutRequest()
Tells the system to perform a clipboard cut operation.
bool injectMouseMove(float delta_x, float delta_y)
Function that injects a mouse movement event into the receiver.
bool updateWindowContainingMouse_impl() const
returns whether the window containing the mouse had changed.
bool d_generateMouseClickEvents
should mouse click/multi-click events be automatically generated.
Definition GUIContext.h:330
static const String EventMouseMoveScalingFactorChanged
Definition GUIContext.h:86
bool injectMouseLeaves(void)
Function that notifies that the mouse has left the host area that the receiver receives input for.
bool injectMouseButtonUp(MouseButton button)
Function that injects a mouse button up event into the receiver.
bool injectMouseButtonDoubleClick(const MouseButton button)
Function to directly inject a mouse button double-click event.
Tooltip * getDefaultTooltipObject() const
Returns a pointer to the context's default tooltip object. May return 0.
static const String EventMouseButtonMultiClickToleranceChanged
Definition GUIContext.h:99
Class that provides mouse cursor support.
Definition MouseCursor.h:54
EventArgs based class that is used for objects passed to input event handlers concerning mouse input.
Definition InputEvent.h:281
Defines interface to some surface that can be rendered to. Concrete instances of objects that impleme...
Definition RenderTarget.h:60
Class that represents a surface that can have geometry based imagery drawn to it.
Definition RenderingSurface.h:111
String class used within the GUI system.
Definition String.h:64
utf32 value_type
Basic 'code point' type used for String (utf32)
Definition String.h:69
Definition SystemKeys.h:35
base class for properties able to do native set/get
Definition TypedProperty.h:50
EventArgs based class that is used for objects passed to handlers triggered for events concerning som...
Definition InputEvent.h:252
An abstract base class providing common functionality and specifying the required interface for deriv...
Definition Window.h:151
Main namespace for Crazy Eddie's GUI Library.
Definition arch_overview.dox:1
MouseButton
Enumeration of mouse buttons.
Definition InputEvent.h:210