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 INCLUDED_SVX_INC_SDR_CONTACT_OBJECTCONTACTOFPAGEVIEW_HXX
21 #define INCLUDED_SVX_INC_SDR_CONTACT_OBJECTCONTACTOFPAGEVIEW_HXX
23 #include <svx/sdr/contact/objectcontact.hxx>
24 #include <vcl/idle.hxx>
29 namespace sdr::contact
31 class SVXCORE_DLLPUBLIC ObjectContactOfPageView
: public ObjectContact
, public Idle
33 // the owner of this ObjectContactOfPageView. Set from constructor and not
34 // to be changed in any way.
35 SdrPageWindow
& mrPageWindow
;
37 // Process the whole displaying, the real version
38 void DoProcessDisplay(DisplayInfo
& rDisplayInfo
);
41 // access to SdrPageWindow
42 SdrPageWindow
& GetPageWindow() const { return mrPageWindow
; }
44 // access to SdrPage of PageView
45 SdrPage
* GetSdrPage() const;
47 // basic constructor, used from SdrPageView.
48 explicit ObjectContactOfPageView(SdrPageWindow
& rPageWindow
,
49 const char *pDebugName
);
50 virtual ~ObjectContactOfPageView() override
;
52 // LazyInvalidate request. This is used from the VOCs to mark that they
53 // got invalidated by an ActionChanged() call. An active view needs to remember
54 // this and take action on it. Default implementation directly calls back
55 // triggerLazyInvalidate() which promptly handles the request
56 virtual void setLazyInvalidate(ViewObjectContact
& rVOC
) override
;
58 // call this to support evtl. preparations for repaint
59 virtual void PrepareProcessDisplay() override
;
61 // From baseclass Timer, the timeout call triggered by the LazyInvalidate mechanism
62 virtual void Invoke() final override
;
64 // Process the whole displaying
65 virtual void ProcessDisplay(DisplayInfo
& rDisplayInfo
) override
;
67 // test if visualizing of entered groups is switched on at all
68 virtual bool DoVisualizeEnteredGroup() const override
;
70 // get active group's (the entered group) ViewContact
71 virtual const ViewContact
* getActiveViewContact() const override
;
73 // Invalidate given rectangle at the window/output which is represented by
74 // this ObjectContact.
75 virtual void InvalidatePartOfView(const basegfx::B2DRange
& rRange
) const override
;
77 // Get info about the need to visualize GluePoints. The default
78 // is that it is not necessary.
79 virtual bool AreGluePointsVisible() const override
;
81 // check if text animation is allowed.
82 virtual bool IsTextAnimationAllowed() const override
;
84 // check if graphic animation is allowed.
85 virtual bool IsGraphicAnimationAllowed() const override
;
87 // print? Default is false
88 virtual bool isOutputToPrinter() const override
;
90 // display page decoration? Default is true
91 virtual bool isPageDecorationActive() const override
;
93 // display mster page content (ViewContactOfMasterPage)? Default is true
94 virtual bool isMasterPageActive() const override
;
96 // recording MetaFile? Default is false
97 virtual bool isOutputToRecordingMetaFile() const override
;
99 // pdf export? Default is false
100 virtual bool isOutputToPDFFile() const override
;
101 virtual bool isExportTaggedPDF() const override
;
102 virtual ::vcl::PDFExtOutDevData
const* GetPDFExtOutDevData() const override
;
105 virtual bool isDrawModeGray() const override
;
107 // high contrast display mode
108 virtual bool isDrawModeHighContrast() const override
;
110 // override access to SdrPageView
111 virtual SdrPageView
* TryToGetSdrPageView() const override
;
113 // access to OutputDevice. May return 0L like the default implementations do. Override as needed.
114 virtual OutputDevice
* TryToGetOutputDevice() const override
;
116 /** sets all UNO controls which are associated with this ObjectContact to
117 design or alive mode.
119 void SetUNOControlsDesignMode( bool _bDesignMode
) const;
121 } // end of namespace sdr::contact
123 #endif // INCLUDED_SVX_INC_SDR_CONTACT_OBJECTCONTACTOFPAGEVIEW_HXX
125 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */