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"
42 # pragma warning(push)
43 # pragma warning(disable : 4275)
44 # pragma warning(disable : 4251)
102 void setImage(
const String& name);
109 void setImage(
const Image* image);
128 void setDefaultImage(
const Image* image);
140 void setDefaultImage(
const String& name);
151 const Image* getDefaultImage()
const;
161 void draw(
void)
const;
171 void setPosition(
const Vector2f& position);
184 void offsetPosition(
const Vector2f& offset);
199 void setConstraintArea(
const Rectf* area);
214 void setUnifiedConstraintArea(
const URect* area);
224 void hide(
void) {d_visible =
false;}
234 void show(
void) {d_visible =
true;}
268 {
return d_position; }
278 Rectf getConstraintArea(
void)
const;
288 const URect& getUnifiedConstraintArea(
void)
const;
300 Vector2f getDisplayIndependantPosition(
void)
const;
313 void notifyDisplaySizeChanged(
const Sizef& new_size);
330 void setExplicitRenderSize(
const Sizef& size);
337 const Sizef& getExplicitRenderSize()
const;
353 static void setInitialMousePosition(
const Vector2f& 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;
414 #if defined(_MSC_VER)
415 # pragma warning(pop)
418 #endif // end of guard _CEGUIMouseCursor_h_
Class that provides mouse cursor support.
Definition: MouseCursor.h:51
Definition: MemoryAllocatedObject.h:109
void hide(void)
Hides the mouse cursor.
Definition: MouseCursor.h:224
Interface for Image.
Definition: Image.h:158
Main namespace for Crazy Eddie's GUI Library.
Definition: arch_overview.dox:1
Abstract class defining the interface for objects that buffer geometry for later rendering.
Definition: GeometryBuffer.h:42
static const String EventImageChanged
Definition: MouseCursor.h:65
static const String EventDefaultImageChanged
Definition: MouseCursor.h:74
bool isVisible(void) const
return whether the mouse cursor is visible.
Definition: MouseCursor.h:257
static const String EventNamespace
Namespace for global events.
Definition: MouseCursor.h:57
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
EventArgs based class that is used for objects passed to input event handlers concerning mouse cursor...
Definition: InputEvent.h:299
const Image * getImage(void) const
Get the current mouse cursor image.
Definition: MouseCursor.h:118
void setVisible(bool visible)
Set the visibility of the mouse cursor.
Definition: MouseCursor.h:247
Interface providing event signaling and handling.
Definition: EventSet.h:166
void show(void)
Shows the mouse cursor.
Definition: MouseCursor.h:234
String class used within the GUI system.
Definition: String.h:62