Line data Source code
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 _SDR_CONTACT_OBJECTCONTACTOFPAGEVIEW_HXX
21 : #define _SDR_CONTACT_OBJECTCONTACTOFPAGEVIEW_HXX
22 :
23 : #include <svx/sdr/contact/objectcontact.hxx>
24 : #include <tools/gen.hxx>
25 :
26 : //////////////////////////////////////////////////////////////////////////////
27 : // predeclarations
28 :
29 : class SdrPageWindow;
30 : class SdrPage;
31 :
32 : //////////////////////////////////////////////////////////////////////////////
33 :
34 : namespace sdr
35 : {
36 : namespace contact
37 : {
38 : class ObjectContactOfPageView : public ObjectContact, public Timer
39 : {
40 : protected:
41 : // the owner of this ObjectContactOfPageView. Set from constructor and not
42 : // to be changed in any way.
43 : SdrPageWindow& mrPageWindow;
44 :
45 : // Process the whole displaying, the real version
46 : void DoProcessDisplay(DisplayInfo& rDisplayInfo);
47 :
48 : public:
49 : // access to SdrPageWindow
50 6398 : SdrPageWindow& GetPageWindow() const { return mrPageWindow; }
51 :
52 : // access to SdrPage of PageView
53 : SdrPage* GetSdrPage() const;
54 :
55 : // basic constructor, used from SdrPageView.
56 : explicit ObjectContactOfPageView(SdrPageWindow& rPageWindow);
57 : virtual ~ObjectContactOfPageView();
58 :
59 : // LazyInvalidate request. This is used from the VOCs to mark that they
60 : // got invalidated by an ActionCanged() call. An active view needs to remember
61 : // this and take action on it. Default implementation directly calls back
62 : // triggerLazyInvalidate() wich promptly handles the request
63 : virtual void setLazyInvalidate(ViewObjectContact& rVOC);
64 :
65 : // call this to support evtl. preparations for repaint
66 : virtual void PrepareProcessDisplay();
67 :
68 : // From baseclass Timer, the timeout call triggered by te LazyInvalidate mechanism
69 : virtual void Timeout();
70 :
71 : // Process the whole displaying
72 : virtual void ProcessDisplay(DisplayInfo& rDisplayInfo);
73 :
74 : // test if visualizing of entered groups is switched on at all
75 : virtual bool DoVisualizeEnteredGroup() const;
76 :
77 : // get active group's (the entered group) ViewContact
78 : virtual const ViewContact* getActiveViewContact() const;
79 :
80 : // Invalidate given rectangle at the window/output which is represented by
81 : // this ObjectContact.
82 : virtual void InvalidatePartOfView(const basegfx::B2DRange& rRange) const;
83 :
84 : // Get info if given Rectangle is visible in this view
85 : virtual bool IsAreaVisible(const basegfx::B2DRange& rRange) const;
86 :
87 : // Get info about the need to visualize GluePoints. The default
88 : // is that it is not necessary.
89 : virtual bool AreGluePointsVisible() const;
90 :
91 : // check if text animation is allowed.
92 : virtual bool IsTextAnimationAllowed() const;
93 :
94 : // check if graphic animation is allowed.
95 : virtual bool IsGraphicAnimationAllowed() const;
96 :
97 : // check if asynchronious graphis loading is allowed. Default is sal_False.
98 : virtual bool IsAsynchronGraphicsLoadingAllowed() const;
99 :
100 : // check if buffering of MasterPages is allowed. Default is sal_False.
101 : virtual bool IsMasterPageBufferingAllowed() const;
102 :
103 : // print? Default is false
104 : virtual bool isOutputToPrinter() const;
105 :
106 : // window? Default is true
107 : virtual bool isOutputToWindow() const;
108 :
109 : // VirtualDevice? Default is false
110 : virtual bool isOutputToVirtualDevice() const;
111 :
112 : // recording MetaFile? Default is false
113 : virtual bool isOutputToRecordingMetaFile() const;
114 :
115 : // pdf export? Default is false
116 : virtual bool isOutputToPDFFile() const;
117 :
118 : // gray display mode
119 : virtual bool isDrawModeGray() const;
120 :
121 : // gray display mode
122 : virtual bool isDrawModeBlackWhite() const;
123 :
124 : // high contrast display mode
125 : virtual bool isDrawModeHighContrast() const;
126 :
127 : // overloaded access to SdrPageView
128 : virtual SdrPageView* TryToGetSdrPageView() const;
129 :
130 : // access to OutputDevice. May return 0L like the default implementations do. Needs to be overloaded as needed.
131 : virtual OutputDevice* TryToGetOutputDevice() const;
132 :
133 : /** sets all UNO controls which are associated with this ObjectContact to
134 : design or alive mode.
135 : */
136 : void SetUNOControlsDesignMode( bool _bDesignMode ) const;
137 : };
138 : } // end of namespace contact
139 : } // end of namespace sdr
140 :
141 : //////////////////////////////////////////////////////////////////////////////
142 :
143 : #endif //_SDR_CONTACT_OBJECTCONTACTOFPAGEVIEW_HXX
144 :
145 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|