Fix rudimentary Emscripten Qt6 copy -> paste support
[LibreOffice.git] / forms / source / solar / component / navbarcontrol.hxx
blobe6e8cc1fe5636fb90d23f58204f5f72eaf6878b5
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 #pragma once
22 #include <formnavigation.hxx>
24 #include <com/sun/star/frame/XDispatchProviderInterception.hpp>
26 #include <toolkit/controls/unocontrol.hxx>
27 #include <toolkit/awt/vclxwindow.hxx>
28 #include <comphelper/uno3.hxx>
29 #include <cppuhelper/implbase1.hxx>
32 namespace frm
35 typedef ::cppu::ImplHelper1 < css::frame::XDispatchProviderInterception
36 > ONavigationBarControl_Base;
38 class ONavigationBarControl
39 :public UnoControl
40 ,public ONavigationBarControl_Base
42 css::uno::Reference< css::uno::XComponentContext > m_xContext;
43 public:
44 explicit ONavigationBarControl(
45 const css::uno::Reference< css::uno::XComponentContext >& _rxORB
48 protected:
49 virtual ~ONavigationBarControl() override;
51 // UNO
52 DECLARE_UNO3_AGG_DEFAULTS( ONavigationBarControl, UnoControl )
53 virtual css::uno::Any SAL_CALL queryAggregation( const css::uno::Type& _rType ) override;
55 // XControl
56 virtual void SAL_CALL createPeer( const css::uno::Reference< css::awt::XToolkit >& _rToolkit, const css::uno::Reference< css::awt::XWindowPeer >& _rParent ) override;
58 // XServiceInfo
59 virtual OUString SAL_CALL getImplementationName() override;
60 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
62 // XTypeProvider
63 DECLARE_XTYPEPROVIDER()
65 // XVclWindowPeer
66 virtual void SAL_CALL setDesignMode( sal_Bool _bOn ) override;
68 // XDispatchProviderInterception
69 virtual void SAL_CALL registerDispatchProviderInterceptor( const css::uno::Reference< css::frame::XDispatchProviderInterceptor >& Interceptor ) override;
70 virtual void SAL_CALL releaseDispatchProviderInterceptor( const css::uno::Reference< css::frame::XDispatchProviderInterceptor >& Interceptor ) override;
73 class ONavigationBarPeer final
74 :public VCLXWindow
75 ,public OFormNavigationHelper
77 public:
78 /** factory method
80 static rtl::Reference<ONavigationBarPeer> Create(
81 const css::uno::Reference< css::uno::XComponentContext >& _rxORB,
82 vcl::Window* _pParentWindow,
83 const css::uno::Reference< css::awt::XControlModel >& _rxModel
86 // XInterface
87 DECLARE_XINTERFACE( )
89 // XVclWindowPeer
90 virtual void SAL_CALL setDesignMode( sal_Bool _bOn ) override;
92 // XWindow2
93 using VCLXWindow::isEnabled;
95 private:
96 explicit ONavigationBarPeer(
97 const css::uno::Reference< css::uno::XComponentContext >& _rxORB
99 virtual ~ONavigationBarPeer() override;
101 // XTypeProvider
102 DECLARE_XTYPEPROVIDER( )
104 // XComponent
105 void SAL_CALL dispose( ) override;
107 // XVclWindowPeer
108 void SAL_CALL setProperty( const OUString& _rPropertyName, const css::uno::Any& _rValue ) override;
109 css::uno::Any SAL_CALL getProperty( const OUString& _rPropertyName ) override;
111 // XEventListener
112 virtual void SAL_CALL disposing( const css::lang::EventObject& Source ) override;
114 // OFormNavigationHelper overriables
115 virtual void interceptorsChanged( ) override;
116 virtual void featureStateChanged( sal_Int16 _nFeatureId, bool _bEnabled ) override;
117 virtual void allFeatureStatesChanged( ) override;
118 virtual void getSupportedFeatures( ::std::vector< sal_Int16 >& /* [out] */ _rFeatureIds ) override;
120 // IFeatureDispatcher overriables
121 virtual bool isEnabled( sal_Int16 _nFeatureId ) const override;
125 } // namespace frm
128 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */