Crazy Eddie's GUI System
0.8.7
|
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)
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;
414 #if defined(_MSC_VER)
415 # pragma warning(pop)
418 #endif // end of guard _CEGUIMouseCursor_h_
Abstract class defining the interface for objects that buffer geometry for later rendering.
Definition: GeometryBuffer.h:44
const URect & getUnifiedConstraintArea(void) const
return the current constraint area of the mouse cursor.
EventArgs based class that is used for objects passed to input event handlers concerning mouse cursor...
Definition: InputEvent.h:300
static const String EventDefaultImageChanged
Definition: MouseCursor.h:74
void draw(void) const
Makes the cursor draw itself.
virtual void onDefaultImageChanged(MouseCursorEventArgs &e)
Event triggered internally when mouse cursor default image is changed.
void offsetPosition(const Vector2f &offset)
Offset the mouse cursor position by the deltas specified in offset.
static const String EventImageChanged
Definition: MouseCursor.h:65
Main namespace for Crazy Eddie's GUI Library.
Definition: arch_overview.dox:1
Interface providing event signaling and handling.
Definition: EventSet.h:167
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
Rectf getConstraintArea(void) const
return the current constraint area of the mouse cursor.
Definition: MemoryAllocatedObject.h:110
void show(void)
Shows the mouse cursor.
Definition: MouseCursor.h:234
void setUnifiedConstraintArea(const URect *area)
Set the area that the mouse cursor is constrained to.
void setImage(const String &name)
Set the current mouse cursor image.
static void setInitialMousePosition(const Vector2f &position)
Static function to pre-initialise the mouse cursor position (prior to MouseCursor instantiation).
void setVisible(bool visible)
Set the visibility of the mouse cursor.
Definition: MouseCursor.h:247
void invalidate()
Mark the cached geometry as invalid so it will be recached next time the mouse cursor is drawn.
void setExplicitRenderSize(const Sizef &size)
Set an explicit size for the mouse cursor image to be drawn at.
virtual void onImageChanged(MouseCursorEventArgs &e)
Event triggered internally when mouse cursor image is changed.
const Image * getImage(void) const
Get the current mouse cursor image.
Definition: MouseCursor.h:118
bool isVisible(void) const
return whether the mouse cursor is visible.
Definition: MouseCursor.h:257
Class that provides mouse cursor support.
Definition: MouseCursor.h:54
void setImage(const Image *image)
Set the current mouse cursor image.
void setPosition(const Vector2f &position)
Set the current mouse cursor position.
void notifyDisplaySizeChanged(const Sizef &new_size)
Function used to notify the MouseCursor of changes in the display size.
const Sizef & getExplicitRenderSize() const
Return the explicit render size currently set. A return size of (0, 0) indicates that the real image ...
String class used within the GUI system.
Definition: String.h:64
static const String EventNamespace
Namespace for global events.
Definition: MouseCursor.h:57
const Image * getDefaultImage() const
Return the currently set default mouse cursor image.
Vector2f getDisplayIndependantPosition(void) const
Return the current mouse cursor position as display resolution independant values.
void setDefaultImage(const String &name)
Set the image to be used as the default mouse cursor.
Interface for Image.
Definition: Image.h:161
~MouseCursor(void)
Destructor for MouseCursor objects.
void setConstraintArea(const Rectf *area)
Set the area that the mouse cursor is constrained to.
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
MouseCursor(void)
Constructor for MouseCursor objects.