1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 .
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>
35 typedef ::cppu::ImplHelper1
< css::frame::XDispatchProviderInterception
36 > ONavigationBarControl_Base
;
38 class ONavigationBarControl
40 ,public ONavigationBarControl_Base
42 css::uno::Reference
< css::uno::XComponentContext
> m_xContext
;
44 explicit ONavigationBarControl(
45 const css::uno::Reference
< css::uno::XComponentContext
>& _rxORB
49 virtual ~ONavigationBarControl() override
;
52 DECLARE_UNO3_AGG_DEFAULTS( ONavigationBarControl
, UnoControl
)
53 virtual css::uno::Any SAL_CALL
queryAggregation( const css::uno::Type
& _rType
) override
;
56 virtual void SAL_CALL
createPeer( const css::uno::Reference
< css::awt::XToolkit
>& _rToolkit
, const css::uno::Reference
< css::awt::XWindowPeer
>& _rParent
) override
;
59 virtual OUString SAL_CALL
getImplementationName() override
;
60 virtual css::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames() override
;
63 DECLARE_XTYPEPROVIDER()
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
75 ,public OFormNavigationHelper
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
90 virtual void SAL_CALL
setDesignMode( sal_Bool _bOn
) override
;
93 using VCLXWindow::isEnabled
;
96 explicit ONavigationBarPeer(
97 const css::uno::Reference
< css::uno::XComponentContext
>& _rxORB
99 virtual ~ONavigationBarPeer() override
;
102 DECLARE_XTYPEPROVIDER( )
105 void SAL_CALL
dispose( ) override
;
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
;
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
;
128 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */