Mercurial > hg > orthanc-stone
view Samples/Qt/Scene2DInteractor.h @ 973:38409549db43 toa2019082903
Log with addresses + added fingerprint mechanism to avoid calling zombie objects
where:
- a message is sent with a receiver
- the receiver dies
- another receiver with the SAME address is created
- the message reply is executed --> execution on the wrong object!
(since their "identity" is their address. The fix is to identify them with
an UUID stored at creation time)
author | Benjamin Golinvaux <bgo@osimis.io> |
---|---|
date | Thu, 29 Aug 2019 18:07:55 +0200 |
parents | aad5ccf1be10 |
children |
line wrap: on
line source
#pragma once #include "../../Applications/Generic/Scene2DInteractor.h" #include "../../Framework/Scene2DViewport/IFlexiblePointerTracker.h" class BasicScene2DInteractor : public OrthancStone::Scene2DInteractor { boost::shared_ptr<OrthancStone::IFlexiblePointerTracker> currentTracker_; public: BasicScene2DInteractor(boost::shared_ptr<OrthancStone::ViewportController> viewportController) : Scene2DInteractor(viewportController) {} virtual bool OnMouseEvent(const OrthancStone::GuiAdapterMouseEvent& event, const OrthancStone::PointerEvent& pointerEvent) override; virtual bool OnKeyboardEvent(const OrthancStone::GuiAdapterKeyboardEvent& guiEvent); virtual bool OnWheelEvent(const OrthancStone::GuiAdapterWheelEvent& guiEvent); };