Mercurial > hg > orthanc-stone
diff Framework/Viewport/IMouseTracker.h @ 457:3b4df9925db6 am-touch-events
added support for 'touch' in mouse trackers. This is still a bit hacky and we need to refactor it to make it clean. Thanks to that, Pan and zoom are available together with 2 touches
author | Alain Mazy <alain@mazy.be> |
---|---|
date | Thu, 24 Jan 2019 16:42:27 +0100 |
parents | b70e9be013e4 |
children | b716763571ad |
line wrap: on
line diff
--- a/Framework/Viewport/IMouseTracker.h Wed Jan 23 13:58:51 2019 +0100 +++ b/Framework/Viewport/IMouseTracker.h Thu Jan 24 16:42:27 2019 +0100 @@ -22,9 +22,28 @@ #pragma once #include "CairoSurface.h" +#include <vector> namespace OrthancStone { + struct Touch + { + float x; + float y; + + Touch(float x, float y) + : x(x), + y(y) + { + } + Touch() + : x(0.0f), + y(0.0f) + { + } + }; + + // this is tracking a mouse in screen coordinates/pixels unlike // the IWorldSceneMouseTracker that is tracking a mouse // in scene coordinates/mm. @@ -41,6 +60,9 @@ // Returns "true" iff. the background scene must be repainted virtual void MouseMove(int x, - int y) = 0; + int y, + const std::vector<Touch>& displayTouches) = 0; + + virtual bool IsTouchTracker() const {return false;} }; }