fdo#74697 Add Bluez 5 support for impress remote.
[LibreOffice.git] / include / svx / sdrpagewindow.hxx
blob85584d724b675de27f5a5fe3c41ee0ac46c12475
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 _SDRPAGEWINDOW_HXX
21 #define _SDRPAGEWINDOW_HXX
23 #include <com/sun/star/awt/XWindowListener.hpp>
24 #include <com/sun/star/beans/XPropertyChangeListener.hpp>
25 #include <com/sun/star/awt/XControlContainer.hpp>
26 #include <com/sun/star/util/XModeChangeListener.hpp>
27 #include <cppuhelper/implbase4.hxx>
28 #include <svx/sdr/overlay/overlaymanager.hxx>
29 #include <svx/svdtypes.hxx> // for SdrLayerID
30 #include <svx/sdrpagewindow.hxx>
31 #include "svx/svxdllapi.h"
33 #include <vector>
35 ////////////////////////////////////////////////////////////////////////////////////////////////////
36 // predeclarations
38 class Region;
39 class SdrUnoObj;
40 class SdrPageView;
42 // #110094#
43 namespace sdr
45 namespace contact
47 class ObjectContact;
48 class ViewObjectContactRedirector;
49 } // end of namespace contact
51 namespace overlay
53 class OverlayManager;
54 } // end of namespace overlay
55 } // end of namespace sdr
57 namespace basegfx
59 class B2DRange;
60 } // end of namespace basegfx
62 class SdrPaintWindow;
63 class Link;
65 ////////////////////////////////////////////////////////////////////////////////////////////////////
67 class SVX_DLLPUBLIC SdrPageWindow
69 // #110094# ObjectContact section
70 sdr::contact::ObjectContact* mpObjectContact;
72 // the SdrPageView this window belongs to
73 SdrPageView& mrPageView;
75 // the PaintWindow to paint on. Here is access to OutDev etc.
76 // #i72752# change to pointer to allow patcing it in DrawLayer() if necessary
77 SdrPaintWindow* mpPaintWindow;
78 SdrPaintWindow* mpOriginalPaintWindow;
80 // UNO stuff for xControls
81 ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer > mxControlContainer;
83 sdr::contact::ObjectContact* CreateViewSpecificObjectContact();
85 public:
86 SdrPageWindow(SdrPageView& rNewPageView, SdrPaintWindow& rPaintWindow);
87 ~SdrPageWindow();
89 // data read accesses
90 SdrPageView& GetPageView() const { return mrPageView; }
91 SdrPaintWindow& GetPaintWindow() const { return *mpPaintWindow; }
92 const SdrPaintWindow* GetOriginalPaintWindow() const { return mpOriginalPaintWindow; }
93 ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer > GetControlContainer( bool _bCreateIfNecessary = true ) const;
95 // OVERLAYMANAGER
96 rtl::Reference< ::sdr::overlay::OverlayManager > GetOverlayManager() const;
98 // #i72752# allow patcing SdrPaintWindow from SdrPageView::DrawLayer if needed
99 void patchPaintWindow(SdrPaintWindow& rPaintWindow);
100 void unpatchPaintWindow();
102 // the repaint method. For migration from pPaintProc, use one more parameter
103 void PrePaint();
104 void PrepareRedraw(const Region& rReg);
105 void RedrawAll(sdr::contact::ViewObjectContactRedirector* pRedirector) const;
106 void RedrawLayer(const SdrLayerID* pId, sdr::contact::ViewObjectContactRedirector* pRedirector) const;
108 // Invalidate call, used from ObjectContact(OfPageView) in InvalidatePartOfView(...)
109 void InvalidatePageWindow(const basegfx::B2DRange& rRange);
111 // #110094# ObjectContact section
112 sdr::contact::ObjectContact& GetObjectContact() const;
113 /// determines whether there already exists an ObjectContact
114 bool HasObjectContact() const;
116 // #i26631#
117 void ResetObjectContact();
119 /** sets all elements in the view which support a design and a alive mode into the given mode
121 void SetDesignMode( bool _bDesignMode ) const;
124 // typedefs for a list of SdrPageWindow
125 typedef ::std::vector< SdrPageWindow* > SdrPageWindowVector;
127 ////////////////////////////////////////////////////////////////////////////////////////////////////
129 #endif //_SDRPAGEWINDOW_HXX
131 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */