Class that allows access to the GUI system mouse cursor. More...
Inherits GUI::EventSet.
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. |
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
void GUI::MouseCursor::setImage | ( | string | imageset, |
string | image_name | ||
) |
Set the current mouse cursor image.
imageset | String object holding the name of the Imageset that contains the desired Image. |
image_name | String object holding the name of the desired Image on Imageset imageset. |
UnknownObjectException | thrown if imageset is not known, or if imageset contains no Image named image_name. |
Image GUI::MouseCursor::getImage | ( | ) |
Get the current mouse cursor image.
void GUI::MouseCursor::setPosition | ( | Point | position | ) |
Set the current mouse cursor position.
position | Point 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.
offset | Point object which describes the amount to move the cursor in each axis. |
void GUI::MouseCursor::setConstraintArea | ( | Rect | area | ) |
Set the area that the mouse cursor is constrained to.
area | Pointer 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. |
void GUI::MouseCursor::setUnifiedConstraintArea | ( | URect | area | ) |
Set the area that the mouse cursor is constrained to.
area | Pointer 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. |
void GUI::MouseCursor::hide | ( | ) |
Hides the mouse cursor.
void GUI::MouseCursor::show | ( | ) |
Shows the mouse cursor.
void GUI::MouseCursor::setVisible | ( | bool | visible | ) |
Set the visibility of the mouse cursor.
visible | 'true' to show the mouse cursor, 'false' to hide it. |
bool GUI::MouseCursor::isVisible | ( | ) |
return whether the mouse cursor is visible.
Point GUI::MouseCursor::getPosition | ( | ) |
Return the current mouse cursor position as a pixel offset from the top-left corner of the display.
Rect GUI::MouseCursor::getConstraintArea | ( | ) |
return the current constraint area of the mouse cursor.
URect GUI::MouseCursor::getUnifiedConstraintArea | ( | ) |
return the current constraint area of the mouse cursor.
Point GUI::MouseCursor::getDisplayIndependantPosition | ( | ) |
Return the current mouse cursor position as display resolution independant values.