1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28 #ifndef _SDR_CONTACT_DISPLAYINFO_HXX 29 #define _SDR_CONTACT_DISPLAYINFO_HXX 30 31 #include <sal/types.h> 32 #include <svx/svdsob.hxx> 33 #include <svtools/colorcfg.hxx> 34 #include <vcl/region.hxx> 35 #include <vector> 36 #include "svx/svxdllapi.h" 37 38 ////////////////////////////////////////////////////////////////////////////// 39 // predeclarations 40 41 class SdrPage; 42 43 namespace sdr { namespace contact { 44 class ViewObjectContact; 45 }} 46 47 ////////////////////////////////////////////////////////////////////////////// 48 49 namespace sdr 50 { 51 namespace contact 52 { 53 class SVX_DLLPUBLIC DisplayInfo 54 { 55 protected: 56 // The Layers which shall be processed (visible) 57 SetOfByte maProcessLayers; 58 59 // The redraw area, in logical coordinates of OutputDevice. If Region 60 // is empty, everything needs to be redrawn 61 Region maRedrawArea; 62 63 // bitfield 64 65 // Internal flag to know when the control layer is painted. Default is 66 // false. If set to true, painting of the page, page borders and 67 // the rasters will be suppressed as if mbPageProcessingActive is set (see there). 68 // This flag is set internally from the processing mechanism to avoid double page 69 // painting when the control layer needs to be painted as last layer 70 unsigned mbControlLayerProcessingActive : 1; 71 72 // Internal flag to decide if page stuff (background, border, MasterPage, grid, etc...) 73 // will be processed at all. This flag is user-defined and will not be changed from the 74 // processing mechanism. Default is true, thus set to false if PagePainting should be suppressed. 75 // For more granular switching page stuff painting on and off, use the according flags at the 76 // view (->Is*Visible()) 77 unsigned mbPageProcessingActive : 1; 78 79 // Internal flag to remember if EnteredGroupDrawMode is active. Default is true 80 // since this mode starts activated and gets switched off when reacing 81 // the current group level. Should only be changed by instances which do 82 // primitive processing 83 unsigned mbGhostedDrawModeActive : 1; 84 85 // Internal flag to know if a MasterPage is processed as SubContent of another 86 // page. Initialized to false, this should only be changed from the instance which 87 // is processing the MasterPage asSubContent and knows what it does 88 unsigned mbSubContentActive : 1; 89 90 public: 91 // basic constructor. 92 DisplayInfo(); 93 94 // destructor 95 virtual ~DisplayInfo(); 96 97 // access to ProcessLayers 98 void SetProcessLayers(const SetOfByte& rSet); 99 const SetOfByte& GetProcessLayers() const { return maProcessLayers; } 100 101 // access to RedrawArea 102 void SetRedrawArea(const Region& rRegion); 103 const Region& GetRedrawArea() const { return maRedrawArea; } 104 105 // Access to ControlLayerProcessingActive flag 106 void SetControlLayerProcessingActive(bool bDoPaint); 107 bool GetControlLayerProcessingActive() const { return mbControlLayerProcessingActive; } 108 109 // Access to PageProcessingActive flag 110 void SetPageProcessingActive(bool bDoPaint); 111 bool GetPageProcessingActive() const { return mbPageProcessingActive; } 112 113 // Save the original DrawMode from outdev 114 void ClearGhostedDrawMode(); 115 void SetGhostedDrawMode(); 116 bool IsGhostedDrawModeActive() const { return mbGhostedDrawModeActive; } 117 118 // access to master page painting flag 119 bool GetSubContentActive() const { return mbSubContentActive; } 120 void SetSubContentActive(bool bNew); 121 }; 122 } // end of namespace contact 123 } // end of namespace sdr 124 125 ////////////////////////////////////////////////////////////////////////////// 126 127 #endif //_SDR_CONTACT_DISPLAYINFO_HXX 128 129 // eof 130