lok: calc - send other views our selection in their co-ordinates.
[LibreOffice.git] / include / sfx2 / StylePreviewRenderer.hxx
blob0a1c67063776758ec9735fe57017977e0b74ea68
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_SFX2_STYLEPREVIEWRENDERER_HXX
11 #define INCLUDED_SFX2_STYLEPREVIEWRENDERER_HXX
13 #include <sfx2/dllapi.h>
14 #include <sfx2/objsh.hxx>
16 class OutputDevice;
17 class SfxStyleSheetBase;
19 namespace sfx2
22 class SFX2_DLLPUBLIC StylePreviewRenderer
24 protected:
25 const SfxObjectShell& mrShell;
26 OutputDevice& mrOutputDev;
27 SfxStyleSheetBase* mpStyle;
28 long const mnMaxHeight;
30 public:
31 enum class RenderAlign
33 TOP, CENTER
36 StylePreviewRenderer(const SfxObjectShell& rShell,
37 OutputDevice& rOutputDev,
38 SfxStyleSheetBase* pStyle,
39 long nMaxHeight)
40 : mrShell(rShell)
41 , mrOutputDev(rOutputDev)
42 , mpStyle(pStyle)
43 , mnMaxHeight(nMaxHeight)
46 virtual ~StylePreviewRenderer()
49 virtual bool recalculate() = 0;
50 virtual Size getRenderSize() = 0;
51 virtual bool render(const tools::Rectangle& aRectangle, RenderAlign eRenderAlign = RenderAlign::CENTER) = 0;
54 } // end namespace sfx2
56 #endif // INCLUDED_SVX_STYLEPREVIEWRENDERER_HXX
58 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */