LCOV - code coverage report
Current view: top level - include/svx/sdr/contact - viewcontactofsdrpage.hxx (source / functions) Hit Total Coverage
Test: commit e02a6cb2c3e2b23b203b422e4e0680877f232636 Lines: 0 4 0.0 %
Date: 2014-04-14 Functions: 0 3 0.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_SDR_CONTACT_VIEWCONTACTOFSDRPAGE_HXX
      21             : #define INCLUDED_SVX_SDR_CONTACT_VIEWCONTACTOFSDRPAGE_HXX
      22             : 
      23             : #include <sal/types.h>
      24             : #include <svx/sdr/contact/viewcontact.hxx>
      25             : 
      26             : 
      27             : // predeclarations
      28             : class SdrPage;
      29             : 
      30             : namespace sdr { namespace contact {
      31             :     class ViewContactOfSdrPage;
      32             : }}
      33             : 
      34             : 
      35             : 
      36             : namespace sdr
      37             : {
      38             :     namespace contact
      39             :     {
      40             :         class ViewContactOfPageSubObject : public ViewContact
      41             :         {
      42             :         protected:
      43             :             ViewContactOfSdrPage&                       mrParentViewContactOfSdrPage;
      44             : 
      45             :         public:
      46             :             explicit ViewContactOfPageSubObject(ViewContactOfSdrPage& rParentViewContactOfSdrPage);
      47             :             virtual ~ViewContactOfPageSubObject();
      48             : 
      49             :             virtual ViewContact* GetParentContact() const SAL_OVERRIDE;
      50             :             const SdrPage& getPage() const;
      51             :         };
      52             :     } // end of namespace contact
      53             : } // end of namespace sdr
      54             : 
      55             : 
      56             : 
      57             : namespace sdr
      58             : {
      59             :     namespace contact
      60             :     {
      61             :         class ViewContactOfPageBackground : public ViewContactOfPageSubObject
      62             :         {
      63             :         protected:
      64             :             virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact) SAL_OVERRIDE;
      65             :             virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const SAL_OVERRIDE;
      66             : 
      67             :         public:
      68             :             explicit ViewContactOfPageBackground(ViewContactOfSdrPage& rParentViewContactOfSdrPage);
      69             :             virtual ~ViewContactOfPageBackground();
      70             :         };
      71             :     } // end of namespace contact
      72             : } // end of namespace sdr
      73             : 
      74             : 
      75             : 
      76             : namespace sdr
      77             : {
      78             :     namespace contact
      79             :     {
      80             :         class ViewContactOfPageShadow : public ViewContactOfPageSubObject
      81             :         {
      82             :         protected:
      83             :             virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact) SAL_OVERRIDE;
      84             :             virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const SAL_OVERRIDE;
      85             : 
      86             :         public:
      87             :             explicit ViewContactOfPageShadow(ViewContactOfSdrPage& rParentViewContactOfSdrPage);
      88             :             virtual ~ViewContactOfPageShadow();
      89             :         };
      90             :     } // end of namespace contact
      91             : } // end of namespace sdr
      92             : 
      93             : 
      94             : 
      95             : namespace sdr
      96             : {
      97             :     namespace contact
      98             :     {
      99             :         class ViewContactOfPageFill : public ViewContactOfPageSubObject
     100             :         {
     101             :         protected:
     102             :             virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact) SAL_OVERRIDE;
     103             :             virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const SAL_OVERRIDE;
     104             : 
     105             :         public:
     106             :             explicit ViewContactOfPageFill(ViewContactOfSdrPage& rParentViewContactOfSdrPage);
     107             :             virtual ~ViewContactOfPageFill();
     108             :         };
     109             :     } // end of namespace contact
     110             : } // end of namespace sdr
     111             : 
     112             : 
     113             : 
     114             : namespace sdr
     115             : {
     116             :     namespace contact
     117             :     {
     118             :         class ViewContactOfMasterPage : public ViewContactOfPageSubObject
     119             :         {
     120             :         protected:
     121             :             virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact) SAL_OVERRIDE;
     122             :             virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const SAL_OVERRIDE;
     123             : 
     124             :         public:
     125             :             explicit ViewContactOfMasterPage(ViewContactOfSdrPage& rParentViewContactOfSdrPage);
     126             :             virtual ~ViewContactOfMasterPage();
     127             :         };
     128             :     } // end of namespace contact
     129             : } // end of namespace sdr
     130             : 
     131             : 
     132             : 
     133             : namespace sdr
     134             : {
     135             :     namespace contact
     136             :     {
     137             :         class ViewContactOfOuterPageBorder : public ViewContactOfPageSubObject
     138             :         {
     139             :         protected:
     140             :             virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact) SAL_OVERRIDE;
     141             :             virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const SAL_OVERRIDE;
     142             : 
     143             :         public:
     144             :             explicit ViewContactOfOuterPageBorder(ViewContactOfSdrPage& rParentViewContactOfSdrPage);
     145             :             virtual ~ViewContactOfOuterPageBorder();
     146             :         };
     147             :     } // end of namespace contact
     148             : } // end of namespace sdr
     149             : 
     150             : 
     151             : 
     152             : namespace sdr
     153             : {
     154             :     namespace contact
     155             :     {
     156             :         class ViewContactOfInnerPageBorder : public ViewContactOfPageSubObject
     157             :         {
     158             :         protected:
     159             :             virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact) SAL_OVERRIDE;
     160             :             virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const SAL_OVERRIDE;
     161             : 
     162             :         public:
     163             :             explicit ViewContactOfInnerPageBorder(ViewContactOfSdrPage& rParentViewContactOfSdrPage);
     164             :             virtual ~ViewContactOfInnerPageBorder();
     165             :         };
     166             :     } // end of namespace contact
     167             : } // end of namespace sdr
     168             : 
     169             : 
     170             : 
     171             : namespace sdr
     172             : {
     173             :     namespace contact
     174             :     {
     175             :         class ViewContactOfPageHierarchy : public ViewContactOfPageSubObject
     176             :         {
     177             :         protected:
     178             :             virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact) SAL_OVERRIDE;
     179             :             virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const SAL_OVERRIDE;
     180             : 
     181             :         public:
     182             :             explicit ViewContactOfPageHierarchy(ViewContactOfSdrPage& rParentViewContactOfSdrPage);
     183             :             virtual ~ViewContactOfPageHierarchy();
     184             : 
     185             :             virtual sal_uInt32 GetObjectCount() const SAL_OVERRIDE;
     186             :             virtual ViewContact& GetViewContact(sal_uInt32 nIndex) const SAL_OVERRIDE;
     187             :         };
     188             :     } // end of namespace contact
     189             : } // end of namespace sdr
     190             : 
     191             : 
     192             : 
     193             : namespace sdr
     194             : {
     195             :     namespace contact
     196             :     {
     197             :         class ViewContactOfGrid : public ViewContactOfPageSubObject
     198             :         {
     199             :         protected:
     200             :             // bitfield
     201             :             bool                                        mbFront : 1;
     202             : 
     203             :             virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact) SAL_OVERRIDE;
     204             :             virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const SAL_OVERRIDE;
     205             : 
     206             :         public:
     207             :             ViewContactOfGrid(ViewContactOfSdrPage& rParentViewContactOfSdrPage, bool bFront);
     208             :             virtual ~ViewContactOfGrid();
     209             : 
     210           0 :             bool getFront() const { return mbFront; }
     211             :         };
     212             :     } // end of namespace contact
     213             : } // end of namespace sdr
     214             : 
     215             : 
     216             : 
     217             : namespace sdr
     218             : {
     219             :     namespace contact
     220             :     {
     221             :         class ViewContactOfHelplines : public ViewContactOfPageSubObject
     222             :         {
     223             :         protected:
     224             :             // bitfield
     225             :             bool                                        mbFront : 1;
     226             : 
     227             :             virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact) SAL_OVERRIDE;
     228             :             virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const SAL_OVERRIDE;
     229             : 
     230             :         public:
     231             :             ViewContactOfHelplines(ViewContactOfSdrPage& rParentViewContactOfSdrPage, bool bFront);
     232             :             virtual ~ViewContactOfHelplines();
     233             : 
     234           0 :             bool getFront() const { return mbFront; }
     235             :         };
     236             :     } // end of namespace contact
     237             : } // end of namespace sdr
     238             : 
     239             : 
     240             : 
     241             : namespace sdr
     242             : {
     243             :     namespace contact
     244             :     {
     245             :         class ViewContactOfSdrPage : public ViewContact
     246             :         {
     247             :         protected:
     248             :             // the owner of this ViewContact. Set from constructor and not
     249             :             // to be changed in any way.
     250             :             SdrPage&                                        mrPage;
     251             : 
     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;
     264             : 
     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) SAL_OVERRIDE;
     269             : 
     270             :         public:
     271             :             // access to SdrObject
     272           0 :             SdrPage& GetSdrPage() const
     273             :             {
     274           0 :                 return mrPage;
     275             :             }
     276             : 
     277             :             // basic constructor, used from SdrPage.
     278             :             explicit ViewContactOfSdrPage(SdrPage& rObj);
     279             :             virtual ~ViewContactOfSdrPage();
     280             : 
     281             :             // Access to possible sub-hierarchy
     282             :             virtual sal_uInt32 GetObjectCount() const SAL_OVERRIDE;
     283             :             virtual ViewContact& GetViewContact(sal_uInt32 nIndex) const SAL_OVERRIDE;
     284             : 
     285             :             // React on changes of the object of this ViewContact
     286             :             virtual void ActionChanged() SAL_OVERRIDE;
     287             : 
     288             :             // overload for acessing the SdrPage
     289             :             virtual SdrPage* TryToGetSdrPage() const SAL_OVERRIDE;
     290             : 
     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 SAL_OVERRIDE;
     295             :         };
     296             :     } // end of namespace contact
     297             : } // end of namespace sdr
     298             : 
     299             : 
     300             : 
     301             : #endif // INCLUDED_SVX_SDR_CONTACT_VIEWCONTACTOFSDRPAGE_HXX
     302             : 
     303             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10