LibreOffice Module vcl (master)  1
unowrap.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_VCL_UNOWRAP_HXX
21 #define INCLUDED_VCL_UNOWRAP_HXX
22 
23 #if !defined(VCL_DLLIMPLEMENTATION) && !defined(TOOLKIT_DLLIMPLEMENTATION)
24 #error "don't use this in new code"
25 #endif
26 
27 #include <com/sun/star/uno/Reference.h>
28 #include <vcl/dllapi.h>
29 #include <vcl/vclptr.hxx>
30 
31 namespace vcl { class Window; }
32 class OutputDevice;
33 class Menu;
34 
35 namespace com {
36 namespace sun {
37 namespace star {
38 namespace awt {
39  class XGraphics;
40  class XToolkit;
41  class XWindow;
42  class XWindowPeer;
43 }
44 } } }
45 
46 namespace com {
47 namespace sun {
48 namespace star {
49 namespace accessibility {
50  class XAccessible;
51 }}}}
52 
54 {
55 public:
56  virtual void Destroy() = 0;
57 
58  // Toolkit
59  virtual css::uno::Reference< css::awt::XToolkit > GetVCLToolkit() = 0;
60 
61  // Graphics
62  virtual css::uno::Reference< css::awt::XGraphics > CreateGraphics( OutputDevice* pOutDev ) = 0;
63  virtual void ReleaseAllGraphics( OutputDevice* pOutDev ) = 0;
64 
65  // Window
66  virtual css::uno::Reference< css::awt::XWindowPeer> GetWindowInterface( vcl::Window* pWindow ) = 0;
67  virtual void SetWindowInterface( vcl::Window* pWindow, css::uno::Reference< css::awt::XWindowPeer > xIFace ) = 0;
68  virtual VclPtr<vcl::Window> GetWindow(const css::uno::Reference<css::awt::XWindow>& rxWindow) = 0;
69 
70  virtual void WindowDestroyed( vcl::Window* pWindow ) = 0;
71 
72  // Accessibility
73  virtual css::uno::Reference< css::accessibility::XAccessible >
74  CreateAccessible( Menu* pMenu, bool bIsMenuBar ) = 0;
75 
85  static UnoWrapperBase* GetUnoWrapper( bool bCreateIfNotExists = true );
86 
91  static void SetUnoWrapper( UnoWrapperBase* pWrapper );
92 
93 protected:
95 };
96 
97 #endif // INCLUDED_VCL_UNOWRAP_HXX
98 
99 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
#define VCL_DLLPUBLIC
Definition: dllapi.h:29
Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inher...
Definition: outdev.hxx:304
Definition: menu.hxx:121