LibreOffice Module svx (master)  1
displayinfo.hxx
Go to the documentation of this file.
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_DISPLAYINFO_HXX
21 #define INCLUDED_SVX_SDR_CONTACT_DISPLAYINFO_HXX
22 
23 #include <svx/svdsob.hxx>
24 #include <vcl/region.hxx>
25 #include <svx/svxdllapi.h>
27 
28 namespace sdr
29 {
30  namespace contact
31  {
33  {
34  // The Layers which shall be processed (visible)
36 
37  // The redraw area, in logical coordinates of OutputDevice. If Region
38  // is empty, everything needs to be redrawn
40 
43 
44  // Internal flag to know when the control layer is painted. Default is
45  // false. If set to true, painting of the page, page borders and
46  // the rasters will be suppressed as if mbPageProcessingActive is set (see there).
47  // This flag is set internally from the processing mechanism to avoid double page
48  // painting when the control layer needs to be painted as last layer
49  bool mbControlLayerProcessingActive : 1;
50 
51  // Internal flag to decide if page stuff (background, border, MasterPage, grid, etc...)
52  // will be processed at all. This flag is user-defined and will not be changed from the
53  // processing mechanism. Default is true, thus set to false if PagePainting should be suppressed.
54  // For more granular switching page stuff painting on and off, use the according flags at the
55  // view (->Is*Visible())
56  bool mbPageProcessingActive : 1;
57 
58  // Internal flag to remember if EnteredGroupDrawMode is active. Default is true
59  // since this mode starts activated and gets switched off when reaching
60  // the current group level. Should only be changed by instances which do
61  // primitive processing
62  bool mbGhostedDrawModeActive : 1;
63 
64  // Internal flag to know if a MasterPage is processed as SubContent of another
65  // page. Initialized to false, this should only be changed from the instance which
66  // is processing the MasterPage asSubContent and knows what it does
67  bool mbSubContentActive : 1;
68 
69  public:
70  // basic constructor.
71  DisplayInfo();
72 
73  // access to ProcessLayers
74  void SetProcessLayers(const SdrLayerIDSet& rSet);
75  const SdrLayerIDSet& GetProcessLayers() const { return maProcessLayers; }
76 
77  // access to RedrawArea
78  void SetRedrawArea(const vcl::Region& rRegion);
79  const vcl::Region& GetRedrawArea() const { return maRedrawArea; }
80 
81  void SetWriterPageFrame(basegfx::B2IRectangle const& rPageFrame);
82  basegfx::B2IRectangle const& GetWriterPageFrame() const { return m_WriterPageFrame; }
83 
84  // Access to ControlLayerProcessingActive flag
85  void SetControlLayerProcessingActive(bool bDoPaint);
86  bool GetControlLayerProcessingActive() const { return mbControlLayerProcessingActive; }
87 
88  // Access to PageProcessingActive flag
89  void SetPageProcessingActive(bool bDoPaint);
90  bool GetPageProcessingActive() const { return mbPageProcessingActive; }
91 
92  // Save the original DrawMode from outdev
93  void ClearGhostedDrawMode();
94  void SetGhostedDrawMode();
95  bool IsGhostedDrawModeActive() const { return mbGhostedDrawModeActive; }
96 
97  // access to master page painting flag
98  bool GetSubContentActive() const { return mbSubContentActive; }
99  void SetSubContentActive(bool bNew);
100  };
101  } // end of namespace contact
102 } // end of namespace sdr
103 
104 
105 #endif // INCLUDED_SVX_SDR_CONTACT_DISPLAYINFO_HXX
106 
107 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
const vcl::Region & GetRedrawArea() const
Definition: displayinfo.hxx:79
bool GetPageProcessingActive() const
Definition: displayinfo.hxx:90
const SdrLayerIDSet & GetProcessLayers() const
Definition: displayinfo.hxx:75
SdrLayerIDSet maProcessLayers
Definition: displayinfo.hxx:35
bool GetControlLayerProcessingActive() const
Definition: displayinfo.hxx:86
basegfx::B2IRectangle m_WriterPageFrame
only for Writer: current page being painted
Definition: displayinfo.hxx:42
bool IsGhostedDrawModeActive() const
Definition: displayinfo.hxx:95
#define SVXCORE_DLLPUBLIC
Definition: svxdllapi.h:35
basegfx::B2IRectangle const & GetWriterPageFrame() const
Definition: displayinfo.hxx:82
bool GetSubContentActive() const
Definition: displayinfo.hxx:98