LibreOffice Module sw (master)  1
AnchorOverlayObject.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  * This file incorporates work covered by the following license notice:
10  *
11  * Licensed to the Apache Software Foundation (ASF) under one or more
12  * contributor license agreements. See the NOTICE file distributed
13  * with this work for additional information regarding copyright
14  * ownership. The ASF licenses this file to you under the Apache
15  * License, Version 2.0 (the "License"); you may not use this file
16  * except in compliance with the License. You may obtain a copy of
17  * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18  */
19 
20 #ifndef INCLUDED_SW_SOURCE_UIBASE_DOCVW_ANCHOROVERLAYOBJECT_HXX
21 #define INCLUDED_SW_SOURCE_UIBASE_DOCVW_ANCHOROVERLAYOBJECT_HXX
22 
24 
26 
27 class SwView;
28 class SwRect;
29 class Point;
30 
31 namespace sw { namespace sidebarwindows {
32 
33 enum class AnchorState
34 {
35  All,
36  End,
37  Tri
38 };
39 
41 {
42  public:
43  static std::unique_ptr<AnchorOverlayObject> CreateAnchorOverlayObject( SwView const & rDocView,
44  const SwRect& aAnchorRect,
45  long aPageBorder,
46  const Point& aLineStart,
47  const Point& aLineEnd,
48  const Color& aColorAnchor );
49 
56 
57  void SetAllPosition( const basegfx::B2DPoint& rPoint1,
58  const basegfx::B2DPoint& rPoint2,
59  const basegfx::B2DPoint& rPoint3,
60  const basegfx::B2DPoint& rPoint4,
61  const basegfx::B2DPoint& rPoint5,
62  const basegfx::B2DPoint& rPoint6,
63  const basegfx::B2DPoint& rPoint7 );
64  void SetTriPosition( const basegfx::B2DPoint& rPoint1,
65  const basegfx::B2DPoint& rPoint2,
66  const basegfx::B2DPoint& rPoint3,
67  const basegfx::B2DPoint& rPoint4,
68  const basegfx::B2DPoint& rPoint5 );
69  void SetSixthPosition( const basegfx::B2DPoint& rNew );
70  void SetSeventhPosition( const basegfx::B2DPoint& rNew );
71 
72  void setLineSolid( const bool bNew );
73  bool getLineSolid() const { return mbLineSolid; }
74 
75  void SetAnchorState( const AnchorState aState );
77 
78  private:
79  /* 6------------7
80  1 /
81  /4\ ---------------5
82  2 - 3
83  */
84 
91 
92  // helpers to fill and reset geometry
93  void implEnsureGeometry();
94  void implResetGeometry();
95 
96  // geometry creation for OverlayObject
98 
99  // object's geometry
104 
105  bool mbLineSolid : 1;
106 
107  AnchorOverlayObject( const basegfx::B2DPoint& rBasePos,
108  const basegfx::B2DPoint& rSecondPos,
109  const basegfx::B2DPoint& rThirdPos,
110  const basegfx::B2DPoint& rFourthPos,
111  const basegfx::B2DPoint& rFifthPos,
112  const basegfx::B2DPoint& rSixthPos,
113  const basegfx::B2DPoint& rSeventhPos,
114  const Color& rBaseColor );
115  public:
116  virtual ~AnchorOverlayObject() override;
117 };
118 
119 } } // end of namespace sw::annotation
120 
121 #endif
122 
123 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Dialog to specify the properties of date form field.
Definition: accfrmobj.cxx:38
Of course Writer needs its own rectangles.
Definition: swrect.hxx:34
void SetAllPosition(const basegfx::B2DPoint &rPoint1, const basegfx::B2DPoint &rPoint2, const basegfx::B2DPoint &rPoint3, const basegfx::B2DPoint &rPoint4, const basegfx::B2DPoint &rPoint5, const basegfx::B2DPoint &rPoint6, const basegfx::B2DPoint &rPoint7)
static std::unique_ptr< AnchorOverlayObject > CreateAnchorOverlayObject(SwView const &rDocView, const SwRect &aAnchorRect, long aPageBorder, const Point &aLineStart, const Point &aLineEnd, const Color &aColorAnchor)
const basegfx::B2DPoint & GetFifthPosition() const
AnchorOverlayObject(const basegfx::B2DPoint &rBasePos, const basegfx::B2DPoint &rSecondPos, const basegfx::B2DPoint &rThirdPos, const basegfx::B2DPoint &rFourthPos, const basegfx::B2DPoint &rFifthPos, const basegfx::B2DPoint &rSixthPos, const basegfx::B2DPoint &rSeventhPos, const Color &rBaseColor)
const basegfx::B2DPoint & GetFourthPosition() const
void SetSixthPosition(const basegfx::B2DPoint &rNew)
void SetTriPosition(const basegfx::B2DPoint &rPoint1, const basegfx::B2DPoint &rPoint2, const basegfx::B2DPoint &rPoint3, const basegfx::B2DPoint &rPoint4, const basegfx::B2DPoint &rPoint5)
const basegfx::B2DPoint & GetSecondPosition() const
void SetSeventhPosition(const basegfx::B2DPoint &rNew)
const basegfx::B2DPoint & GetThirdPosition() const
virtual drawinglayer::primitive2d::Primitive2DContainer createOverlayObjectPrimitive2DSequence() override
void SetAnchorState(const AnchorState aState)
const basegfx::B2DPoint & GetSixthPosition() const
const basegfx::B2DPoint & GetSeventhPosition() const
Definition: view.hxx:146