Public Member Functions
GUI::MouseCursor Class Reference

Class that allows access to the GUI system mouse cursor. More...

Inherits GUI::EventSet.

List of all members.

Public Member Functions

void setImage (string imageset, string image_name)
 Set the current mouse cursor image.
void setImage (Image image)
 Set the current mouse cursor image.
Image getImage ()
 Get the current mouse cursor image.
void setPosition (Point position)
 Set the current mouse cursor position.
void offsetPosition (Point offset)
 Offset the mouse cursor position by the deltas specified in offset.
void setConstraintArea (Rect area)
 Set the area that the mouse cursor is constrained to.
void setUnifiedConstraintArea (URect area)
 Set the area that the mouse cursor is constrained to.
void hide ()
 Hides the mouse cursor.
void show ()
 Shows the mouse cursor.
void setVisible (bool visible)
 Set the visibility of the mouse cursor.
bool isVisible ()
 return whether the mouse cursor is visible.
Point getPosition ()
 Return the current mouse cursor position as a pixel offset from the top-left corner of the display.
Rect getConstraintArea ()
 return the current constraint area of the mouse cursor.
URect getUnifiedConstraintArea ()
 return the current constraint area of the mouse cursor.
Point getDisplayIndependantPosition ()
 Return the current mouse cursor position as display resolution independant values.
- Public Member Functions inherited from GUI::EventSet
void addEvent (string name)
 Add a new Event to the EventSet with the given name.
void removeEvent (string name)
 Removes the Event with the given name. All connections to the event are disconnected.
void removeAllEvents ()
 Remove all Event objects from the EventSet.
bool isEventPresent (string name)
 Checks to see if an Event with the given name is present in the EventSet.
EventConnection subscribeEvent (string name, string subscriber_name)
 Subscribes the named Event to a scripted funtion.
void fireEvent (string name, EventArgs args, string eventNamespace="")
 Fires the named event passing the given EventArgs object.
bool isMuted ()
 Return whether the EventSet is muted or not.
void setMutedState (bool setting)
 Set the mute state for this EventSet.

Additional Inherited Members

- Public Attributes inherited from GUI::EventSet
Event Event
 Can be used to iterate over the events currently added to the EventSet.

Detailed Description

Class that allows access to the GUI system mouse cursor.

The MouseCursor provides functionality to access the position and imagery of the mouse cursor / pointer


Member Function Documentation

void GUI::MouseCursor::setImage ( string  imageset,
string  image_name 
)

Set the current mouse cursor image.

Parameters:
imagesetString object holding the name of the Imageset that contains the desired Image.
image_nameString object holding the name of the desired Image on Imageset imageset.
Returns:
Nothing.
Exceptions:
UnknownObjectExceptionthrown if imageset is not known, or if imageset contains no Image named image_name.
Image GUI::MouseCursor::getImage ( )

Get the current mouse cursor image.

Returns:
The current image used to draw mouse cursor.
void GUI::MouseCursor::setPosition ( Point  position)

Set the current mouse cursor position.

Parameters:
positionPoint object describing the new location for the mouse. This will be clipped to within the renderer screen area.
void GUI::MouseCursor::offsetPosition ( Point  offset)

Offset the mouse cursor position by the deltas specified in offset.

Parameters:
offsetPoint object which describes the amount to move the cursor in each axis.
Returns:
Nothing.
void GUI::MouseCursor::setConstraintArea ( Rect  area)

Set the area that the mouse cursor is constrained to.

Parameters:
areaPointer to a Rect object that describes the area of the display that the mouse is allowed to occupy. The given area will be clipped to the current Renderer screen area - it is never possible for the mouse to leave this area. If this parameter is NULL, the constraint is set to the size of the current Renderer screen area.
Returns:
Nothing.
void GUI::MouseCursor::setUnifiedConstraintArea ( URect  area)

Set the area that the mouse cursor is constrained to.

Parameters:
areaPointer to a URect object that describes the area of the display that the mouse is allowed to occupy. The given area will be clipped to the current Renderer screen area - it is never possible for the mouse to leave this area. If this parameter is NULL, the constraint is set to the size of the current Renderer screen area.
Returns:
Nothing.
void GUI::MouseCursor::hide ( )

Hides the mouse cursor.

Returns:
Nothing.
void GUI::MouseCursor::show ( )

Shows the mouse cursor.

Returns:
Nothing.
void GUI::MouseCursor::setVisible ( bool  visible)

Set the visibility of the mouse cursor.

Parameters:
visible'true' to show the mouse cursor, 'false' to hide it.
Returns:
Nothing.
bool GUI::MouseCursor::isVisible ( )

return whether the mouse cursor is visible.

Returns:
true if the mouse cursor is visible, false if the mouse cursor is hidden.
Point GUI::MouseCursor::getPosition ( )

Return the current mouse cursor position as a pixel offset from the top-left corner of the display.

Returns:
Point object describing the mouse cursor position in screen pixels.
Rect GUI::MouseCursor::getConstraintArea ( )

return the current constraint area of the mouse cursor.

Returns:
Rect object describing the active area that the mouse cursor is constrained to.
URect GUI::MouseCursor::getUnifiedConstraintArea ( )

return the current constraint area of the mouse cursor.

Returns:
URect object describing the active area that the mouse cursor is constrained to.
Point GUI::MouseCursor::getDisplayIndependantPosition ( )

Return the current mouse cursor position as display resolution independant values.

Returns:
Point object describing the current mouse cursor position as resolution independant values that range from 0.0f to 1.0f, where 0.0f represents the left-most and top-most positions, and 1.0f represents the right-most and bottom-most positions.