1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 // MARKER(update_precomp.py): autogen include statement, do not remove
25 #include "precompiled_svx.hxx"
26 #include <svx/sdr/contact/displayinfo.hxx>
27 #include <vcl/outdev.hxx>
28 #include <vcl/svapp.hxx>
29 #include <svx/svdobj.hxx>
30 #include <vcl/gdimtf.hxx>
31 #include <svx/svdpagv.hxx>
32 #include <svx/svdview.hxx>
33 
34 #define ALL_GHOSTED_DRAWMODES (DRAWMODE_GHOSTEDLINE|DRAWMODE_GHOSTEDFILL|DRAWMODE_GHOSTEDTEXT|DRAWMODE_GHOSTEDBITMAP|DRAWMODE_GHOSTEDGRADIENT)
35 
36 //////////////////////////////////////////////////////////////////////////////
37 
38 namespace sdr
39 {
40 	namespace contact
41 	{
DisplayInfo()42 		DisplayInfo::DisplayInfo()
43 		:	maProcessLayers(true), // init layer info with all bits set to draw everything on default
44 			maRedrawArea(),
45 			mbControlLayerProcessingActive(false),
46 			mbPageProcessingActive(true),
47 			mbGhostedDrawModeActive(false),
48 			mbSubContentActive(false)
49 		{
50 		}
51 
~DisplayInfo()52 		DisplayInfo::~DisplayInfo()
53 		{
54 		}
55 
56 		// Access to LayerInfos (which layers to proccess)
SetProcessLayers(const SetOfByte & rSet)57 		void DisplayInfo::SetProcessLayers(const SetOfByte& rSet)
58 		{
59 			maProcessLayers = rSet;
60 		}
61 
62 		// access to RedrawArea
SetRedrawArea(const Region & rRegion)63 		void DisplayInfo::SetRedrawArea(const Region& rRegion)
64 		{
65 			maRedrawArea = rRegion;
66 		}
67 
SetControlLayerProcessingActive(bool bDoProcess)68 		void DisplayInfo::SetControlLayerProcessingActive(bool bDoProcess)
69 		{
70 			if((bool)mbControlLayerProcessingActive != bDoProcess)
71 			{
72 				mbControlLayerProcessingActive = bDoProcess;
73 			}
74 		}
75 
SetPageProcessingActive(bool bDoProcess)76 		void DisplayInfo::SetPageProcessingActive(bool bDoProcess)
77 		{
78 			if((bool)mbPageProcessingActive != bDoProcess)
79 			{
80 				mbPageProcessingActive = bDoProcess;
81 			}
82 		}
83 
ClearGhostedDrawMode()84 		void DisplayInfo::ClearGhostedDrawMode()
85 		{
86 			mbGhostedDrawModeActive = false;
87 		}
88 
SetGhostedDrawMode()89 		void DisplayInfo::SetGhostedDrawMode()
90 		{
91 			mbGhostedDrawModeActive = true;
92 		}
93 
SetSubContentActive(bool bNew)94 		void DisplayInfo::SetSubContentActive(bool bNew)
95 		{
96 			if((bool)mbSubContentActive != bNew)
97 			{
98 				mbSubContentActive = bNew;
99 			}
100 		}
101 
102 	} // end of namespace contact
103 } // end of namespace sdr
104 
105 //////////////////////////////////////////////////////////////////////////////
106 // eof
107