1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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_CUI_SOURCE_INC_DSTRIBUT_HXX
20 #define INCLUDED_CUI_SOURCE_INC_DSTRIBUT_HXX
22 #include <sfx2/tabdlg.hxx>
23 #include <svx/dstribut_enum.hxx>
24 #include <vcl/weld.hxx>
26 class SvxDistributePage
: public SfxTabPage
28 SvxDistributeHorizontal m_eDistributeHor
;
29 SvxDistributeVertical m_eDistributeVer
;
31 std::unique_ptr
<weld::RadioButton
> m_xBtnHorNone
;
32 std::unique_ptr
<weld::RadioButton
> m_xBtnHorLeft
;
33 std::unique_ptr
<weld::RadioButton
> m_xBtnHorCenter
;
34 std::unique_ptr
<weld::RadioButton
> m_xBtnHorDistance
;
35 std::unique_ptr
<weld::RadioButton
> m_xBtnHorRight
;
36 std::unique_ptr
<weld::RadioButton
> m_xBtnVerNone
;
37 std::unique_ptr
<weld::RadioButton
> m_xBtnVerTop
;
38 std::unique_ptr
<weld::RadioButton
> m_xBtnVerCenter
;
39 std::unique_ptr
<weld::RadioButton
> m_xBtnVerDistance
;
40 std::unique_ptr
<weld::RadioButton
> m_xBtnVerBottom
;
43 SvxDistributePage(weld::Container
* pPage
, weld::DialogController
* pController
, const SfxItemSet
& rInAttrs
,
44 SvxDistributeHorizontal eHor
,
45 SvxDistributeVertical eVer
);
46 virtual ~SvxDistributePage() override
;
48 virtual bool FillItemSet(SfxItemSet
*) override
;
49 virtual void Reset(const SfxItemSet
*) override
;
51 SvxDistributeHorizontal
GetDistributeHor() const { return m_eDistributeHor
; }
52 SvxDistributeVertical
GetDistributeVer() const { return m_eDistributeVer
; }
55 class SvxDistributeDialog
: public SfxSingleTabDialogController
57 SvxDistributePage
* mpPage
;
60 SvxDistributeDialog(weld::Window
* pParent
, const SfxItemSet
& rAttr
,
61 SvxDistributeHorizontal eHor
,
62 SvxDistributeVertical eVer
);
63 virtual ~SvxDistributeDialog() override
;
65 SvxDistributeHorizontal
GetDistributeHor() const { return mpPage
->GetDistributeHor(); }
66 SvxDistributeVertical
GetDistributeVer() const { return mpPage
->GetDistributeVer(); }
70 #endif // INCLUDED_CUI_SOURCE_INC_DSTRIBUT_HXX
72 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */