LibreOffice Module svx (master)  1
swframeexample.hxx
Go to the documentation of this file.
1 /*
2  * This file is part of the LibreOffice project.
3  *
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/.
7  *
8  * This file incorporates work covered by the following license notice:
9  *
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 .
17  */
18 
19 #ifndef INCLUDED_SVX_SWFRAMEEXAMPLE_HXX
20 #define INCLUDED_SVX_SWFRAMEEXAMPLE_HXX
21 
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>
28 
30 {
40 
50 
51  short nHAlign;
52  short nHRel;
53 
54  short nVAlign;
55  short nVRel;
56 
57  css::text::WrapTextMode nWrap;
59  bool bTrans;
60 
62 
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);
67 
68  virtual void StyleUpdated() override;
69  virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) override;
70 public:
71 
73 
74  virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override;
75 
76  void SetWrap(css::text::WrapTextMode nW) { nWrap = nW; }
77 
78  void SetHAlign(short nH) { nHAlign = nH; }
79  void SetHoriRel(short nR) { nHRel = nR; }
80 
81  void SetVAlign(short nV) { nVAlign = nV; }
82  void SetVertRel(short nR) { nVRel = nR; }
83 
84  void SetTransparent(bool bT) { bTrans = bT; }
85  void SetAnchor(RndStdIds nA) { nAnchor = nA; }
86 
87  void SetRelPos(const Point& rP);
88 };
89 
90 
91 
92 #endif // INCLUDED_SVX_SWFRAMEEXAMPLE_HXX
93 
94 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
css::text::WrapTextMode nWrap
Color m_aBlankFrameCol
frame of symbol for blank
tools::Rectangle aFrameAtFrame
Color m_aFrameColor
graphic frame
#define SVX_DLLPUBLIC
Definition: svxdllapi.h:28
Color m_aPrintAreaCol
frame of printable area of doc
void SetVertRel(short nR)
void SetVAlign(short nV)
Color m_aBgCol
background
Color m_aTxtCol
symbolised text
Color m_aTransColor
transparency
tools::Rectangle aAutoCharFrame
void SetHAlign(short nH)
void SetAnchor(RndStdIds nA)
Color m_aBorderCol
frame of doc
tools::Rectangle aTextLine
Color m_aBlankCol
area of symbol for blank
tools::Rectangle aParaPrtArea
tools::Rectangle aPage
void SetHoriRel(short nR)
virtual void SetDrawingArea(weld::DrawingArea *pDrawingArea)
Color m_aAlignColor
align anchor
void SetWrap(css::text::WrapTextMode nW)
tools::Rectangle aPara
RndStdIds
tools::Rectangle aPagePrtArea
void SetTransparent(bool bT)
virtual void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect)=0
tools::Rectangle aDrawObj