1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef _SDR_CONTACT_OBJECTCONTACTOFPAGEVIEW_HXX
21 #define _SDR_CONTACT_OBJECTCONTACTOFPAGEVIEW_HXX
23 #include <svx/sdr/contact/objectcontact.hxx>
25 //////////////////////////////////////////////////////////////////////////////
31 //////////////////////////////////////////////////////////////////////////////
37 class ObjectContactOfPageView
: public ObjectContact
, public Timer
40 // the owner of this ObjectContactOfPageView. Set from constructor and not
41 // to be changed in any way.
42 SdrPageWindow
& mrPageWindow
;
44 // Process the whole displaying, the real version
45 void DoProcessDisplay(DisplayInfo
& rDisplayInfo
);
48 // access to SdrPageWindow
49 SdrPageWindow
& GetPageWindow() const { return mrPageWindow
; }
51 // access to SdrPage of PageView
52 SdrPage
* GetSdrPage() const;
54 // basic constructor, used from SdrPageView.
55 explicit ObjectContactOfPageView(SdrPageWindow
& rPageWindow
);
56 virtual ~ObjectContactOfPageView();
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
);
64 // call this to support evtl. preparations for repaint
65 virtual void PrepareProcessDisplay();
67 // From baseclass Timer, the timeout call triggered by te LazyInvalidate mechanism
68 virtual void Timeout();
70 // Process the whole displaying
71 virtual void ProcessDisplay(DisplayInfo
& rDisplayInfo
);
73 // test if visualizing of entered groups is switched on at all
74 virtual bool DoVisualizeEnteredGroup() const;
76 // get active group's (the entered group) ViewContact
77 virtual const ViewContact
* getActiveViewContact() const;
79 // Invalidate given rectangle at the window/output which is represented by
80 // this ObjectContact.
81 virtual void InvalidatePartOfView(const basegfx::B2DRange
& rRange
) const;
83 // Get info if given Rectangle is visible in this view
84 virtual bool IsAreaVisible(const basegfx::B2DRange
& rRange
) const;
86 // Get info about the need to visualize GluePoints. The default
87 // is that it is not necessary.
88 virtual bool AreGluePointsVisible() const;
90 // check if text animation is allowed.
91 virtual bool IsTextAnimationAllowed() const;
93 // check if graphic animation is allowed.
94 virtual bool IsGraphicAnimationAllowed() const;
96 // check if asynchronious graphis loading is allowed. Default is sal_False.
97 virtual bool IsAsynchronGraphicsLoadingAllowed() const;
99 // check if buffering of MasterPages is allowed. Default is sal_False.
100 virtual bool IsMasterPageBufferingAllowed() const;
102 // print? Default is false
103 virtual bool isOutputToPrinter() const;
105 // window? Default is true
106 virtual bool isOutputToWindow() const;
108 // VirtualDevice? Default is false
109 virtual bool isOutputToVirtualDevice() const;
111 // recording MetaFile? Default is false
112 virtual bool isOutputToRecordingMetaFile() const;
114 // pdf export? Default is false
115 virtual bool isOutputToPDFFile() const;
118 virtual bool isDrawModeGray() const;
121 virtual bool isDrawModeBlackWhite() const;
123 // high contrast display mode
124 virtual bool isDrawModeHighContrast() const;
126 // overloaded access to SdrPageView
127 virtual SdrPageView
* TryToGetSdrPageView() const;
129 // access to OutputDevice. May return 0L like the default implementations do. Needs to be overloaded as needed.
130 virtual OutputDevice
* TryToGetOutputDevice() const;
132 /** sets all UNO controls which are associated with this ObjectContact to
133 design or alive mode.
135 void SetUNOControlsDesignMode( bool _bDesignMode
) const;
137 } // end of namespace contact
138 } // end of namespace sdr
140 //////////////////////////////////////////////////////////////////////////////
142 #endif //_SDR_CONTACT_OBJECTCONTACTOFPAGEVIEW_HXX
144 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */