summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--chart2/source/view/charttypes/GL3DBarChart.cxx5
-rw-r--r--chart2/source/view/inc/GL3DBarChart.hxx1
-rw-r--r--include/vcl/openglwin.hxx5
-rw-r--r--vcl/source/window/openglwin.cxx12
4 files changed, 23 insertions, 0 deletions
diff --git a/chart2/source/view/charttypes/GL3DBarChart.cxx b/chart2/source/view/charttypes/GL3DBarChart.cxx
index db1dc5b3be5c..c9419c2ea3b2 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 0ca4e232d81b..c85cff887d37 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 8e34d0579521..f69d0b327388 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 d6e5357236e7..9fd3935df210 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;