MeshLib Documentation
Loading...
Searching...
No Matches
MR::MouseController Class Reference

#include <MRMouseController.h>

Classes

struct  MouseControlKey
 

Public Member Functions

 MR_ADD_CTOR_DELETE_MOVE (MouseController)
 
MRVIEWER_API void connect ()
 
MRVIEWER_API void setMouseControl (const MouseControlKey &key, MouseMode mode)
 
const Vector2i & getDownMousePos () const
 
const Vector2i & getMousePos () const
 
MRVIEWER_API bool isPressed (MouseButton button) const
 
bool isCursorInside () const
 
bool isDropOldEventOnNewActive () const
 
void dropOldEventsOnNew (bool on)
 
MRVIEWER_API std::optional< MouseControlKeyfindControlByMode (MouseMode mode) const
 
MRVIEWER_API void setMouseScroll (bool active)
 
void setTrasformModifierCb (std::function< void(AffineXf3f &)> cb)
 
void setFOVModifierCb (std::function< void(float &)> cb)
 
int getMouseConflicts ()
 

Static Public Member Functions

static MRVIEWER_API std::string getControlString (const MouseControlKey &key)
 
static MRVIEWER_API int mouseAndModToKey (const MouseControlKey &key)
 
static MRVIEWER_API MouseControlKey keyToMouseAndMod (int key)
 

Member Function Documentation

◆ connect()

MRVIEWER_API void MR::MouseController::connect ( )

◆ dropOldEventsOnNew()

void MR::MouseController::dropOldEventsOnNew ( bool on)
inline

◆ findControlByMode()

MRVIEWER_API std::optional< MouseControlKey > MR::MouseController::findControlByMode ( MouseMode mode) const

◆ getControlString()

static MRVIEWER_API std::string MR::MouseController::getControlString ( const MouseControlKey & key)
static

◆ getDownMousePos()

const Vector2i & MR::MouseController::getDownMousePos ( ) const
inline

◆ getMouseConflicts()

int MR::MouseController::getMouseConflicts ( )

◆ getMousePos()

const Vector2i & MR::MouseController::getMousePos ( ) const
inline

◆ isCursorInside()

bool MR::MouseController::isCursorInside ( ) const
inline

◆ isDropOldEventOnNewActive()

bool MR::MouseController::isDropOldEventOnNewActive ( ) const
inline

◆ isPressed()

MRVIEWER_API bool MR::MouseController::isPressed ( MouseButton button) const

◆ keyToMouseAndMod()

static MRVIEWER_API MouseControlKey MR::MouseController::keyToMouseAndMod ( int key)
static

◆ mouseAndModToKey()

static MRVIEWER_API int MR::MouseController::mouseAndModToKey ( const MouseControlKey & key)
static

◆ MR_ADD_CTOR_DELETE_MOVE()

MR::MouseController::MR_ADD_CTOR_DELETE_MOVE ( MouseController )

◆ setFOVModifierCb()

void MR::MouseController::setFOVModifierCb ( std::function< void(float &)> cb)
inline

◆ setMouseControl()

MRVIEWER_API void MR::MouseController::setMouseControl ( const MouseControlKey & key,
MouseMode mode )

◆ setMouseScroll()

MRVIEWER_API void MR::MouseController::setMouseScroll ( bool active)

◆ setTrasformModifierCb()

void MR::MouseController::setTrasformModifierCb ( std::function< void(AffineXf3f &)> cb)
inline

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