LibreOffice Module svx (master)  1
viewobjectcontactofunocontrol.hxx
Go to the documentation of this file.
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_INC_SDR_CONTACT_VIEWOBJECTCONTACTOFUNOCONTROL_HXX
21 #define INCLUDED_SVX_INC_SDR_CONTACT_VIEWOBJECTCONTACTOFUNOCONTROL_HXX
22 
24 
25 #include <com/sun/star/uno/Reference.hxx>
26 #include <rtl/ref.hxx>
27 
28 class OutputDevice;
29 namespace vcl { class Window; }
30 class SdrUnoObj;
31 namespace com { namespace sun { namespace star {
32  namespace awt {
33  class XControl;
34  class XControlContainer;
35  }
36 } } }
37 
38 
39 namespace sdr { namespace contact {
40 
41 
42  class ViewContactOfUnoControl;
43  class ObjectContactOfPageView;
44 
45  //= ViewObjectContactOfUnoControl
46 
47  class ViewObjectContactOfUnoControl_Impl;
49  {
50  protected:
52 
53  public:
54  ViewObjectContactOfUnoControl( ObjectContact& _rObjectContact, ViewContactOfUnoControl& _rViewContact );
55 
57  css::uno::Reference< css::awt::XControl >
58  getControl();
59 
63  static css::uno::Reference< css::awt::XControl >
65  const vcl::Window& _rWindow,
66  css::uno::Reference< css::awt::XControlContainer >& _inout_ControlContainer,
67  const SdrUnoObj& _rUnoObject
68  );
69 
71  void ensureControlVisibility( bool _bVisible ) const;
72 
75  void setControlDesignMode( bool _bDesignMode ) const;
76 
79  void propertyChange();
80 
83  virtual void ActionChanged() override;
84 
87  struct ImplAccess { friend class ViewObjectContactOfUnoControl_Impl; friend class ViewObjectContactOfUnoControl; private: ImplAccess() { } };
89 
90  protected:
91  virtual ~ViewObjectContactOfUnoControl() override;
92 
93  // support for Primitive2D
95 
96  // visibility check
97  virtual bool isPrimitiveVisible( const DisplayInfo& _rDisplayInfo ) const override;
100 
101  private:
104  };
105 
107  {
108  public:
110  virtual ~UnoControlPrintOrPreviewContact() override;
111 
112  private:
115 
117  };
118 
119 
120 } } // namespace sdr::contact
121 
122 
123 #endif // INCLUDED_SVX_INC_SDR_CONTACT_VIEWOBJECTCONTACTOFUNOCONTROL_HXX
124 
125 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
css::uno::Reference< css::awt::XControl > getControl()
returns the ->XControl instance belonging to the instance, creates it if necessary ...
void setControlDesignMode(bool _bDesignMode) const
sets the design/alive mode of the control
::rtl::Reference< ViewObjectContactOfUnoControl_Impl > m_pImpl
virtual drawinglayer::primitive2d::Primitive2DContainer createPrimitive2DSequence(const DisplayInfo &rDisplayInfo) const override
void impl_onControlChangedOrModified()
to be called when any aspect of the control which requires view updates changed
static css::uno::Reference< css::awt::XControl > getTemporaryControlForWindow(const vcl::Window &_rWindow, css::uno::Reference< css::awt::XControlContainer > &_inout_ControlContainer, const SdrUnoObj &_rUnoObject)
retrieves a temporary XControl instance, whose parent is the given device SdrUnoObj::GetTemporaryCon...
ViewObjectContactOfUnoControl & operator=(const ViewObjectContactOfUnoControl &)=delete
void propertyChange()
callback from impl class to react on changes of properties form the XControlModel ...
UnoControlPrintOrPreviewContact(ObjectContactOfPageView &_rObjectContact, ViewContactOfUnoControl &_rViewContact)
virtual void ActionChanged() override
React on changes of the object of this ViewContact.
virtual drawinglayer::primitive2d::Primitive2DContainer createPrimitive2DSequence(const DisplayInfo &rDisplayInfo) const override
void ensureControlVisibility(bool _bVisible) const
ensures that the control belonging to this instances has a given visibility
ViewObjectContactOfUnoControl(ObjectContact &_rObjectContact, ViewContactOfUnoControl &_rViewContact)
to be called when any aspect of the control which requires view updates changed
virtual bool isPrimitiveVisible(const DisplayInfo &_rDisplayInfo) const override
UnoControlPrintOrPreviewContact & operator=(const UnoControlPrintOrPreviewContact &)=delete