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 // MARKER(update_precomp.py): autogen include statement, do not remove 29 #include "precompiled_svx.hxx" 30 #include <svx/sdr/contact/displayinfo.hxx> 31 #include <vcl/outdev.hxx> 32 #include <vcl/svapp.hxx> 33 #include <svx/svdobj.hxx> 34 #include <vcl/gdimtf.hxx> 35 #include <svx/svdpagv.hxx> 36 #include <svx/svdview.hxx> 37 38 #define ALL_GHOSTED_DRAWMODES (DRAWMODE_GHOSTEDLINE|DRAWMODE_GHOSTEDFILL|DRAWMODE_GHOSTEDTEXT|DRAWMODE_GHOSTEDBITMAP|DRAWMODE_GHOSTEDGRADIENT) 39 40 ////////////////////////////////////////////////////////////////////////////// 41 42 namespace sdr 43 { 44 namespace contact 45 { 46 DisplayInfo::DisplayInfo() 47 : maProcessLayers(true), // init layer info with all bits set to draw everything on default 48 maRedrawArea(), 49 mbControlLayerProcessingActive(false), 50 mbPageProcessingActive(true), 51 mbGhostedDrawModeActive(false), 52 mbSubContentActive(false) 53 { 54 } 55 56 DisplayInfo::~DisplayInfo() 57 { 58 } 59 60 // Access to LayerInfos (which layers to proccess) 61 void DisplayInfo::SetProcessLayers(const SetOfByte& rSet) 62 { 63 maProcessLayers = rSet; 64 } 65 66 // access to RedrawArea 67 void DisplayInfo::SetRedrawArea(const Region& rRegion) 68 { 69 maRedrawArea = rRegion; 70 } 71 72 void DisplayInfo::SetControlLayerProcessingActive(bool bDoProcess) 73 { 74 if((bool)mbControlLayerProcessingActive != bDoProcess) 75 { 76 mbControlLayerProcessingActive = bDoProcess; 77 } 78 } 79 80 void DisplayInfo::SetPageProcessingActive(bool bDoProcess) 81 { 82 if((bool)mbPageProcessingActive != bDoProcess) 83 { 84 mbPageProcessingActive = bDoProcess; 85 } 86 } 87 88 void DisplayInfo::ClearGhostedDrawMode() 89 { 90 mbGhostedDrawModeActive = false; 91 } 92 93 void DisplayInfo::SetGhostedDrawMode() 94 { 95 mbGhostedDrawModeActive = true; 96 } 97 98 void DisplayInfo::SetSubContentActive(bool bNew) 99 { 100 if((bool)mbSubContentActive != bNew) 101 { 102 mbSubContentActive = bNew; 103 } 104 } 105 106 } // end of namespace contact 107 } // end of namespace sdr 108 109 ////////////////////////////////////////////////////////////////////////////// 110 // eof 111