Version 4.3.0.0.beta1, tag libreoffice-4.3.0.0.beta1
[LibreOffice.git] / include / vcl / openglwin.hxx
blobe9b823e6a15ac5e5f0d77cd8a525f1d00ede61e7
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 */
10 #ifndef INCLUDED_VCL_OPENGLWIN_HXX
11 #define INCLUDED_VCL_OPENGLWIN_HXX
13 #include <vcl/syschild.hxx>
14 #include <vcl/vclopengl_dllapi.hxx>
16 #include <boost/scoped_ptr.hpp>
18 class OpenGLContext;
19 class OpenGLWindowImpl;
21 class VCLOPENGL_DLLPUBLIC IRenderer
23 public:
24 virtual ~IRenderer() {}
25 virtual void update() = 0;
26 virtual void clickedAt(const Point& rPos) = 0;
29 // pImpl Pattern to avoid linking against OpenGL libs when using the class without the context
30 class VCLOPENGL_DLLPUBLIC OpenGLWindow : public SystemChildWindow
32 public:
33 OpenGLWindow(Window* pParent);
34 virtual ~OpenGLWindow();
35 OpenGLContext* getContext();
37 void setRenderer(IRenderer* pRenderer);
39 virtual void Paint(const Rectangle&) SAL_OVERRIDE;
40 virtual void MouseButtonDown( const MouseEvent& rMEvt ) SAL_OVERRIDE;
42 private:
43 boost::scoped_ptr<OpenGLWindowImpl> mpImpl;
44 IRenderer* mpRenderer;
47 #endif
49 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */