LibreOffice Module sfx2 (master) 1
StylePreviewRenderer.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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 */
9
10#ifndef INCLUDED_SFX2_STYLEPREVIEWRENDERER_HXX
11#define INCLUDED_SFX2_STYLEPREVIEWRENDERER_HXX
12
13#include <sfx2/dllapi.h>
14#include <sfx2/objsh.hxx>
15
16class OutputDevice;
18
19namespace sfx2
20{
21
23{
24protected:
29
30public:
31 enum class RenderAlign
32 {
33 TOP, CENTER
34 };
35
37 OutputDevice& rOutputDev,
38 SfxStyleSheetBase* pStyle,
39 tools::Long nMaxHeight)
40 : mrShell(rShell)
41 , mrOutputDev(rOutputDev)
42 , mpStyle(pStyle)
43 , mnMaxHeight(nMaxHeight)
44 {}
45
47 {}
48
49 virtual bool recalculate() = 0;
50 virtual bool render(const tools::Rectangle& aRectangle, RenderAlign eRenderAlign = RenderAlign::CENTER) = 0;
51};
52
53} // end namespace sfx2
54
55#endif // INCLUDED_SVX_STYLEPREVIEWRENDERER_HXX
56
57/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual bool render(const tools::Rectangle &aRectangle, RenderAlign eRenderAlign=RenderAlign::CENTER)=0
const SfxObjectShell & mrShell
StylePreviewRenderer(const SfxObjectShell &rShell, OutputDevice &rOutputDev, SfxStyleSheetBase *pStyle, tools::Long nMaxHeight)
virtual bool recalculate()=0
#define SFX2_DLLPUBLIC
Definition: dllapi.h:29
const sal_uInt32 TOP
long Long