P-E-R-R-Y
Utilitaires, contrats et vendors du moteur, en une seule doc
Loading...
Searching...
No Matches
graphic::IMouse Interface Referenceabstract

Mouse interface. More...

#include <IMouse.hpp>

Inheritance diagram for graphic::IMouse:

Public Types

enum  Buttons {
  BUTTON_LEFT , BUTTON_RIGHT , BUTTON_MIDDLE , EXTRA_BUTTON_1 ,
  EXTRA_BUTTON_2
}

Public Member Functions

virtual ~IMouse ()=default
 Destroy the IMouse interface.
virtual bool isButtonPressed (Buttons key) const =0
 notice if a button is pressed
virtual bool isButtonDown (Buttons key) const =0
 notice if a button is down
virtual bool isButtonReleased (Buttons key) const =0
 notice if a button is released
virtual bool isButtonUp (Buttons key) const =0
 notice if a button is up
virtual Vector2f getPosition () const =0
 get the position of the mouse
virtual void setPosition (Vector2f position)=0
 set the position of the mouse
virtual float GetMouseWheelMove () const =0
 get the mouse wheel move

Detailed Description

Mouse interface.

Same rules as IKeyboard : isButtonPressed / isButtonReleased are true for one frame, isButtonDown / isButtonUp for as long as it lasts, and all four are read anywhere in the frame, as is getPosition().

getPosition() rend des coordonnees RELATIVES A LA FENETRE, en pixels, origine en haut a gauche - jamais des coordonnees ecran, sinon aucun hit-test ecrit contre ce contrat ne serait portable.

Member Enumeration Documentation

◆ Buttons

Enumerator
BUTTON_LEFT 
BUTTON_RIGHT 
BUTTON_MIDDLE 
EXTRA_BUTTON_1 
EXTRA_BUTTON_2 

Constructor & Destructor Documentation

◆ ~IMouse()

virtual graphic::IMouse::~IMouse ( )
virtualdefault

Destroy the IMouse interface.

Member Function Documentation

◆ GetMouseWheelMove()

virtual float graphic::IMouse::GetMouseWheelMove ( ) const
pure virtual

get the mouse wheel move

Returns
float

Implemented in RayMouse, SdlMouse, SdlMouse, and SfmlMouse.

◆ getPosition()

virtual Vector2f graphic::IMouse::getPosition ( ) const
pure virtual

get the position of the mouse

Returns
Vector2f

Implemented in RayMouse, SdlMouse, SdlMouse, and SfmlMouse.

◆ isButtonDown()

virtual bool graphic::IMouse::isButtonDown ( Buttons key) const
pure virtual

notice if a button is down

Parameters
key
Returns
true
false

Implemented in RayMouse, SdlMouse, SdlMouse, and SfmlMouse.

◆ isButtonPressed()

virtual bool graphic::IMouse::isButtonPressed ( Buttons key) const
pure virtual

notice if a button is pressed

Parameters
key
Returns
true
false

Implemented in RayMouse, SdlMouse, SdlMouse, and SfmlMouse.

◆ isButtonReleased()

virtual bool graphic::IMouse::isButtonReleased ( Buttons key) const
pure virtual

notice if a button is released

Parameters
key
Returns
true
false

Implemented in RayMouse, SdlMouse, SdlMouse, and SfmlMouse.

◆ isButtonUp()

virtual bool graphic::IMouse::isButtonUp ( Buttons key) const
pure virtual

notice if a button is up

Parameters
key
Returns
true
false

Implemented in RayMouse, SdlMouse, SdlMouse, and SfmlMouse.

◆ setPosition()

virtual void graphic::IMouse::setPosition ( Vector2f position)
pure virtual

set the position of the mouse

Parameters
position

Implemented in RayMouse, SdlMouse, SdlMouse, and SfmlMouse.


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