summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorZolnai Tamás <tamas.zolnai@collabora.com>2014-03-21 14:00:56 +0100
committerZolnai Tamás <tamas.zolnai@collabora.com>2014-03-21 14:00:56 +0100
commitd834be0dac2b455076e0c0824f8e6a6e709625ac (patch)
tree2778faecf98a70213a41818af66d397324bc539f /include
parent47cf5156e951a724604db1be99750bc9a722592b (diff)
Init an opengl context bounded to an existent window.
Via ViewObjectContact can we query a window. It seems this window is the same which is used by chart edit mode. Change-Id: Ib6df4d58730774f3d86b453b8174a78bb2c8a45b
Diffstat (limited to 'include')
-rw-r--r--include/svx/sdr/contact/viewcontactofopenglobj.hxx2
-rw-r--r--include/svx/sdr/contact/viewobjectcontactofopenglobj.hxx39
-rw-r--r--include/vcl/OpenGLContext.hxx2
3 files changed, 42 insertions, 1 deletions
diff --git a/include/svx/sdr/contact/viewcontactofopenglobj.hxx b/include/svx/sdr/contact/viewcontactofopenglobj.hxx
index 0ac95ce70766..6b48e665f884 100644
--- a/include/svx/sdr/contact/viewcontactofopenglobj.hxx
+++ b/include/svx/sdr/contact/viewcontactofopenglobj.hxx
@@ -24,6 +24,8 @@ public:
virtual ~ViewContactOfOpenGLObj();
protected:
+ virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact);
+
virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const;
};
diff --git a/include/svx/sdr/contact/viewobjectcontactofopenglobj.hxx b/include/svx/sdr/contact/viewobjectcontactofopenglobj.hxx
new file mode 100644
index 000000000000..00e1dffde835
--- /dev/null
+++ b/include/svx/sdr/contact/viewobjectcontactofopenglobj.hxx
@@ -0,0 +1,39 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_SVX_SDR_CONTACT_VIEWOBJECTCONTACTOFOPENGL_HXX
+#define INCLUDED_SVX_SDR_CONTACT_VIEWOBJECTCONTACTOFOPENGL_HXX
+
+#include <svx/sdr/contact/viewobjectcontactofsdrobj.hxx>
+#include <vcl/OpenGLContext.hxx>
+
+class Window;
+
+namespace sdr {
+namespace contact {
+
+class ViewObjectContactOfOpenGLObj : public ViewObjectContactOfSdrObj
+{
+public:
+ ViewObjectContactOfOpenGLObj(ObjectContact& rObjectContact, ViewContact& rViewContact);
+ virtual ~ViewObjectContactOfOpenGLObj();
+
+protected:
+ Window* getWindow() const;
+
+private:
+ OpenGLContext m_aOpenGLContext;
+};
+
+} // namespace sdr
+} // namespace contact
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/vcl/OpenGLContext.hxx b/include/vcl/OpenGLContext.hxx
index 390c3df45c27..82145b44b260 100644
--- a/include/vcl/OpenGLContext.hxx
+++ b/include/vcl/OpenGLContext.hxx
@@ -99,7 +99,7 @@ public:
OpenGLContext();
~OpenGLContext();
- bool init();
+ bool init(Window* pParent = 0);
void setWinSize(const Size& rSize);
GLWindow& getOpenGLWindow();