xref: /aoo41x/main/sw/source/ui/docvw/OverlayRanges.hxx (revision dec99bbd)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef _SW_OVERLAY_OVERLAYRANGES_HXX
25 #define _SW_OVERLAY_OVERLAYRANGES_HXX
26 
27 #include <svx/sdr/overlay/overlayobject.hxx>
28 #include <basegfx/range/b2drange.hxx>
29 
30 #include <vector>
31 
32 class SwView;
33 
34 //////////////////////////////////////////////////////////////////////////////
35 
36 namespace sw
37 {
38     namespace overlay
39     {
40         class OverlayRanges : public sdr::overlay::OverlayObject
41         {
42         protected:
43             // geometry of overlay
44             std::vector< basegfx::B2DRange > maRanges;
45 
46             bool mbShowSolidBorder;
47 
48             // geometry creation for OverlayObject
49             virtual drawinglayer::primitive2d::Primitive2DSequence createOverlayObjectPrimitive2DSequence();
50 
51         public:
52             static OverlayRanges* CreateOverlayRange(
53                 SwView& rDocView,
54                 const Color& rColor,
55                 const std::vector< basegfx::B2DRange >& rRanges,
56                 const bool bShowSolidBorder );
57 
58             virtual ~OverlayRanges();
59 
60             // data read access
getRanges() const61             inline const std::vector< basegfx::B2DRange >& getRanges() const
62             {
63                 return maRanges;
64             }
65 
66             // data write access
67             void setRanges(const std::vector< basegfx::B2DRange >& rNew);
68 
69             void ShowSolidBorder();
70             void HideSolidBorder();
71 
72         private:
73             OverlayRanges(
74                 const Color& rColor,
75                 const std::vector< basegfx::B2DRange >& rRanges,
76                 const bool bShowSolidBorder );
77 
78         };
79     } // end of namespace overlay
80 } // end of namespace sw
81 
82 //////////////////////////////////////////////////////////////////////////////
83 
84 #endif //_SW_OVERLAY_OVERLAYRANGES_HXX
85 
86 // eof
87