OIS  1.5
Object-oriented Input System
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
OIS::Mouse Class Reference

#include <OISMouse.h>

Inheritance diagram for OIS::Mouse:
OIS::Object

Public Member Functions

virtual ~Mouse ()
 
virtual void setEventCallback (MouseListener *mouseListener)
 
MouseListenergetEventCallback () const
 
const MouseStategetMouseState () const
 
- Public Member Functions inherited from OIS::Object
virtual ~Object ()
 
Type type () const
 
const std::string & vendor () const
 
virtual bool buffered () const
 
InputManagergetCreator () const
 
virtual void setBuffered (bool buffered)=0
 
virtual void capture ()=0
 
virtual int getID () const
 
virtual InterfacequeryInterface (Interface::IType type)=0
 
virtual void _initialize ()=0
 

Protected Member Functions

 Mouse (const std::string &vendor, bool buffered, int devID, InputManager *creator)
 
- Protected Member Functions inherited from OIS::Object
 Object (const std::string &vendor, Type iType, bool buffered, int devID, InputManager *creator)
 

Protected Attributes

MouseState mState
 The state of the mouse. More...
 
MouseListenermListener
 Used for buffered/actionmapping callback. More...
 
- Protected Attributes inherited from OIS::Object
std::string mVendor
 Vendor name if applicable/known. More...
 
Type mType
 Type of controller object. More...
 
bool mBuffered
 Buffered flag. More...
 
int mDevID
 Not fully implemented yet. More...
 
InputManagermCreator
 The creator who created this object. More...
 

Detailed Description

Mouse base class. To be implemented by specific system (ie. DirectX Mouse) This class is useful as you remain OS independent using this common interface.

Constructor & Destructor Documentation

◆ ~Mouse()

virtual OIS::Mouse::~Mouse ( )
inlinevirtual

◆ Mouse()

OIS::Mouse::Mouse ( const std::string &  vendor,
bool  buffered,
int  devID,
InputManager creator 
)
inlineprotected

Member Function Documentation

◆ getEventCallback()

MouseListener* OIS::Mouse::getEventCallback ( ) const
inline
Remarks
Returns currently set callback.. or 0

◆ getMouseState()

const MouseState& OIS::Mouse::getMouseState ( ) const
inline
Remarks
Returns the state of the mouse - is valid for both buffered and non buffered mode

◆ setEventCallback()

virtual void OIS::Mouse::setEventCallback ( MouseListener mouseListener)
inlinevirtual
Remarks
Register/unregister a Mouse Listener - Only one allowed for simplicity. If broadcasting is neccessary, just broadcast from the callback you registered.
Parameters
mouseListenerSend a pointer to a class derived from MouseListener or 0 to clear the callback

Member Data Documentation

◆ mListener

MouseListener* OIS::Mouse::mListener
protected

Used for buffered/actionmapping callback.

◆ mState

MouseState OIS::Mouse::mState
protected

The state of the mouse.


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