LibreOffice Module cui (master)  1
align.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
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/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
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 .
18  */
19 #pragma once
20 
21 // list box indexes
22 #define ALIGNDLG_HORALIGN_STD 0
23 #define ALIGNDLG_HORALIGN_LEFT 1
24 #define ALIGNDLG_HORALIGN_CENTER 2
25 #define ALIGNDLG_HORALIGN_RIGHT 3
26 #define ALIGNDLG_HORALIGN_BLOCK 4
27 #define ALIGNDLG_HORALIGN_FILL 5
28 #define ALIGNDLG_HORALIGN_DISTRIBUTED 6
29 
30 #define ALIGNDLG_VERALIGN_STD 0
31 #define ALIGNDLG_VERALIGN_TOP 1
32 #define ALIGNDLG_VERALIGN_MID 2
33 #define ALIGNDLG_VERALIGN_BOTTOM 3
34 #define ALIGNDLG_VERALIGN_BLOCK 4
35 #define ALIGNDLG_VERALIGN_DISTRIBUTED 5
36 
37 #include <sfx2/tabdlg.hxx>
38 #include <svtools/valueset.hxx>
39 #include <svx/dialcontrol.hxx>
40 #include <svx/frmdirlbox.hxx>
41 #include <vcl/weld.hxx>
42 
44 
45 namespace svx {
46 
47 
49 {
51 
52 public:
53  virtual ~AlignmentTabPage() override;
54  static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rAttrSet );
55  explicit AlignmentTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rCoreSet);
56 
58 
59  virtual bool FillItemSet( SfxItemSet* rSet ) override;
60  virtual void Reset( const SfxItemSet* rSet ) override;
61  virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
62 
63 private:
64  void InitVsRefEgde();
65  void UpdateEnableControls();
66 
67  bool HasAlignmentChanged( const SfxItemSet& rNew, TypedWhichId<SfxEnumItemInterface> nWhich ) const;
68 
69  DECL_LINK(UpdateEnableHdl, weld::ComboBox&, void);
70  DECL_LINK(StackedClickHdl, weld::Toggleable&, void);
71  DECL_LINK(AsianModeClickHdl, weld::Toggleable&, void);
72  DECL_LINK(WrapClickHdl, weld::Toggleable&, void);
73  DECL_LINK(HyphenClickHdl, weld::Toggleable&, void);
74  DECL_LINK(ShrinkClickHdl, weld::Toggleable&, void);
75 
76 private:
82 
84 
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;
90 
91  std::unique_ptr<weld::Label> m_xFtRotate;
92  std::unique_ptr<weld::MetricSpinButton> 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;
96 
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;
102 
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;
108 
109  std::unique_ptr<weld::Widget> m_xAlignmentFrame;
110  std::unique_ptr<weld::Widget> m_xOrientFrame;
111  std::unique_ptr<weld::Widget> m_xPropertiesFrame;
112 
113  std::unique_ptr<weld::CustomWeld> m_xVsRefEdge;
114  std::unique_ptr<DialControl> m_xCtrlDial;
115  std::unique_ptr<weld::CustomWeld> m_xCtrlDialWin;
116 };
117 
118 
119 }
120 
121 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
void UpdateEnableControls()
Definition: align.cxx:697
weld::TriStateEnabled m_aHyphenState
Definition: align.hxx:80
bool HasAlignmentChanged(const SfxItemSet &rNew, TypedWhichId< SfxEnumItemInterface > nWhich) const
Definition: align.cxx:738
const SfxItemSet * pSet
std::unique_ptr< weld::Widget > m_xAlignmentFrame
Definition: align.hxx:109
std::unique_ptr< svx::FrameDirectionListBox > m_xLbFrameDir
Definition: align.hxx:101
std::unique_ptr< weld::Label > m_xFtRefEdge
Definition: align.hxx:93
DECL_LINK(UpdateEnableHdl, weld::ComboBox &, void)
std::unique_ptr< weld::Label > m_xFtVerAlign
Definition: align.hxx:88
AlignmentTabPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rCoreSet)
Definition: align.cxx:109
static const WhichRangesContainer s_pRanges
Definition: align.hxx:50
std::unique_ptr< weld::MetricSpinButton > m_xNfRotate
Definition: align.hxx:92
std::unique_ptr< weld::Label > m_xFtRotate
Definition: align.hxx:91
std::unique_ptr< weld::CheckButton > m_xBtnWrap
Definition: align.hxx:98
weld::TriStateEnabled m_aWrapState
Definition: align.hxx:79
std::unique_ptr< weld::Widget > m_xBoxDirection
Definition: align.hxx:97
std::unique_ptr< weld::CheckButton > m_xBtnHyphen
Definition: align.hxx:99
std::unique_ptr< weld::ComboBox > m_xLbVerAlign
Definition: align.hxx:89
std::unique_ptr< weld::CustomWeld > m_xCtrlDialWin
Definition: align.hxx:115
std::unique_ptr< DialControl > m_xCtrlDial
Definition: align.hxx:114
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rAttrSet)
Definition: align.cxx:175
std::unique_ptr< weld::Label > m_xFtCelLock
Definition: align.hxx:106
std::unique_ptr< weld::ComboBox > m_xLbHorAlign
Definition: align.hxx:85
std::unique_ptr< weld::Label > m_xFtABCD
Definition: align.hxx:107
std::unique_ptr< weld::CustomWeld > m_xVsRefEdge
Definition: align.hxx:113
weld::TriStateEnabled m_aAsianModeState
Definition: align.hxx:78
std::unique_ptr< weld::Label > m_xFtIndent
Definition: align.hxx:86
std::unique_ptr< weld::MetricSpinButton > m_xEdIndent
Definition: align.hxx:87
ValueSet m_aVsRefEdge
Definition: align.hxx:83
virtual void Reset(const SfxItemSet *rSet) override
Definition: align.cxx:423
std::unique_ptr< weld::Label > m_xFtTopLock
Definition: align.hxx:105
weld::TriStateEnabled m_aStackedState
Definition: align.hxx:77
static WhichRangesContainer GetRanges()
Definition: align.hxx:57
std::unique_ptr< weld::Widget > m_xOrientFrame
Definition: align.hxx:110
std::unique_ptr< weld::CheckButton > m_xBtnShrink
Definition: align.hxx:100
std::unique_ptr< weld::CheckButton > m_xCbAsianMode
Definition: align.hxx:95
weld::TriStateEnabled m_aShrinkState
Definition: align.hxx:81
virtual ~AlignmentTabPage() override
Definition: align.cxx:167
std::unique_ptr< weld::Widget > m_xPropertiesFrame
Definition: align.hxx:111
DeactivateRC
virtual bool FillItemSet(SfxItemSet *rSet) override
Definition: align.cxx:180
std::unique_ptr< weld::CheckButton > m_xCbStacked
Definition: align.hxx:94
virtual DeactivateRC DeactivatePage(SfxItemSet *pSet) override
Definition: align.cxx:669
std::unique_ptr< weld::Label > m_xFtBotLock
Definition: align.hxx:104