changeset 1371:f15529add7b0 broker

operator << for GuiAdapterMouseEvent
author Benjamin Golinvaux <bgo@osimis.io>
date Mon, 20 Apr 2020 16:21:09 +0200
parents 28eb7106ef44
children dc5acb03ad93
files Applications/Generic/GuiAdapter.cpp Applications/Generic/GuiAdapter.h
diffstat 2 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/Applications/Generic/GuiAdapter.cpp	Mon Apr 20 13:08:43 2020 +0200
+++ b/Applications/Generic/GuiAdapter.cpp	Mon Apr 20 16:21:09 2020 +0200
@@ -47,6 +47,15 @@
     return os;
   }
 
+  std::ostream& operator<<(
+    std::ostream& os, const GuiAdapterMouseEvent& event)
+  {
+    os << "targetX: " << event.targetX << " targetY: " << event.targetY << " button: " << event.button
+      << "ctrlKey: " << event.ctrlKey << "shiftKey: " << event.shiftKey << "altKey: " << event.altKey;
+      
+    return os;
+  }
+
 #if ORTHANC_ENABLE_WASM == 1
   void GuiAdapter::Run(GuiAdapterRunFunc /*func*/, void* /*cookie*/)
   {
--- a/Applications/Generic/GuiAdapter.h	Mon Apr 20 13:08:43 2020 +0200
+++ b/Applications/Generic/GuiAdapter.h	Mon Apr 20 16:21:09 2020 +0200
@@ -202,6 +202,7 @@
   };
 
   std::ostream& operator<<(std::ostream& os, const GuiAdapterKeyboardEvent& event);
+  std::ostream& operator<<(std::ostream& os, const GuiAdapterMouseEvent& event);
 
   /*
     Mousedown event trigger when either the left or right (or middle) mouse is pressed