LCOV - code coverage report
Current view: top level - include/svx - sdrpagewindow.hxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 3 3 100.0 %
Date: 2014-11-03 Functions: 3 3 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       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_SVX_SDRPAGEWINDOW_HXX
      21             : #define INCLUDED_SVX_SDRPAGEWINDOW_HXX
      22             : 
      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>
      30             : #include <svx/sdrpagewindow.hxx>
      31             : #include <svx/svxdllapi.h>
      32             : 
      33             : #include <vector>
      34             : 
      35             : 
      36             : // predeclarations
      37             : 
      38             : namespace vcl { class Region; }
      39             : class SdrUnoObj;
      40             : class SdrPageView;
      41             : 
      42             : // #110094#
      43             : namespace sdr
      44             : {
      45             :     namespace contact
      46             :     {
      47             :         class ObjectContact;
      48             :         class ViewObjectContactRedirector;
      49             :     } // end of namespace contact
      50             : 
      51             :     namespace overlay
      52             :     {
      53             :         class OverlayManager;
      54             :     } // end of namespace overlay
      55             : } // end of namespace sdr
      56             : 
      57             : namespace basegfx
      58             : {
      59             :     class B2DRange;
      60             : } // end of namespace basegfx
      61             : 
      62             : class SdrPaintWindow;
      63             : class Link;
      64             : 
      65             : 
      66             : 
      67             : class SVX_DLLPUBLIC SdrPageWindow
      68             : {
      69             :     // #110094# ObjectContact section
      70             :     sdr::contact::ObjectContact*                        mpObjectContact;
      71             : 
      72             :     // the SdrPageView this window belongs to
      73             :     SdrPageView&                                        mrPageView;
      74             : 
      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;
      79             : 
      80             :     // UNO stuff for xControls
      81             :     ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer > mxControlContainer;
      82             : 
      83             :     sdr::contact::ObjectContact* CreateViewSpecificObjectContact();
      84             : 
      85             : public:
      86             :     SdrPageWindow(SdrPageView& rNewPageView, SdrPaintWindow& rPaintWindow);
      87             :     ~SdrPageWindow();
      88             : 
      89             :     // data read accesses
      90      460319 :     SdrPageView& GetPageView() const { return mrPageView; }
      91      801378 :     SdrPaintWindow& GetPaintWindow() const { return *mpPaintWindow; }
      92        8958 :     const SdrPaintWindow* GetOriginalPaintWindow() const { return mpOriginalPaintWindow; }
      93             :     ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer > GetControlContainer( bool _bCreateIfNecessary = true ) const;
      94             : 
      95             :     // OVERLAYMANAGER
      96             :     rtl::Reference< ::sdr::overlay::OverlayManager > GetOverlayManager() const;
      97             : 
      98             :     // #i72752# allow patcing SdrPaintWindow from SdrPageView::DrawLayer if needed
      99             :     void patchPaintWindow(SdrPaintWindow& rPaintWindow);
     100             :     void unpatchPaintWindow();
     101             : 
     102             :     // the repaint method. For migration from pPaintProc, use one more parameter
     103             :     void PrePaint();
     104             :     void PrepareRedraw(const vcl::Region& rReg);
     105             :     void RedrawAll(sdr::contact::ViewObjectContactRedirector* pRedirector) const;
     106             :     void RedrawLayer(const SdrLayerID* pId, sdr::contact::ViewObjectContactRedirector* pRedirector) const;
     107             : 
     108             :     // Invalidate call, used from ObjectContact(OfPageView) in InvalidatePartOfView(...)
     109             :     void InvalidatePageWindow(const basegfx::B2DRange& rRange);
     110             : 
     111             :     // #110094# ObjectContact section
     112             :     sdr::contact::ObjectContact& GetObjectContact() const;
     113             :     /// determines whether there already exists an ObjectContact
     114             :     bool                         HasObjectContact() const;
     115             : 
     116             :     // #i26631#
     117             :     void ResetObjectContact();
     118             : 
     119             :     /** sets all elements in the view which support a design and a alive mode into the given mode
     120             :     */
     121             :     void    SetDesignMode( bool _bDesignMode ) const;
     122             : };
     123             : 
     124             : // typedefs for a list of SdrPageWindow
     125             : typedef ::std::vector< SdrPageWindow* > SdrPageWindowVector;
     126             : 
     127             : 
     128             : 
     129             : #endif // INCLUDED_SVX_SDRPAGEWINDOW_HXX
     130             : 
     131             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10