1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 INCLUDED_SVX_SDRPAGEWINDOW_HXX
21 #define INCLUDED_SVX_SDRPAGEWINDOW_HXX
23 #include <svx/sdr/overlay/overlaymanager.hxx>
24 #include <svx/svdtypes.hxx>
25 #include <svx/svxdllapi.h>
26 #include <rtl/ref.hxx>
29 #include <com/sun/star/awt/XControlContainer.hpp>
31 namespace vcl
{ class Region
; }
38 class ViewObjectContactRedirector
;
42 namespace basegfx
{ class B2DRange
; class B2IRange
; }
47 class SVX_DLLPUBLIC SdrPageWindow
51 std::unique_ptr
<Impl
> mpImpl
;
53 SdrPageWindow( const SdrPageWindow
& ) = delete;
54 SdrPageWindow
& operator= ( const SdrPageWindow
& ) = delete;
57 SdrPageWindow(SdrPageView
& rNewPageView
, SdrPaintWindow
& rPaintWindow
);
61 SdrPageView
& GetPageView() const;
62 SdrPaintWindow
& GetPaintWindow() const;
63 const SdrPaintWindow
* GetOriginalPaintWindow() const;
64 css::uno::Reference
<css::awt::XControlContainer
> GetControlContainer( bool _bCreateIfNecessary
= true ) const;
67 rtl::Reference
< sdr::overlay::OverlayManager
> GetOverlayManager() const;
69 // #i72752# allow patcing SdrPaintWindow from SdrPageView::DrawLayer if needed
70 void patchPaintWindow(SdrPaintWindow
& rPaintWindow
);
71 void unpatchPaintWindow();
73 // the repaint method. For migration from pPaintProc, use one more parameter
75 void PrepareRedraw(const vcl::Region
& rReg
);
76 void RedrawAll( sdr::contact::ViewObjectContactRedirector
* pRedirector
);
77 void RedrawLayer( const SdrLayerID
* pId
, sdr::contact::ViewObjectContactRedirector
* pRedirector
, basegfx::B2IRange
const*);
79 // Invalidate call, used from ObjectContact(OfPageView) in InvalidatePartOfView(...)
80 void InvalidatePageWindow(const basegfx::B2DRange
& rRange
);
82 // #110094# ObjectContact section
83 const sdr::contact::ObjectContact
& GetObjectContact() const;
84 sdr::contact::ObjectContact
& GetObjectContact();
85 /// determines whether there already exists an ObjectContact
86 bool HasObjectContact() const;
89 void ResetObjectContact();
91 /** sets all elements in the view which support a design and a alive mode into the given mode
93 void SetDesignMode( bool _bDesignMode
) const;
96 #endif // INCLUDED_SVX_SDRPAGEWINDOW_HXX
98 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */