Version 6.1.4.1, tag libreoffice-6.1.4.1
[LibreOffice.git] / svx / inc / sdr / contact / objectcontactofpageview.hxx
blob28c54434c9ad3734e494ffaa563217e86cc29ace
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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>
26 class SdrPageWindow;
27 class SdrPage;
29 namespace sdr
31 namespace contact
33 class ObjectContactOfPageView final : public ObjectContact, public Idle
35 // the owner of this ObjectContactOfPageView. Set from constructor and not
36 // to be changed in any way.
37 SdrPageWindow& mrPageWindow;
39 // Process the whole displaying, the real version
40 void DoProcessDisplay(DisplayInfo& rDisplayInfo);
42 public:
43 // access to SdrPageWindow
44 SdrPageWindow& GetPageWindow() const { return mrPageWindow; }
46 // access to SdrPage of PageView
47 SdrPage* GetSdrPage() const;
49 // basic constructor, used from SdrPageView.
50 explicit ObjectContactOfPageView(SdrPageWindow& rPageWindow,
51 const sal_Char *pDebugName);
52 virtual ~ObjectContactOfPageView() override;
54 // LazyInvalidate request. This is used from the VOCs to mark that they
55 // got invalidated by an ActionChanged() call. An active view needs to remember
56 // this and take action on it. Default implementation directly calls back
57 // triggerLazyInvalidate() which promptly handles the request
58 virtual void setLazyInvalidate(ViewObjectContact& rVOC) override;
60 // call this to support evtl. preparations for repaint
61 virtual void PrepareProcessDisplay() override;
63 // From baseclass Timer, the timeout call triggered by the LazyInvalidate mechanism
64 virtual void Invoke() final override;
66 // Process the whole displaying
67 virtual void ProcessDisplay(DisplayInfo& rDisplayInfo) override;
69 // test if visualizing of entered groups is switched on at all
70 virtual bool DoVisualizeEnteredGroup() const override;
72 // get active group's (the entered group) ViewContact
73 virtual const ViewContact* getActiveViewContact() const override;
75 // Invalidate given rectangle at the window/output which is represented by
76 // this ObjectContact.
77 virtual void InvalidatePartOfView(const basegfx::B2DRange& rRange) const override;
79 // Get info if given Rectangle is visible in this view
80 virtual bool IsAreaVisible(const basegfx::B2DRange& rRange) const override;
82 // Get info about the need to visualize GluePoints. The default
83 // is that it is not necessary.
84 virtual bool AreGluePointsVisible() const override;
86 // check if text animation is allowed.
87 virtual bool IsTextAnimationAllowed() const override;
89 // check if graphic animation is allowed.
90 virtual bool IsGraphicAnimationAllowed() const override;
92 // check if asynchronious graphis loading is allowed. Default is sal_False.
93 virtual bool IsAsynchronGraphicsLoadingAllowed() const override;
95 // print? Default is false
96 virtual bool isOutputToPrinter() const override;
98 // window? Default is true
99 virtual bool isOutputToWindow() const override;
101 // VirtualDevice? Default is false
102 virtual bool isOutputToVirtualDevice() const override;
104 // recording MetaFile? Default is false
105 virtual bool isOutputToRecordingMetaFile() const override;
107 // pdf export? Default is false
108 virtual bool isOutputToPDFFile() const override;
110 // gray display mode
111 virtual bool isDrawModeGray() const override;
113 // gray display mode
114 virtual bool isDrawModeBlackWhite() const override;
116 // high contrast display mode
117 virtual bool isDrawModeHighContrast() const override;
119 // override access to SdrPageView
120 virtual SdrPageView* TryToGetSdrPageView() const override;
122 // access to OutputDevice. May return 0L like the default implementations do. Override as needed.
123 virtual OutputDevice* TryToGetOutputDevice() const override;
125 /** sets all UNO controls which are associated with this ObjectContact to
126 design or alive mode.
128 void SetUNOControlsDesignMode( bool _bDesignMode ) const;
130 } // end of namespace contact
131 } // end of namespace sdr
133 #endif // INCLUDED_SVX_INC_SDR_CONTACT_OBJECTCONTACTOFPAGEVIEW_HXX
135 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */