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_TOOLKIT_AWT_VCLXTOPWINDOW_HXX
21 #define INCLUDED_TOOLKIT_AWT_VCLXTOPWINDOW_HXX
22 
23 #include <com/sun/star/awt/XSystemDependentWindowPeer.hpp>
24 #include <com/sun/star/awt/XTopWindow2.hpp>
25 #include <cppuhelper/weak.hxx>
26 
27 #include <cppuhelper/implbase2.hxx>
28 
29 #include <awt/vclxcontainer.hxx>
30 
31 namespace com::sun::star::awt { class XMenuBar; }
32 
33 typedef ::cppu::ImplHelper2 <   css::awt::XTopWindow2, css::awt::XSystemDependentWindowPeer
34                             >   VCLXTopWindow_XBase;
35 
36 
37 class VCLXTopWindow: public VCLXTopWindow_XBase,
38                      public VCLXContainer
39 {
40 public:
41     VCLXTopWindow();
42     virtual ~VCLXTopWindow() override;
43 
44     // css::uno::XInterface
45     css::uno::Any  SAL_CALL queryInterface( const css::uno::Type & rType ) override;
acquire()46     void SAL_CALL acquire() noexcept override  { OWeakObject::acquire(); }
release()47     void SAL_CALL release() noexcept override  { OWeakObject::release(); }
48 
49     // css::lang::XTypeProvider
50     css::uno::Sequence< css::uno::Type >  SAL_CALL getTypes() override;
51     css::uno::Sequence< sal_Int8 >                     SAL_CALL getImplementationId() override;
52 
53     // css::awt::XSystemDependentWindowPeer
54     css::uno::Any SAL_CALL getWindowHandle( const css::uno::Sequence< sal_Int8 >& ProcessId, sal_Int16 SystemType ) override;
55 
56     // css::awt::XTopWindow
57     void SAL_CALL addTopWindowListener( const css::uno::Reference< css::awt::XTopWindowListener >& rxListener ) override;
58     void SAL_CALL removeTopWindowListener( const css::uno::Reference< css::awt::XTopWindowListener >& rxListener ) override;
59     void SAL_CALL toFront() override;
60     void SAL_CALL toBack() override;
61     void SAL_CALL setMenuBar( const css::uno::Reference< css::awt::XMenuBar >& xMenu ) override;
62 
63     // XTopWindow2
64     virtual sal_Bool SAL_CALL getIsMaximized() override;
65     virtual void SAL_CALL setIsMaximized( sal_Bool _ismaximized ) override;
66     virtual sal_Bool SAL_CALL getIsMinimized() override;
67     virtual void SAL_CALL setIsMinimized( sal_Bool _isminimized ) override;
68     virtual ::sal_Int32 SAL_CALL getDisplay() override;
69     virtual void SAL_CALL setDisplay( ::sal_Int32 _display ) override;
70 
71     static void     ImplGetPropertyIds( std::vector< sal_uInt16 > &aIds );
GetPropertyIds(std::vector<sal_uInt16> & aIds)72     virtual void    GetPropertyIds( std::vector< sal_uInt16 > &aIds ) override { return ImplGetPropertyIds( aIds ); }
73 };
74 
75 
76 #endif // INCLUDED_TOOLKIT_AWT_VCLXTOPWINDOW_HXX
77 
78 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
79