mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0032433: Visualization, TKService - introduce Wasm_Window implementing Aspect_Window interface using Emscripten SDK
Introduced Wasm_Window implementing Aspect_Window interface. Aspect_WindowInputListener has been extended by touch input callbacks (moved from AIS_ViewController), which now implements redirection of single taps to UpdateMouseClick(). AIS_ViewController::FetchNavigationKeys() now requests more frames even if Delta is zero, but navigation keys are pressed - indicated by a new flag AIS_WalkDelta::IsDefined(). Fixed missing implementation of Xw_Window::DisplayConnection() getter. The property has been moved to the base class Aspect_Window. Removed unused Aspect_Convert.hxx. DRAWEXE targeting Wasm: - added exposing of FS interface so that it is possible uploading/downloading files to/from emulated file system on JavaScript level; - added printer redirecting messages to Module.printMessage callback accepting message gravity; - Run_Appli() now skips std::cin when Module.noExitRuntime is set.
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
#include <TCollection_AsciiString.hxx>
|
||||
|
||||
class AIS_InteractiveContext;
|
||||
class Aspect_Window;
|
||||
class V3d_View;
|
||||
|
||||
DEFINE_STANDARD_HANDLE(ViewerTest_EventManager, Standard_Transient)
|
||||
@@ -58,6 +59,9 @@ public:
|
||||
//! Destructor.
|
||||
Standard_EXPORT virtual ~ViewerTest_EventManager();
|
||||
|
||||
//! Setup or adjust window callbacks.
|
||||
Standard_EXPORT static void SetupWindowCallbacks (const Handle(Aspect_Window)& theWin);
|
||||
|
||||
//! Return interactive context.
|
||||
const Handle(AIS_InteractiveContext)& Context() const { return myCtx; }
|
||||
|
||||
@@ -75,6 +79,12 @@ public:
|
||||
myPickPntArgVec[2] = theArgZ;
|
||||
}
|
||||
|
||||
//! Handle mouse button click event.
|
||||
Standard_EXPORT virtual bool UpdateMouseClick (const Graphic3d_Vec2i& thePoint,
|
||||
Aspect_VKeyMouse theButton,
|
||||
Aspect_VKeyFlags theModifiers,
|
||||
bool theIsDoubleClick) Standard_OVERRIDE;
|
||||
|
||||
//! Handle mouse button press/release event.
|
||||
Standard_EXPORT virtual bool UpdateMouseButtons (const Graphic3d_Vec2i& thePoint,
|
||||
Aspect_VKeyMouse theButtons,
|
||||
@@ -138,6 +148,8 @@ private:
|
||||
Standard_Boolean myToPickPnt;
|
||||
Standard_Boolean myIsTmpContRedraw;
|
||||
|
||||
unsigned int myUpdateRequests; //!< counter for unhandled update requests
|
||||
|
||||
};
|
||||
|
||||
#endif // _ViewerTest_EventManager_HeaderFile
|
||||
|
Reference in New Issue
Block a user