Version 7.6.3.2-android, tag libreoffice-7.6.3.2-android
[LibreOffice.git] / svx / source / sidebar / paragraph / ParaSpacingWindow.hxx
blob139ae1b8f00fc03e4207d038bcb136f44f416a04
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 #pragma once
21 #include <editeng/ulspitem.hxx>
22 #include <vcl/EnumContext.hxx>
23 #include <vcl/InterimItemWindow.hxx>
24 #include <svx/relfld.hxx>
26 using namespace com::sun::star;
28 namespace svx
30 class ParaULSpacingWindow : public InterimItemWindow
32 public:
33 virtual ~ParaULSpacingWindow() override;
34 virtual void dispose() override;
36 void SetValue(const SvxULSpaceItem* pItem);
37 void SetUnit(FieldUnit eUnit);
39 protected:
40 ParaULSpacingWindow(vcl::Window* pParent);
42 std::optional<SvxRelativeField> m_xAboveSpacing;
43 std::optional<SvxRelativeField> m_xBelowSpacing;
44 std::unique_ptr<weld::Container> m_xAboveContainer;
45 std::unique_ptr<weld::Container> m_xBelowContainer;
47 MapUnit m_eUnit;
49 DECL_LINK(ModifySpacingHdl, weld::MetricSpinButton&, void);
52 class ParaAboveSpacingWindow : public ParaULSpacingWindow
54 public:
55 explicit ParaAboveSpacingWindow(vcl::Window* pParent);
58 class ParaBelowSpacingWindow : public ParaULSpacingWindow
60 public:
61 explicit ParaBelowSpacingWindow(vcl::Window* pParent);
64 class ParaLRSpacingWindow : public InterimItemWindow
66 public:
67 virtual ~ParaLRSpacingWindow() override;
68 virtual void dispose() override;
70 void SetValue(SfxItemState eState, const SfxPoolItem* pState);
71 void SetUnit(FieldUnit eUnit);
72 void SetContext(const vcl::EnumContext& eContext);
74 protected:
75 ParaLRSpacingWindow(vcl::Window* pParent);
77 std::optional<SvxRelativeField> m_xBeforeSpacing;
78 std::optional<SvxRelativeField> m_xAfterSpacing;
79 std::optional<SvxRelativeField> m_xFLSpacing;
80 std::unique_ptr<weld::Container> m_xBeforeContainer;
81 std::unique_ptr<weld::Container> m_xAfterContainer;
82 std::unique_ptr<weld::Container> m_xFirstLineContainer;
84 MapUnit m_eUnit;
86 vcl::EnumContext m_aContext;
88 DECL_LINK(ModifySpacingHdl, weld::MetricSpinButton&, void);
91 class ParaLeftSpacingWindow : public ParaLRSpacingWindow
93 public:
94 explicit ParaLeftSpacingWindow(vcl::Window* pParent);
97 class ParaRightSpacingWindow : public ParaLRSpacingWindow
99 public:
100 explicit ParaRightSpacingWindow(vcl::Window* pParent);
103 class ParaFirstLineSpacingWindow : public ParaLRSpacingWindow
105 public:
106 explicit ParaFirstLineSpacingWindow(vcl::Window* pParent);
110 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */