Version 6.4.0.3, tag libreoffice-6.4.0.3
[LibreOffice.git] / include / toolkit / awt / vclxtopwindow.hxx
blob08777e280cee0c7917df71ee5488a950beeaa7d3
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_TOOLKIT_AWT_VCLXTOPWINDOW_HXX
21 #define INCLUDED_TOOLKIT_AWT_VCLXTOPWINDOW_HXX
23 #include <com/sun/star/awt/XSystemDependentWindowPeer.hpp>
24 #include <com/sun/star/awt/XTopWindow2.hpp>
25 #include <cppuhelper/weak.hxx>
27 #include <cppuhelper/implbase1.hxx>
29 #include <toolkit/awt/vclxcontainer.hxx>
31 namespace com { namespace sun { namespace star { namespace awt { class XMenuBar; } } } }
33 typedef ::cppu::ImplHelper1 < css::awt::XTopWindow2
34 > VCLXTopWindow_XBase;
35 typedef ::cppu::ImplHelper1 < css::awt::XSystemDependentWindowPeer
36 > VCLXTopWindow_SBase;
38 class TOOLKIT_DLLPUBLIC VCLXTopWindow_Base :public VCLXTopWindow_XBase
39 ,public VCLXTopWindow_SBase
41 protected:
42 virtual vcl::Window* GetWindowImpl() = 0;
43 virtual ::comphelper::OInterfaceContainerHelper2& GetTopWindowListenersImpl() = 0;
45 VCLXTopWindow_Base();
47 public:
48 virtual ~VCLXTopWindow_Base();
50 // XInterface equivalents
51 css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override;
52 // XTypeProvider equivalents
53 css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override;
55 // css::awt::XSystemDependentWindowPeer
56 css::uno::Any SAL_CALL getWindowHandle( const css::uno::Sequence< sal_Int8 >& ProcessId, sal_Int16 SystemType ) override;
58 // css::awt::XTopWindow
59 void SAL_CALL addTopWindowListener( const css::uno::Reference< css::awt::XTopWindowListener >& rxListener ) override;
60 void SAL_CALL removeTopWindowListener( const css::uno::Reference< css::awt::XTopWindowListener >& rxListener ) override;
61 void SAL_CALL toFront() override;
62 void SAL_CALL toBack() override;
63 void SAL_CALL setMenuBar( const css::uno::Reference< css::awt::XMenuBar >& xMenu ) override;
65 // XTopWindow2
66 virtual sal_Bool SAL_CALL getIsMaximized() override;
67 virtual void SAL_CALL setIsMaximized( sal_Bool _ismaximized ) override;
68 virtual sal_Bool SAL_CALL getIsMinimized() override;
69 virtual void SAL_CALL setIsMinimized( sal_Bool _isminimized ) override;
70 virtual ::sal_Int32 SAL_CALL getDisplay() override;
71 virtual void SAL_CALL setDisplay( ::sal_Int32 _display ) override;
75 // class VCLXTopWindow
78 class TOOLKIT_DLLPUBLIC VCLXTopWindow: public VCLXTopWindow_Base,
79 public VCLXContainer
81 protected:
82 virtual vcl::Window* GetWindowImpl() override;
83 virtual ::comphelper::OInterfaceContainerHelper2& GetTopWindowListenersImpl() override;
85 public:
86 VCLXTopWindow();
87 virtual ~VCLXTopWindow() override;
89 // css::uno::XInterface
90 css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override;
91 void SAL_CALL acquire() throw() override { OWeakObject::acquire(); }
92 void SAL_CALL release() throw() override { OWeakObject::release(); }
94 // css::lang::XTypeProvider
95 css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override;
96 css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override;
98 static void ImplGetPropertyIds( std::vector< sal_uInt16 > &aIds );
99 virtual void GetPropertyIds( std::vector< sal_uInt16 > &aIds ) override { return ImplGetPropertyIds( aIds ); }
103 #endif // INCLUDED_TOOLKIT_AWT_VCLXTOPWINDOW_HXX
105 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */