Bump version to 6.4-15
[LibreOffice.git] / include / svx / swframeexample.hxx
blobfc64982cee3ca218caaed543fa7ae7d92320f0df
1 /*
2 * This file is part of the LibreOffice project.
4 * This Source Code Form is subject to the terms of the Mozilla Public
5 * License, v. 2.0. If a copy of the MPL was not distributed with this
6 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 * This file incorporates work covered by the following license notice:
10 * Licensed to the Apache Software Foundation (ASF) under one or more
11 * contributor license agreements. See the NOTICE file distributed
12 * with this work for additional information regarding copyright
13 * ownership. The ASF licenses this file to you under the Apache
14 * License, Version 2.0 (the "License"); you may not use this file
15 * except in compliance with the License. You may obtain a copy of
16 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef INCLUDED_SVX_SWFRAMEEXAMPLE_HXX
20 #define INCLUDED_SVX_SWFRAMEEXAMPLE_HXX
22 #include <tools/color.hxx>
23 #include <tools/gen.hxx>
24 #include <svx/svxdllapi.h>
25 #include <svx/swframetypes.hxx>
26 #include <vcl/customweld.hxx>
27 #include <com/sun/star/text/WrapTextMode.hpp>
29 class SVX_DLLPUBLIC SwFrameExample final : public weld::CustomWidgetController
31 Color m_aTransColor; ///< transparency
32 Color m_aBgCol; ///< background
33 Color m_aFrameColor; ///< graphic frame
34 Color m_aAlignColor; ///< align anchor
35 Color m_aBorderCol; ///< frame of doc
36 Color m_aPrintAreaCol; ///< frame of printable area of doc
37 Color m_aTxtCol; ///< symbolised text
38 Color m_aBlankCol; ///< area of symbol for blank
39 Color m_aBlankFrameCol; ///< frame of symbol for blank
41 tools::Rectangle aPage;
42 tools::Rectangle aPagePrtArea;
43 tools::Rectangle aTextLine;
44 tools::Rectangle aPara;
45 tools::Rectangle aParaPrtArea;
46 tools::Rectangle aFrameAtFrame;
47 tools::Rectangle aDrawObj;
48 tools::Rectangle aAutoCharFrame;
49 Size aFrmSize;
51 short nHAlign;
52 short nHRel;
54 short nVAlign;
55 short nVRel;
57 css::text::WrapTextMode nWrap;
58 RndStdIds nAnchor;
59 bool bTrans;
61 Point aRelPos;
63 void InitColors_Impl();
64 void InitAllRects_Impl(vcl::RenderContext& rRenderContext);
65 void CalcBoundRect_Impl(const vcl::RenderContext& rRenderContext, tools::Rectangle &rRect);
66 tools::Rectangle DrawInnerFrame_Impl(vcl::RenderContext& rRenderContext, const tools::Rectangle &rRect, const Color &rFillColor, const Color &rBorderColor);
68 virtual void StyleUpdated() override;
69 virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) override;
70 public:
72 SwFrameExample();
74 virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override;
76 void SetWrap(css::text::WrapTextMode nW) { nWrap = nW; }
78 void SetHAlign(short nH) { nHAlign = nH; }
79 void SetHoriRel(short nR) { nHRel = nR; }
81 void SetVAlign(short nV) { nVAlign = nV; }
82 void SetVertRel(short nR) { nVRel = nR; }
84 void SetTransparent(bool bT) { bTrans = bT; }
85 void SetAnchor(RndStdIds nA) { nAnchor = nA; }
87 void SetRelPos(const Point& rP);
92 #endif // INCLUDED_SVX_SWFRAMEEXAMPLE_HXX
94 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */