29#ifndef _CEGUIMouseCursor_h_
30#define _CEGUIMouseCursor_h_
32#include "CEGUI/Base.h"
33#include "CEGUI/String.h"
34#include "CEGUI/Vector.h"
35#include "CEGUI/Rect.h"
36#include "CEGUI/EventSet.h"
37#include "CEGUI/InputEvent.h"
38#include "CEGUI/UDim.h"
43# pragma warning(disable : 4275)
44# pragma warning(disable : 4251)
224 void hide(
void) {d_visible =
false;}
234 void show(
void) {d_visible =
true;}
268 {
return d_position; }
380 void constrainPosition(
void);
383 void cacheGeometry()
const;
386 void calculateCustomOffset()
const;
392 const Image* d_cursorImage;
394 const Image* d_defaultCursorImage;
405 static bool s_initialPositionSet;
409 mutable bool d_cachedGeometryValid;
Definition MemoryAllocatedObject.h:110
Interface providing event signaling and handling.
Definition EventSet.h:167
Abstract class defining the interface for objects that buffer geometry for later rendering.
Definition GeometryBuffer.h:44
Interface for Image.
Definition Image.h:161
EventArgs based class that is used for objects passed to input event handlers concerning mouse cursor...
Definition InputEvent.h:300
Class that provides mouse cursor support.
Definition MouseCursor.h:54
void setConstraintArea(const Rectf *area)
Set the area that the mouse cursor is constrained to.
void draw(void) const
Makes the cursor draw itself.
void offsetPosition(const Vector2f &offset)
Offset the mouse cursor position by the deltas specified in offset.
void setImage(const String &name)
Set the current mouse cursor image.
static const String EventNamespace
Namespace for global events.
Definition MouseCursor.h:57
Rectf getConstraintArea(void) const
return the current constraint area of the mouse cursor.
~MouseCursor(void)
Destructor for MouseCursor objects.
static void setInitialMousePosition(const Vector2f &position)
Static function to pre-initialise the mouse cursor position (prior to MouseCursor instantiation).
void setUnifiedConstraintArea(const URect *area)
Set the area that the mouse cursor is constrained to.
void show(void)
Shows the mouse cursor.
Definition MouseCursor.h:234
const Image * getDefaultImage() const
Return the currently set default mouse cursor image.
virtual void onImageChanged(MouseCursorEventArgs &e)
Event triggered internally when mouse cursor image is changed.
void setDefaultImage(const String &name)
Set the image to be used as the default mouse cursor.
Vector2f getPosition(void) const
Return the current mouse cursor position as a pixel offset from the top-left corner of the display.
Definition MouseCursor.h:267
void setImage(const Image *image)
Set the current mouse cursor image.
void notifyDisplaySizeChanged(const Sizef &new_size)
Function used to notify the MouseCursor of changes in the display size.
void setPosition(const Vector2f &position)
Set the current mouse cursor position.
void setExplicitRenderSize(const Sizef &size)
Set an explicit size for the mouse cursor image to be drawn at.
static const String EventImageChanged
Definition MouseCursor.h:65
MouseCursor(void)
Constructor for MouseCursor objects.
const URect & getUnifiedConstraintArea(void) const
return the current constraint area of the mouse cursor.
static const String EventDefaultImageChanged
Definition MouseCursor.h:74
void invalidate()
Mark the cached geometry as invalid so it will be recached next time the mouse cursor is drawn.
const Sizef & getExplicitRenderSize() const
Return the explicit render size currently set. A return size of (0, 0) indicates that the real image ...
void setDefaultImage(const Image *image)
Set the image to be used as the default mouse cursor.
void hide(void)
Hides the mouse cursor.
Definition MouseCursor.h:224
const Image * getImage(void) const
Get the current mouse cursor image.
Definition MouseCursor.h:118
virtual void onDefaultImageChanged(MouseCursorEventArgs &e)
Event triggered internally when mouse cursor default image is changed.
bool isVisible(void) const
return whether the mouse cursor is visible.
Definition MouseCursor.h:257
Vector2f getDisplayIndependantPosition(void) const
Return the current mouse cursor position as display resolution independant values.
void setVisible(bool visible)
Set the visibility of the mouse cursor.
Definition MouseCursor.h:247
String class used within the GUI system.
Definition String.h:64
Main namespace for Crazy Eddie's GUI Library.
Definition arch_overview.dox:1