Version 5.4.3.2, tag libreoffice-5.4.3.2
[LibreOffice.git] / include / svx / ParaSpacingControl.hxx
blobcefcc81dee302d5f771d918b565ed2b659d0ecbb
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 <vcl/window.hxx>
25 #include <com/sun/star/ui/XContextChangeEventListener.hpp>
26 #include <com/sun/star/ui/ContextChangeEventMultiplexer.hpp>
27 #include <com/sun/star/ui/XContextChangeEventMultiplexer.hpp>
29 namespace svx {
31 class SVX_DLLPUBLIC ParaULSpacingControl : public SfxToolBoxControl
33 public:
34 SFX_DECL_TOOLBOX_CONTROL();
36 ParaULSpacingControl(sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx);
37 virtual ~ParaULSpacingControl() override;
39 virtual void StateChanged(sal_uInt16 nSID, SfxItemState eState,
40 const SfxPoolItem* pState) override;
41 virtual VclPtr<vcl::Window> CreateItemWindow(vcl::Window* pParent) override = 0;
44 class SVX_DLLPUBLIC ParaAboveSpacingControl : public ParaULSpacingControl
46 public:
47 SFX_DECL_TOOLBOX_CONTROL();
49 ParaAboveSpacingControl(sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx);
50 virtual VclPtr<vcl::Window> CreateItemWindow(vcl::Window* pParent) override;
53 class SVX_DLLPUBLIC ParaBelowSpacingControl : public ParaULSpacingControl
55 public:
56 SFX_DECL_TOOLBOX_CONTROL();
58 ParaBelowSpacingControl(sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx);
59 virtual VclPtr<vcl::Window> CreateItemWindow(vcl::Window* pParent) override;
62 class SVX_DLLPUBLIC ParaLRSpacingControl : public SfxToolBoxControl,
63 public css::ui::XContextChangeEventListener
65 public:
66 SFX_DECL_TOOLBOX_CONTROL();
68 ParaLRSpacingControl(sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx);
69 virtual ~ParaLRSpacingControl() override;
71 virtual void SAL_CALL dispose() override;
73 virtual void StateChanged(sal_uInt16 nSID, SfxItemState eState,
74 const SfxPoolItem* pState) override;
75 virtual VclPtr<vcl::Window> CreateItemWindow(vcl::Window* pParent) override = 0;
77 // XContextChangeEventListener
78 virtual void SAL_CALL notifyContextChangeEvent(const css::ui::ContextChangeEventObject& rEvent) override;
80 virtual ::css::uno::Any SAL_CALL queryInterface(const ::css::uno::Type& aType) override;
82 virtual void SAL_CALL acquire() throw () override;
84 virtual void SAL_CALL disposing(const ::css::lang::EventObject&) override;
86 virtual void SAL_CALL release() throw () override;
88 private:
89 css::uno::Reference<css::ui::XContextChangeEventMultiplexer> m_xMultiplexer;
92 class SVX_DLLPUBLIC ParaLeftSpacingControl : public ParaLRSpacingControl
94 public:
95 SFX_DECL_TOOLBOX_CONTROL();
97 ParaLeftSpacingControl(sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx);
98 virtual VclPtr<vcl::Window> CreateItemWindow(vcl::Window* pParent) override;
101 class SVX_DLLPUBLIC ParaRightSpacingControl : public ParaLRSpacingControl
103 public:
104 SFX_DECL_TOOLBOX_CONTROL();
106 ParaRightSpacingControl(sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx);
107 virtual VclPtr<vcl::Window> CreateItemWindow(vcl::Window* pParent) override;
110 class SVX_DLLPUBLIC ParaFirstLineSpacingControl : public ParaLRSpacingControl
112 public:
113 SFX_DECL_TOOLBOX_CONTROL();
115 ParaFirstLineSpacingControl(sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx);
116 virtual VclPtr<vcl::Window> CreateItemWindow(vcl::Window* pParent) override;
121 #endif
124 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */