1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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/.
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>
19 class OpenGLWindowImpl
;
21 class VCLOPENGL_DLLPUBLIC IRenderer
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
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
;
43 boost::scoped_ptr
<OpenGLWindowImpl
> mpImpl
;
44 IRenderer
* mpRenderer
;
49 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */