lok: calc - send other views our selection in their co-ordinates.
[LibreOffice.git] / include / svx / ParaSpacingControl.hxx
bloba342f423c8763c35c9319e9e51423c28be8aa836
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 .
19 #ifndef INCLUDED_SVX_SOURCE_SIDEBAR_PARAGRAPH_PARASPACINGCONTROL_HXX
20 #define INCLUDED_SVX_SOURCE_SIDEBAR_PARAGRAPH_PARASPACINGCONTROL_HXX
22 #include <sfx2/tbxctrl.hxx>
23 #include <svx/svxdllapi.h>
24 #include <com/sun/star/ui/XContextChangeEventListener.hpp>
26 namespace com::sun::star::ui { class XContextChangeEventMultiplexer; }
27 namespace com::sun::star::ui { struct ContextChangeEventObject; }
28 namespace vcl { class Window; }
30 namespace svx {
32 class ParaULSpacingControl : public SfxToolBoxControl
34 public:
35 ParaULSpacingControl(sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx);
36 virtual ~ParaULSpacingControl() override;
38 virtual void StateChanged(sal_uInt16 nSID, SfxItemState eState,
39 const SfxPoolItem* pState) override;
40 virtual VclPtr<vcl::Window> CreateItemWindow(vcl::Window* pParent) override = 0;
43 class SVX_DLLPUBLIC ParaAboveSpacingControl final : public ParaULSpacingControl
45 public:
46 SFX_DECL_TOOLBOX_CONTROL();
48 ParaAboveSpacingControl(sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx);
49 virtual VclPtr<vcl::Window> CreateItemWindow(vcl::Window* pParent) override;
52 class SVX_DLLPUBLIC ParaBelowSpacingControl final : public ParaULSpacingControl
54 public:
55 SFX_DECL_TOOLBOX_CONTROL();
57 ParaBelowSpacingControl(sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx);
58 virtual VclPtr<vcl::Window> CreateItemWindow(vcl::Window* pParent) override;
61 class ParaLRSpacingControl : public SfxToolBoxControl,
62 public css::ui::XContextChangeEventListener
64 public:
65 ParaLRSpacingControl(sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx);
66 virtual ~ParaLRSpacingControl() override;
68 virtual void SAL_CALL dispose() override;
70 virtual void StateChanged(sal_uInt16 nSID, SfxItemState eState,
71 const SfxPoolItem* pState) override;
72 virtual VclPtr<vcl::Window> CreateItemWindow(vcl::Window* pParent) override = 0;
74 // XContextChangeEventListener
75 virtual void SAL_CALL notifyContextChangeEvent(const css::ui::ContextChangeEventObject& rEvent) override;
77 virtual ::css::uno::Any SAL_CALL queryInterface(const ::css::uno::Type& aType) override;
79 virtual void SAL_CALL acquire() throw () override;
81 virtual void SAL_CALL disposing(const ::css::lang::EventObject&) override;
83 virtual void SAL_CALL release() throw () override;
85 private:
86 css::uno::Reference<css::ui::XContextChangeEventMultiplexer> m_xMultiplexer;
89 class SVX_DLLPUBLIC ParaLeftSpacingControl final : public ParaLRSpacingControl
91 public:
92 SFX_DECL_TOOLBOX_CONTROL();
94 ParaLeftSpacingControl(sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx);
95 virtual VclPtr<vcl::Window> CreateItemWindow(vcl::Window* pParent) override;
98 class SVX_DLLPUBLIC ParaRightSpacingControl final : public ParaLRSpacingControl
100 public:
101 SFX_DECL_TOOLBOX_CONTROL();
103 ParaRightSpacingControl(sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx);
104 virtual VclPtr<vcl::Window> CreateItemWindow(vcl::Window* pParent) override;
107 class SVX_DLLPUBLIC ParaFirstLineSpacingControl final : public ParaLRSpacingControl
109 public:
110 SFX_DECL_TOOLBOX_CONTROL();
112 ParaFirstLineSpacingControl(sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx);
113 virtual VclPtr<vcl::Window> CreateItemWindow(vcl::Window* pParent) override;
118 #endif
121 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */