Version 7.6.3.2-android, tag libreoffice-7.6.3.2-android
[LibreOffice.git] / include / framework / generictoolbarcontroller.hxx
blob17aab6338ee2d6f742897d6896461f753fc9af25
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 <framework/fwkdllapi.h>
23 #include <svtools/toolboxcontroller.hxx>
24 #include <vcl/toolbox.hxx>
26 namespace framework
29 class FWK_DLLPUBLIC GenericToolbarController final : public svt::ToolboxController
31 public:
32 GenericToolbarController( const css::uno::Reference< css::uno::XComponentContext >& rxContext,
33 const css::uno::Reference< css::frame::XFrame >& rFrame,
34 ToolBox* pToolBar,
35 ToolBoxItemId nID,
36 const OUString& aCommand );
37 GenericToolbarController( const css::uno::Reference< css::uno::XComponentContext >& rxContext,
38 const css::uno::Reference< css::frame::XFrame >& rFrame,
39 weld::Toolbar& rToolBar,
40 const OUString& aCommand );
41 virtual ~GenericToolbarController() override;
43 // XComponent
44 virtual void SAL_CALL dispose() override;
46 // XToolbarController
47 virtual void SAL_CALL execute( sal_Int16 KeyModifier ) override;
49 // XStatusListener
50 virtual void SAL_CALL statusChanged( const css::frame::FeatureStateEvent& Event ) override;
52 DECL_DLLPRIVATE_STATIC_LINK( GenericToolbarController, ExecuteHdl_Impl, void*, void );
54 struct ExecuteInfo
56 css::uno::Reference< css::frame::XDispatch > xDispatch;
57 css::util::URL aTargetURL;
58 css::uno::Sequence< css::beans::PropertyValue > aArgs;
61 private:
62 VclPtr<ToolBox> m_xToolbar;
63 ToolBoxItemId m_nID;
64 bool m_bEnumCommand : 1,
65 m_bMirrored : 1,
66 m_bMadeInvisible : 1;
67 OUString m_aEnumCommand;
70 class FWK_DLLPUBLIC ImageOrientationController final : public svt::ToolboxController
72 public:
73 ImageOrientationController(const css::uno::Reference<css::uno::XComponentContext>& rContext,
74 const css::uno::Reference<css::frame::XFrame>& rFrame,
75 const css::uno::Reference<css::awt::XWindow>& rParentWindow,
76 const OUString& rModuleName);
78 // XComponent
79 void SAL_CALL dispose() override;
81 // XStatusListener
82 void SAL_CALL statusChanged(const css::frame::FeatureStateEvent& rEvent) override;
84 DECL_LINK(WindowEventListener, VclWindowEvent&, void);
85 private:
86 Degree10 m_nRotationAngle;
87 bool m_bMirrored;
92 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */