1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: displayinfo.cxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 // MARKER(update_precomp.py): autogen include statement, do not remove
32 #include "precompiled_svx.hxx"
33 #include <svx/sdr/contact/displayinfo.hxx>
34 #include <vcl/outdev.hxx>
35 #include <vcl/svapp.hxx>
36 #include <svx/svdobj.hxx>
37 #include <vcl/gdimtf.hxx>
38 #include <svx/svdpagv.hxx>
39 #include <svx/svdview.hxx>
41 #define ALL_GHOSTED_DRAWMODES (DRAWMODE_GHOSTEDLINE|DRAWMODE_GHOSTEDFILL|DRAWMODE_GHOSTEDTEXT|DRAWMODE_GHOSTEDBITMAP|DRAWMODE_GHOSTEDGRADIENT)
43 //////////////////////////////////////////////////////////////////////////////
49 DisplayInfo::DisplayInfo()
50 : maProcessLayers(true), // init layer info with all bits set to draw everything on default
52 mbControlLayerProcessingActive(false),
53 mbPageProcessingActive(true),
54 mbGhostedDrawModeActive(false),
55 mbSubContentActive(false)
59 DisplayInfo::~DisplayInfo()
63 // Access to LayerInfos (which layers to proccess)
64 void DisplayInfo::SetProcessLayers(const SetOfByte
& rSet
)
66 maProcessLayers
= rSet
;
69 // access to RedrawArea
70 void DisplayInfo::SetRedrawArea(const Region
& rRegion
)
72 maRedrawArea
= rRegion
;
75 void DisplayInfo::SetControlLayerProcessingActive(bool bDoProcess
)
77 if((bool)mbControlLayerProcessingActive
!= bDoProcess
)
79 mbControlLayerProcessingActive
= bDoProcess
;
83 void DisplayInfo::SetPageProcessingActive(bool bDoProcess
)
85 if((bool)mbPageProcessingActive
!= bDoProcess
)
87 mbPageProcessingActive
= bDoProcess
;
91 void DisplayInfo::ClearGhostedDrawMode()
93 mbGhostedDrawModeActive
= false;
96 void DisplayInfo::SetGhostedDrawMode()
98 mbGhostedDrawModeActive
= true;
101 void DisplayInfo::SetSubContentActive(bool bNew
)
103 if((bool)mbSubContentActive
!= bNew
)
105 mbSubContentActive
= bNew
;
109 } // end of namespace contact
110 } // end of namespace sdr
112 //////////////////////////////////////////////////////////////////////////////