Mercurial > hg > orthanc-stone
diff Applications/Generic/GuiAdapter.h @ 1020:ac88989817e3 toa2019093001
TrackerCommand --> MeasureCommand + fuse against exception in MeasureTool dtor
+ added DeleteMeasureCommand + moved the various concrete measuring tool-related
classes to their pre-assigned file locations (everything was crammed into
MeasureCommands.* files up to this commit) + added double-click handler to
GuiAdapter (for TOA implementation of "delete measuring tool on double-click")
author | Benjamin Golinvaux <bgo@osimis.io> |
---|---|
date | Mon, 30 Sep 2019 10:41:06 +0200 |
parents | 86ac61a040c9 |
children | 4383382db01d 2d8ab34c8c91 |
line wrap: on
line diff
--- a/Applications/Generic/GuiAdapter.h Fri Sep 27 13:32:05 2019 +0200 +++ b/Applications/Generic/GuiAdapter.h Mon Sep 30 10:41:06 2019 +0200 @@ -77,12 +77,13 @@ enum GuiAdapterHidEventType { - GUIADAPTER_EVENT_MOUSEDOWN = 1973, - GUIADAPTER_EVENT_MOUSEMOVE = 1974, - GUIADAPTER_EVENT_MOUSEUP = 1975, - GUIADAPTER_EVENT_WHEEL = 1976, - GUIADAPTER_EVENT_KEYDOWN = 1977, - GUIADAPTER_EVENT_KEYUP = 1978, + GUIADAPTER_EVENT_MOUSEDOWN = 1973, + GUIADAPTER_EVENT_MOUSEMOVE = 1974, + GUIADAPTER_EVENT_MOUSEDBLCLICK = 1975, + GUIADAPTER_EVENT_MOUSEUP = 1976, + GUIADAPTER_EVENT_WHEEL = 1977, + GUIADAPTER_EVENT_KEYDOWN = 1978, + GUIADAPTER_EVENT_KEYUP = 1979, }; const unsigned int GUIADAPTER_DELTA_PIXEL = 2973; @@ -253,12 +254,13 @@ */ - void SetMouseDownCallback(std::string canvasId, void* userData, bool capture, OnMouseEventFunc func); - void SetMouseMoveCallback(std::string canvasId, void* userData, bool capture, OnMouseEventFunc func); - void SetMouseUpCallback (std::string canvasId, void* userData, bool capture, OnMouseEventFunc func); - void SetWheelCallback (std::string canvasId, void* userData, bool capture, OnMouseWheelFunc func); - void SetKeyDownCallback (std::string canvasId, void* userData, bool capture, OnKeyDownFunc func); - void SetKeyUpCallback (std::string canvasId, void* userData, bool capture, OnKeyUpFunc func); + void SetMouseDownCallback (std::string canvasId, void* userData, bool capture, OnMouseEventFunc func); + void SetMouseDblClickCallback (std::string canvasId, void* userData, bool capture, OnMouseEventFunc func); + void SetMouseMoveCallback (std::string canvasId, void* userData, bool capture, OnMouseEventFunc func); + void SetMouseUpCallback (std::string canvasId, void* userData, bool capture, OnMouseEventFunc func); + void SetWheelCallback (std::string canvasId, void* userData, bool capture, OnMouseWheelFunc func); + void SetKeyDownCallback (std::string canvasId, void* userData, bool capture, OnKeyDownFunc func); + void SetKeyUpCallback (std::string canvasId, void* userData, bool capture, OnKeyUpFunc func); // if you pass "#window", under SDL, then any Window resize will trigger the callback void SetResizeCallback (std::string canvasId, void* userData, bool capture, OnWindowResizeFunc func); @@ -330,6 +332,7 @@ }; std::vector<EventHandlerData<OnWindowResizeFunc> > resizeHandlers_; std::vector<EventHandlerData<OnMouseEventFunc > > mouseDownHandlers_; + std::vector<EventHandlerData<OnMouseEventFunc > > mouseDblCickHandlers_; std::vector<EventHandlerData<OnMouseEventFunc > > mouseMoveHandlers_; std::vector<EventHandlerData<OnMouseEventFunc > > mouseUpHandlers_; std::vector<EventHandlerData<OnMouseWheelFunc > > mouseWheelHandlers_;