Home | Namespaces | Hierarchy | Alphabetical List | Class list | Files | Namespace Members | Class members | File members | Tutorials
Public Member Functions | List of all members
irr::gui::ICursorControl Class Reference

Interface to manipulate the mouse cursor. More...

#include <ICursorControl.h>

Inheritance diagram for irr::gui::ICursorControl:
irr::IReferenceCounted

Public Member Functions

virtual const core::position2d
< s32 > & 
getPosition ()=0
 Returns the current position of the mouse cursor.
virtual core::position2d< f32getRelativePosition ()=0
 Returns the current position of the mouse cursor.
virtual bool isVisible () const =0
 Returns if the cursor is currently visible.
virtual void setPosition (const core::position2d< f32 > &pos)=0
 Sets the new position of the cursor.
virtual void setPosition (f32 x, f32 y)=0
 Sets the new position of the cursor.
virtual void setPosition (const core::position2d< s32 > &pos)=0
 Sets the new position of the cursor.
virtual void setPosition (s32 x, s32 y)=0
 Sets the new position of the cursor.
virtual void setReferenceRect (core::rect< s32 > *rect=0)=0
 Sets an absolute reference rect for setting and retrieving the cursor position.
virtual void setVisible (bool visible)=0
 Changes the visible state of the mouse cursor.
- Public Member Functions inherited from irr::IReferenceCounted
bool drop () const
 Drops the object. Decrements the reference counter by one.
const c8getDebugName () const
 Returns the debug name of the object.
s32 getReferenceCount () const
 Get the reference count.
void grab () const
 Grabs the object. Increments the reference counter by one.
 IReferenceCounted ()
 Constructor.
virtual ~IReferenceCounted ()
 Destructor.

Additional Inherited Members

- Protected Member Functions inherited from irr::IReferenceCounted
void setDebugName (const c8 *newName)
 Sets the debug name of the object.

Detailed Description

Interface to manipulate the mouse cursor.

Definition at line 18 of file ICursorControl.h.

Member Function Documentation

virtual const core::position2d<s32>& irr::gui::ICursorControl::getPosition ( )
pure virtual

Returns the current position of the mouse cursor.

\return Returns the current position of the cursor. The returned position

is the position of the mouse cursor in pixel units.

virtual core::position2d<f32> irr::gui::ICursorControl::getRelativePosition ( )
pure virtual

Returns the current position of the mouse cursor.

\return Returns the current position of the cursor. The returned position

is a value between (0.0f, 0.0f) and (1.0f, 1.0f), where (0.0f, 0.0f) is the top left corner and (1.0f, 1.0f) is the bottom right corner of the render window.

virtual bool irr::gui::ICursorControl::isVisible ( ) const
pure virtual

Returns if the cursor is currently visible.

Returns
True if the cursor is visible, false if not.
virtual void irr::gui::ICursorControl::setPosition ( const core::position2d< f32 > &  pos)
pure virtual

Sets the new position of the cursor.

The position must be

between (0.0f, 0.0f) and (1.0f, 1.0f), where (0.0f, 0.0f) is the top left corner and (1.0f, 1.0f) is the bottom right corner of the render window.

Parameters
posNew position of the cursor.
virtual void irr::gui::ICursorControl::setPosition ( f32  x,
f32  y 
)
pure virtual

Sets the new position of the cursor.

The position must be

between (0.0f, 0.0f) and (1.0f, 1.0f), where (0.0f, 0.0f) is the top left corner and (1.0f, 1.0f) is the bottom right corner of the render window.

Parameters
xNew x-coord of the cursor.
yNew x-coord of the cursor.
virtual void irr::gui::ICursorControl::setPosition ( const core::position2d< s32 > &  pos)
pure virtual

Sets the new position of the cursor.

Parameters
pos,:New position of the cursor. The coordinates are pixel units.
virtual void irr::gui::ICursorControl::setPosition ( s32  x,
s32  y 
)
pure virtual

Sets the new position of the cursor.

\param x New x-coord of the cursor. The coordinates are pixel units.
Parameters
yNew y-coord of the cursor. The coordinates are pixel units.
virtual void irr::gui::ICursorControl::setReferenceRect ( core::rect< s32 > *  rect = 0)
pure virtual

Sets an absolute reference rect for setting and retrieving the cursor position.

If this rect is set, the cursor position is not being calculated relative to

the rendering window but to this rect. You can set the rect pointer to 0 to disable this feature again. This feature is useful when rendering into parts of foreign windows for example in an editor.

Parameters
rect,:A pointer to an reference rectangle or 0 to disable the reference rectangle.
virtual void irr::gui::ICursorControl::setVisible ( bool  visible)
pure virtual

Changes the visible state of the mouse cursor.

\param visible: The new visible state. If true, the cursor will be visible,

if false, it will be invisible.


The documentation for this class was generated from the following file:

The Irrlicht Engine
The Irrlicht Engine Documentation © 2003-2010 by Nikolaus Gebhardt. Generated on Fri Mar 21 2014 04:40:21 by Doxygen (1.8.1.2)