demotool/imousectrl.hh
Emmanuel BENOîT afe7c43351 Overrides - Functionality implemented
... with a few leftover bugs and a few missing features. Still, it works
nicely.
2017-11-20 14:33:57 +01:00

46 lines
909 B
C++

#pragma once
#ifndef REAL_BUILD
# include "externals.hh"
#endif
/*= MOUSE CONTROLS INTERFACE ===================================================*/
enum class E_MouseButton {
LEFT ,
MIDDLE ,
RIGHT ,
};
using T_MouseButtons = T_Flags< E_MouseButton >;
/*------------------------------------------------------------------------------*/
enum class E_KeyboardModifier
{
CTRL ,
SHIFT ,
ALT ,
};
using T_KeyboardModifiers = T_Flags< E_KeyboardModifier >;
/*------------------------------------------------------------------------------*/
class A_MouseCtrl
{
public:
virtual ~A_MouseCtrl( ) = 0;
virtual void handleDragAndDrop(
ImVec2 const& move ,
T_KeyboardModifiers modifiers ,
T_MouseButtons buttons
) noexcept = 0;
virtual void handleWheel(
float wheel ,
T_KeyboardModifiers modifiers ,
T_MouseButtons buttons
) noexcept = 0;
};
inline A_MouseCtrl::~A_MouseCtrl() {}