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