fdo#74697 Add Bluez 5 support for impress remote.
[LibreOffice.git] / include / svx / sdr / contact / viewcontactofsdrpage.hxx
blobb194108541acaf1a626c561d9c0f6a7cea5b0b0c
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef _SDR_CONTACT_VIEWCONTACTOFSDRPAGE_HXX
21 #define _SDR_CONTACT_VIEWCONTACTOFSDRPAGE_HXX
23 #include <sal/types.h>
24 #include <svx/sdr/contact/viewcontact.hxx>
26 //////////////////////////////////////////////////////////////////////////////
27 // predeclarations
28 class SdrPage;
30 namespace sdr { namespace contact {
31 class ViewContactOfSdrPage;
34 //////////////////////////////////////////////////////////////////////////////
36 namespace sdr
38 namespace contact
40 class ViewContactOfPageSubObject : public ViewContact
42 protected:
43 ViewContactOfSdrPage& mrParentViewContactOfSdrPage;
45 public:
46 explicit ViewContactOfPageSubObject(ViewContactOfSdrPage& rParentViewContactOfSdrPage);
47 virtual ~ViewContactOfPageSubObject();
49 virtual ViewContact* GetParentContact() const;
50 const SdrPage& getPage() const;
52 } // end of namespace contact
53 } // end of namespace sdr
55 //////////////////////////////////////////////////////////////////////////////
57 namespace sdr
59 namespace contact
61 class ViewContactOfPageBackground : public ViewContactOfPageSubObject
63 protected:
64 virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact);
65 virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const;
67 public:
68 explicit ViewContactOfPageBackground(ViewContactOfSdrPage& rParentViewContactOfSdrPage);
69 virtual ~ViewContactOfPageBackground();
71 } // end of namespace contact
72 } // end of namespace sdr
74 //////////////////////////////////////////////////////////////////////////////
76 namespace sdr
78 namespace contact
80 class ViewContactOfPageShadow : public ViewContactOfPageSubObject
82 protected:
83 virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact);
84 virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const;
86 public:
87 explicit ViewContactOfPageShadow(ViewContactOfSdrPage& rParentViewContactOfSdrPage);
88 virtual ~ViewContactOfPageShadow();
90 } // end of namespace contact
91 } // end of namespace sdr
93 //////////////////////////////////////////////////////////////////////////////
95 namespace sdr
97 namespace contact
99 class ViewContactOfPageFill : public ViewContactOfPageSubObject
101 protected:
102 virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact);
103 virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const;
105 public:
106 explicit ViewContactOfPageFill(ViewContactOfSdrPage& rParentViewContactOfSdrPage);
107 virtual ~ViewContactOfPageFill();
109 } // end of namespace contact
110 } // end of namespace sdr
112 //////////////////////////////////////////////////////////////////////////////
114 namespace sdr
116 namespace contact
118 class ViewContactOfMasterPage : public ViewContactOfPageSubObject
120 protected:
121 virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact);
122 virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const;
124 public:
125 explicit ViewContactOfMasterPage(ViewContactOfSdrPage& rParentViewContactOfSdrPage);
126 virtual ~ViewContactOfMasterPage();
128 } // end of namespace contact
129 } // end of namespace sdr
131 //////////////////////////////////////////////////////////////////////////////
133 namespace sdr
135 namespace contact
137 class ViewContactOfOuterPageBorder : public ViewContactOfPageSubObject
139 protected:
140 virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact);
141 virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const;
143 public:
144 explicit ViewContactOfOuterPageBorder(ViewContactOfSdrPage& rParentViewContactOfSdrPage);
145 virtual ~ViewContactOfOuterPageBorder();
147 } // end of namespace contact
148 } // end of namespace sdr
150 //////////////////////////////////////////////////////////////////////////////
152 namespace sdr
154 namespace contact
156 class ViewContactOfInnerPageBorder : public ViewContactOfPageSubObject
158 protected:
159 virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact);
160 virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const;
162 public:
163 explicit ViewContactOfInnerPageBorder(ViewContactOfSdrPage& rParentViewContactOfSdrPage);
164 virtual ~ViewContactOfInnerPageBorder();
166 } // end of namespace contact
167 } // end of namespace sdr
169 //////////////////////////////////////////////////////////////////////////////
171 namespace sdr
173 namespace contact
175 class ViewContactOfPageHierarchy : public ViewContactOfPageSubObject
177 protected:
178 virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact);
179 virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const;
181 public:
182 explicit ViewContactOfPageHierarchy(ViewContactOfSdrPage& rParentViewContactOfSdrPage);
183 virtual ~ViewContactOfPageHierarchy();
185 virtual sal_uInt32 GetObjectCount() const;
186 virtual ViewContact& GetViewContact(sal_uInt32 nIndex) const;
188 } // end of namespace contact
189 } // end of namespace sdr
191 //////////////////////////////////////////////////////////////////////////////
193 namespace sdr
195 namespace contact
197 class ViewContactOfGrid : public ViewContactOfPageSubObject
199 protected:
200 // bitfield
201 unsigned mbFront : 1;
203 virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact);
204 virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const;
206 public:
207 ViewContactOfGrid(ViewContactOfSdrPage& rParentViewContactOfSdrPage, bool bFront);
208 virtual ~ViewContactOfGrid();
210 bool getFront() const { return mbFront; }
212 } // end of namespace contact
213 } // end of namespace sdr
215 //////////////////////////////////////////////////////////////////////////////
217 namespace sdr
219 namespace contact
221 class ViewContactOfHelplines : public ViewContactOfPageSubObject
223 protected:
224 // bitfield
225 unsigned mbFront : 1;
227 virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact);
228 virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const;
230 public:
231 ViewContactOfHelplines(ViewContactOfSdrPage& rParentViewContactOfSdrPage, bool bFront);
232 virtual ~ViewContactOfHelplines();
234 bool getFront() const { return mbFront; }
236 } // end of namespace contact
237 } // end of namespace sdr
239 //////////////////////////////////////////////////////////////////////////////
241 namespace sdr
243 namespace contact
245 class ViewContactOfSdrPage : public ViewContact
247 protected:
248 // the owner of this ViewContact. Set from constructor and not
249 // to be changed in any way.
250 SdrPage& mrPage;
252 // helper viewContacts to build a clear paint hierarchy
253 ViewContactOfPageBackground maViewContactOfPageBackground;
254 ViewContactOfPageShadow maViewContactOfPageShadow;
255 ViewContactOfPageFill maViewContactOfPageFill;
256 ViewContactOfMasterPage maViewContactOfMasterPage;
257 ViewContactOfOuterPageBorder maViewContactOfOuterPageBorder;
258 ViewContactOfInnerPageBorder maViewContactOfInnerPageBorder;
259 ViewContactOfGrid maViewContactOfGridBack;
260 ViewContactOfHelplines maViewContactOfHelplinesBack;
261 ViewContactOfPageHierarchy maViewContactOfPageHierarchy;
262 ViewContactOfGrid maViewContactOfGridFront;
263 ViewContactOfHelplines maViewContactOfHelplinesFront;
265 // Create a Object-Specific ViewObjectContact, set ViewContact and
266 // ObjectContact. Always needs to return something. Default is to create
267 // a standard ViewObjectContact containing the given ObjectContact and *this
268 virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact);
270 public:
271 // access to SdrObject
272 SdrPage& GetSdrPage() const
274 return mrPage;
277 // basic constructor, used from SdrPage.
278 explicit ViewContactOfSdrPage(SdrPage& rObj);
279 virtual ~ViewContactOfSdrPage();
281 // Access to possible sub-hierarchy
282 virtual sal_uInt32 GetObjectCount() const;
283 virtual ViewContact& GetViewContact(sal_uInt32 nIndex) const;
285 // React on changes of the object of this ViewContact
286 virtual void ActionChanged();
288 // overload for acessing the SdrPage
289 virtual SdrPage* TryToGetSdrPage() const;
291 protected:
292 // This method is responsible for creating the graphical visualisation data
293 // ONLY based on model data
294 virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const;
296 } // end of namespace contact
297 } // end of namespace sdr
299 //////////////////////////////////////////////////////////////////////////////
301 #endif //_SDR_CONTACT_VIEWCONTACTOFSDRPAGE_HXX
303 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */