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 #ifndef INCLUDED_CUI_SOURCE_INC_ALIGN_HXX
20 #define INCLUDED_CUI_SOURCE_INC_ALIGN_HXX
21 
22 // list box indexes
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
30 
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
37 
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>
43 
44 namespace svx {
45 
46 
48 {
50  friend class VclPtr<AlignmentTabPage>;
51  static const sal_uInt16 s_pRanges[];
52 
53 public:
54  virtual ~AlignmentTabPage() override;
55  virtual void dispose() override;
56 
57  static VclPtr<SfxTabPage> Create( TabPageParent pParent, const SfxItemSet* rAttrSet );
58  static const sal_uInt16* GetRanges() { return s_pRanges; }
59 
60  virtual bool FillItemSet( SfxItemSet* rSet ) override;
61  virtual void Reset( const SfxItemSet* rSet ) override;
62  virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
63  virtual void DataChanged( const DataChangedEvent& rDCEvt ) override;
64 
65 private:
66  explicit AlignmentTabPage(TabPageParent pParent, const SfxItemSet& rCoreSet);
67 
68  void InitVsRefEgde();
69  void UpdateEnableControls();
70 
71  bool HasAlignmentChanged( const SfxItemSet& rNew, sal_uInt16 nWhich ) const;
72 
73  DECL_LINK(UpdateEnableHdl, weld::ComboBox&, void);
74  DECL_LINK(StackedClickHdl, weld::ToggleButton&, void);
75  DECL_LINK(AsianModeClickHdl, weld::ToggleButton&, void);
76  DECL_LINK(WrapClickHdl, weld::ToggleButton&, void);
77  DECL_LINK(HyphenClickHdl, weld::ToggleButton&, void);
78  DECL_LINK(ShrinkClickHdl, weld::ToggleButton&, void);
79 
80 private:
86 
89 
90  std::unique_ptr<weld::ComboBox> m_xLbHorAlign;
91  std::unique_ptr<weld::Label> m_xFtIndent;
92  std::unique_ptr<weld::MetricSpinButton> m_xEdIndent;
93  std::unique_ptr<weld::Label> m_xFtVerAlign;
94  std::unique_ptr<weld::ComboBox> m_xLbVerAlign;
95 
96  std::unique_ptr<weld::Label> m_xFtRotate;
97  std::unique_ptr<weld::SpinButton> m_xNfRotate;
98  std::unique_ptr<weld::Label> m_xFtRefEdge;
99  std::unique_ptr<weld::CheckButton> m_xCbStacked;
100  std::unique_ptr<weld::CheckButton> m_xCbAsianMode;
101 
102  std::unique_ptr<weld::Widget> m_xBoxDirection;
103  std::unique_ptr<weld::CheckButton> m_xBtnWrap;
104  std::unique_ptr<weld::CheckButton> m_xBtnHyphen;
105  std::unique_ptr<weld::CheckButton> m_xBtnShrink;
106  std::unique_ptr<svx::FrameDirectionListBox> m_xLbFrameDir;
107 
108  // hidden labels/string
109  std::unique_ptr<weld::Label> m_xFtBotLock;
110  std::unique_ptr<weld::Label> m_xFtTopLock;
111  std::unique_ptr<weld::Label> m_xFtCelLock;
112  std::unique_ptr<weld::Label> m_xFtABCD;
113 
114  std::unique_ptr<weld::Widget> m_xAlignmentFrame;
115  std::unique_ptr<weld::Widget> m_xOrientFrame;
116  std::unique_ptr<weld::Widget> m_xPropertiesFrame;
117 
118  std::unique_ptr<weld::CustomWeld> m_xVsRefEdge;
119  std::unique_ptr<weld::CustomWeld> m_xCtrlDial;
120 };
121 
122 
123 }
124 
125 #endif
126 
127 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
void UpdateEnableControls()
Definition: align.cxx:625
SvxDialControl m_aCtrlDial
Definition: align.hxx:87
weld::TriStateEnabled m_aHyphenState
Definition: align.hxx:84
const SfxItemSet * pSet
std::unique_ptr< weld::Widget > m_xAlignmentFrame
Definition: align.hxx:114
std::unique_ptr< svx::FrameDirectionListBox > m_xLbFrameDir
Definition: align.hxx:106
std::unique_ptr< weld::Label > m_xFtRefEdge
Definition: align.hxx:98
DECL_LINK(UpdateEnableHdl, weld::ComboBox &, void)
static const sal_uInt16 s_pRanges[]
Definition: align.hxx:51
std::unique_ptr< weld::Label > m_xFtVerAlign
Definition: align.hxx:93
std::unique_ptr< weld::Label > m_xFtRotate
Definition: align.hxx:96
std::unique_ptr< weld::CheckButton > m_xBtnWrap
Definition: align.hxx:103
weld::TriStateEnabled m_aWrapState
Definition: align.hxx:83
std::unique_ptr< weld::Widget > m_xBoxDirection
Definition: align.hxx:102
std::unique_ptr< weld::CheckButton > m_xBtnHyphen
Definition: align.hxx:104
std::unique_ptr< weld::ComboBox > m_xLbVerAlign
Definition: align.hxx:94
std::unique_ptr< weld::SpinButton > m_xNfRotate
Definition: align.hxx:97
AlignmentTabPage(TabPageParent pParent, const SfxItemSet &rCoreSet)
Definition: align.cxx:107
std::unique_ptr< weld::Label > m_xFtCelLock
Definition: align.hxx:111
std::unique_ptr< weld::CustomWeld > m_xCtrlDial
Definition: align.hxx:119
std::unique_ptr< weld::ComboBox > m_xLbHorAlign
Definition: align.hxx:90
std::unique_ptr< weld::Label > m_xFtABCD
Definition: align.hxx:112
bool HasAlignmentChanged(const SfxItemSet &rNew, sal_uInt16 nWhich) const
Definition: align.cxx:666
std::unique_ptr< weld::CustomWeld > m_xVsRefEdge
Definition: align.hxx:118
weld::TriStateEnabled m_aAsianModeState
Definition: align.hxx:82
static const sal_uInt16 * GetRanges()
Definition: align.hxx:58
std::unique_ptr< weld::Label > m_xFtIndent
Definition: align.hxx:91
virtual void DataChanged(const DataChangedEvent &rDCEvt) override
Definition: align.cxx:595
std::unique_ptr< weld::MetricSpinButton > m_xEdIndent
Definition: align.hxx:92
virtual void Reset(const SfxItemSet *rSet) override
Definition: align.cxx:360
std::unique_ptr< weld::Label > m_xFtTopLock
Definition: align.hxx:110
weld::TriStateEnabled m_aStackedState
Definition: align.hxx:81
std::unique_ptr< weld::Widget > m_xOrientFrame
Definition: align.hxx:115
std::unique_ptr< weld::CheckButton > m_xBtnShrink
Definition: align.hxx:105
static VclPtr< SfxTabPage > Create(TabPageParent pParent, const SfxItemSet *rAttrSet)
Definition: align.cxx:177
std::unique_ptr< weld::CheckButton > m_xCbAsianMode
Definition: align.hxx:100
SvtValueSet m_aVsRefEdge
Definition: align.hxx:88
weld::TriStateEnabled m_aShrinkState
Definition: align.hxx:85
virtual ~AlignmentTabPage() override
Definition: align.cxx:164
std::unique_ptr< weld::Widget > m_xPropertiesFrame
Definition: align.hxx:116
DeactivateRC
virtual bool FillItemSet(SfxItemSet *rSet) override
Definition: align.cxx:182
std::unique_ptr< weld::CheckButton > m_xCbStacked
Definition: align.hxx:99
virtual DeactivateRC DeactivatePage(SfxItemSet *pSet) override
Definition: align.cxx:588
virtual void DeactivatePage()
std::unique_ptr< weld::Label > m_xFtBotLock
Definition: align.hxx:109
virtual void dispose() override
Definition: align.cxx:169