Version 6.1.4.1, tag libreoffice-6.1.4.1
[LibreOffice.git] / chart2 / source / controller / inc / ChartToolbarController.hxx
blobad7d45ef5ba756342ee8fb117693782c1b4093be
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/.
8 */
10 #ifndef INCLUDED_CHART2_SOURCE_CONTROLLER_INC_CHARTTOOLBARCONTROLLER_HXX
11 #define INCLUDED_CHART2_SOURCE_CONTROLLER_INC_CHARTTOOLBARCONTROLLER_HXX
13 #include <cppuhelper/compbase.hxx>
14 #include <cppuhelper/basemutex.hxx>
16 #include <com/sun/star/frame/XToolbarController.hpp>
17 #include <com/sun/star/frame/XStatusListener.hpp>
18 #include <com/sun/star/util/XUpdatable.hpp>
19 #include <com/sun/star/lang/XInitialization.hpp>
20 #include <com/sun/star/lang/XServiceInfo.hpp>
21 #include <com/sun/star/awt/XWindow.hpp>
22 #include <com/sun/star/frame/XFramesSupplier.hpp>
24 namespace chart {
26 typedef cppu::WeakComponentImplHelper<
27 css::frame::XToolbarController, css::frame::XStatusListener,
28 css::util::XUpdatable, css::lang::XInitialization,
29 css::lang::XServiceInfo> ChartToolbarControllerBase;
31 class ChartToolbarController : private cppu::BaseMutex,
32 public ChartToolbarControllerBase
34 public:
35 ChartToolbarController(const css::uno::Sequence<css::uno::Any>& rProperties);
36 virtual ~ChartToolbarController() override;
38 ChartToolbarController(const ChartToolbarController&) = delete;
39 const ChartToolbarController& operator=(const ChartToolbarController&) = delete;
41 // XToolbarContoller
42 virtual void SAL_CALL execute(sal_Int16 nKeyModifier) override;
44 virtual void SAL_CALL click() override;
46 virtual void SAL_CALL doubleClick() override;
48 virtual css::uno::Reference<css::awt::XWindow> SAL_CALL createPopupWindow() override;
50 virtual css::uno::Reference<css::awt::XWindow> SAL_CALL
51 createItemWindow(const css::uno::Reference<css::awt::XWindow>& rParent) override;
53 // XServiceInfo
54 virtual OUString SAL_CALL getImplementationName() override;
56 virtual sal_Bool SAL_CALL supportsService(OUString const & ServiceName) override;
58 virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override;
60 // XStatusListener
61 virtual void SAL_CALL statusChanged(const css::frame::FeatureStateEvent& rEvent) override;
63 // XEventListener
64 virtual void SAL_CALL disposing(const css::lang::EventObject& rSource) override;
66 // XInitialization
67 virtual void SAL_CALL initialize(const css::uno::Sequence<css::uno::Any>& rAny) override;
69 // XUpdatable
70 virtual void SAL_CALL update() override;
72 using cppu::WeakComponentImplHelperBase::disposing;
74 private:
76 css::uno::Reference<css::frame::XFramesSupplier> mxFramesSupplier;
81 #endif
83 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */