[Libreoffice-commits] core.git: chart2/source include/vcl vcl/source

Michael Meeks michael.meeks at collabora.com
Sat May 24 08:46:59 PDT 2014


 chart2/source/view/charttypes/GL3DBarChart.cxx |    5 +++++
 chart2/source/view/inc/GL3DBarChart.hxx        |    1 +
 include/vcl/openglwin.hxx                      |    5 +++++
 vcl/source/window/openglwin.cxx                |   12 ++++++++++++
 4 files changed, 23 insertions(+)

New commits:
commit f2e0eafabc27228f25cbbe6f23b225420b7da470
Author: Michael Meeks <michael.meeks at collabora.com>
Date:   Sat May 24 16:43:05 2014 +0100

    Stub mouse move events propagation to 3D charts.
    
    Change-Id: If87545df4b1caeece107a20e0c00df88fb8e6fd5

diff --git a/chart2/source/view/charttypes/GL3DBarChart.cxx b/chart2/source/view/charttypes/GL3DBarChart.cxx
index db1dc5b..c9419c2 100644
--- a/chart2/source/view/charttypes/GL3DBarChart.cxx
+++ b/chart2/source/view/charttypes/GL3DBarChart.cxx
@@ -289,6 +289,11 @@ void GL3DBarChart::clickedAt(const Point& rPos)
         mpCamera->zoom(nId);
 }
 
+void GL3DBarChart::mouseDragMove(const Point& rPos, sal_uInt16 nButtons)
+{
+//    fprintf(stderr, "drag move %ld %ld (0x%x)\n", rPos.X(), rPos.Y(), nButtons);
+}
+
 void GL3DBarChart::contextDestroyed()
 {
     mbValidContext = false;
diff --git a/chart2/source/view/inc/GL3DBarChart.hxx b/chart2/source/view/inc/GL3DBarChart.hxx
index 0ca4e23..c85cff8 100644
--- a/chart2/source/view/inc/GL3DBarChart.hxx
+++ b/chart2/source/view/inc/GL3DBarChart.hxx
@@ -50,6 +50,7 @@ public:
     virtual void update() SAL_OVERRIDE;
 
     virtual void clickedAt(const Point& rPos) SAL_OVERRIDE;
+    virtual void mouseDragMove(const Point& rPos, sal_uInt16 nButtons) SAL_OVERRIDE;
     virtual void contextDestroyed() SAL_OVERRIDE;
 
 private:
diff --git a/include/vcl/openglwin.hxx b/include/vcl/openglwin.hxx
index 8e34d05..f69d0b3 100644
--- a/include/vcl/openglwin.hxx
+++ b/include/vcl/openglwin.hxx
@@ -10,6 +10,7 @@
 #ifndef INCLUDED_VCL_OPENGLWIN_HXX
 #define INCLUDED_VCL_OPENGLWIN_HXX
 
+#include <vcl/event.hxx>
 #include <vcl/syschild.hxx>
 #include <vcl/vclopengl_dllapi.hxx>
 
@@ -24,6 +25,7 @@ public:
     virtual ~IRenderer() {}
     virtual void update() = 0;
     virtual void clickedAt(const Point& rPos) = 0;
+    virtual void mouseDragMove(const Point& rPos, sal_uInt16 nButtons) = 0;
 
     virtual void contextDestroyed() = 0;
 };
@@ -39,7 +41,10 @@ public:
     void setRenderer(IRenderer* pRenderer);
 
     virtual void Paint(const Rectangle&) SAL_OVERRIDE;
+
     virtual void MouseButtonDown( const MouseEvent& rMEvt ) SAL_OVERRIDE;
+    virtual void MouseButtonUp( const MouseEvent& rMEvt ) SAL_OVERRIDE;
+    virtual void MouseMove( const MouseEvent& rMEvt ) SAL_OVERRIDE;
 
 private:
     boost::scoped_ptr<OpenGLWindowImpl> mpImpl;
diff --git a/vcl/source/window/openglwin.cxx b/vcl/source/window/openglwin.cxx
index d6e5357..9fd3935 100644
--- a/vcl/source/window/openglwin.cxx
+++ b/vcl/source/window/openglwin.cxx
@@ -65,6 +65,18 @@ void OpenGLWindow::MouseButtonDown( const MouseEvent& rMEvt )
         mpRenderer->clickedAt(aPoint);
 }
 
+void OpenGLWindow::MouseButtonUp( const MouseEvent& /* rMEvt */ )
+{
+    // in case we need to track button state ourselves.
+}
+
+void OpenGLWindow::MouseMove( const MouseEvent& rMEvt )
+{
+    if(rMEvt.GetButtons())
+        mpRenderer->mouseDragMove(rMEvt.GetPosPixel(),
+                                  rMEvt.GetButtons());
+}
+
 void OpenGLWindow::setRenderer(IRenderer* pRenderer)
 {
     mpRenderer = pRenderer;


More information about the Libreoffice-commits mailing list