#define _Aspect_WindowInputListener_HeaderFile
#include <Aspect_VKeySet.hxx>
+#include <Aspect_TouchMap.hxx>
#include <Graphic3d_Vec.hxx>
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
//! Return last mouse position.
const Graphic3d_Vec2i& LastMousePosition() const { return myMousePositionLast; }
+public: //! @name multi-touch input
+
+ //! Return TRUE if touches map is not empty.
+ bool HasTouchPoints() const { return !myTouchPoints.IsEmpty(); }
+
+ //! Return map of active touches.
+ const Aspect_TouchMap& TouchPoints() const { return myTouchPoints; }
+
+ //! Add touch point with the given ID.
+ //! This method is expected to be called from UI thread.
+ //! @param theId touch unique identifier
+ //! @param thePnt touch coordinates
+ //! @param theClearBefore if TRUE previously registered touches will be removed
+ Standard_EXPORT virtual void AddTouchPoint (Standard_Size theId,
+ const Graphic3d_Vec2d& thePnt,
+ Standard_Boolean theClearBefore = false);
+
+ //! Remove touch point with the given ID.
+ //! This method is expected to be called from UI thread.
+ //! @param theId touch unique identifier
+ //! @param theClearSelectPnts if TRUE will initiate clearing of selection points
+ //! @return TRUE if point has been removed
+ Standard_EXPORT virtual bool RemoveTouchPoint (Standard_Size theId,
+ Standard_Boolean theClearSelectPnts = false);
+
+ //! Update touch point with the given ID.
+ //! If point with specified ID was not registered before, it will be added.
+ //! This method is expected to be called from UI thread.
+ //! @param theId touch unique identifier
+ //! @param thePnt touch coordinates
+ Standard_EXPORT virtual void UpdateTouchPoint (Standard_Size theId,
+ const Graphic3d_Vec2d& thePnt);
+
public: //! @name 3d mouse input
//! Return acceleration ratio for translation event; 2.0 by default.
Aspect_VKeyMouse myMousePressed; //!< active mouse buttons
Aspect_VKeyFlags myMouseModifiers; //!< active key modifiers passed with last mouse event
+protected:
+
+ Aspect_TouchMap myTouchPoints; //!< map of active touches
+
protected: //! @name 3d mouse input variables
bool my3dMouseButtonState[32];//!< cached button state