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_ALIGN_HXX
20 #define INCLUDED_CUI_SOURCE_INC_ALIGN_HXX
23 #define ALIGNDLG_HORALIGN_STD 0
24 #define ALIGNDLG_HORALIGN_LEFT 1
25 #define ALIGNDLG_HORALIGN_CENTER 2
26 #define ALIGNDLG_HORALIGN_RIGHT 3
27 #define ALIGNDLG_HORALIGN_BLOCK 4
28 #define ALIGNDLG_HORALIGN_FILL 5
29 #define ALIGNDLG_HORALIGN_DISTRIBUTED 6
31 #define ALIGNDLG_VERALIGN_STD 0
32 #define ALIGNDLG_VERALIGN_TOP 1
33 #define ALIGNDLG_VERALIGN_MID 2
34 #define ALIGNDLG_VERALIGN_BOTTOM 3
35 #define ALIGNDLG_VERALIGN_BLOCK 4
36 #define ALIGNDLG_VERALIGN_DISTRIBUTED 5
38 #include <sfx2/tabdlg.hxx>
39 #include <svtools/valueset.hxx>
40 #include <svx/dialcontrol.hxx>
41 #include <svx/frmdirlbox.hxx>
42 #include <vcl/weld.hxx>
47 class AlignmentTabPage
: public SfxTabPage
49 static const sal_uInt16 s_pRanges
[];
52 virtual ~AlignmentTabPage() override
;
53 static std::unique_ptr
<SfxTabPage
> Create( weld::Container
* pPage
, weld::DialogController
* pController
, const SfxItemSet
* rAttrSet
);
54 explicit AlignmentTabPage(weld::Container
* pPage
, weld::DialogController
* pController
, const SfxItemSet
& rCoreSet
);
56 static const sal_uInt16
* GetRanges() { return s_pRanges
; }
58 virtual bool FillItemSet( SfxItemSet
* rSet
) override
;
59 virtual void Reset( const SfxItemSet
* rSet
) override
;
60 virtual DeactivateRC
DeactivatePage( SfxItemSet
* pSet
) override
;
64 void UpdateEnableControls();
66 bool HasAlignmentChanged( const SfxItemSet
& rNew
, sal_uInt16 nWhich
) const;
68 DECL_LINK(UpdateEnableHdl
, weld::ComboBox
&, void);
69 DECL_LINK(StackedClickHdl
, weld::ToggleButton
&, void);
70 DECL_LINK(AsianModeClickHdl
, weld::ToggleButton
&, void);
71 DECL_LINK(WrapClickHdl
, weld::ToggleButton
&, void);
72 DECL_LINK(HyphenClickHdl
, weld::ToggleButton
&, void);
73 DECL_LINK(ShrinkClickHdl
, weld::ToggleButton
&, void);
76 weld::TriStateEnabled m_aStackedState
;
77 weld::TriStateEnabled m_aAsianModeState
;
78 weld::TriStateEnabled m_aWrapState
;
79 weld::TriStateEnabled m_aHyphenState
;
80 weld::TriStateEnabled m_aShrinkState
;
82 SvxDialControl m_aCtrlDial
;
83 SvtValueSet m_aVsRefEdge
;
85 std::unique_ptr
<weld::ComboBox
> m_xLbHorAlign
;
86 std::unique_ptr
<weld::Label
> m_xFtIndent
;
87 std::unique_ptr
<weld::MetricSpinButton
> m_xEdIndent
;
88 std::unique_ptr
<weld::Label
> m_xFtVerAlign
;
89 std::unique_ptr
<weld::ComboBox
> m_xLbVerAlign
;
91 std::unique_ptr
<weld::Label
> m_xFtRotate
;
92 std::unique_ptr
<weld::SpinButton
> m_xNfRotate
;
93 std::unique_ptr
<weld::Label
> m_xFtRefEdge
;
94 std::unique_ptr
<weld::CheckButton
> m_xCbStacked
;
95 std::unique_ptr
<weld::CheckButton
> m_xCbAsianMode
;
97 std::unique_ptr
<weld::Widget
> m_xBoxDirection
;
98 std::unique_ptr
<weld::CheckButton
> m_xBtnWrap
;
99 std::unique_ptr
<weld::CheckButton
> m_xBtnHyphen
;
100 std::unique_ptr
<weld::CheckButton
> m_xBtnShrink
;
101 std::unique_ptr
<svx::FrameDirectionListBox
> m_xLbFrameDir
;
103 // hidden labels/string
104 std::unique_ptr
<weld::Label
> m_xFtBotLock
;
105 std::unique_ptr
<weld::Label
> m_xFtTopLock
;
106 std::unique_ptr
<weld::Label
> m_xFtCelLock
;
107 std::unique_ptr
<weld::Label
> m_xFtABCD
;
109 std::unique_ptr
<weld::Widget
> m_xAlignmentFrame
;
110 std::unique_ptr
<weld::Widget
> m_xOrientFrame
;
111 std::unique_ptr
<weld::Widget
> m_xPropertiesFrame
;
113 std::unique_ptr
<weld::CustomWeld
> m_xVsRefEdge
;
114 std::unique_ptr
<weld::CustomWeld
> m_xCtrlDial
;
122 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */