LibreOffice Module cui (master)  1
labdlg.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_LABDLG_HXX
20 #define INCLUDED_CUI_SOURCE_INC_LABDLG_HXX
21 
22 #include <svtools/valueset.hxx>
23 #include <sfx2/tabdlg.hxx>
24 #include <svx/sxctitm.hxx>
25 #include <svx/sxcecitm.hxx>
26 #include <svx/anchorid.hxx>
27 #include <vcl/image.hxx>
28 
29 class SdrView;
30 
31 // class SvxCaptionTabPage -----------------------------------------------
32 
33 const sal_uInt16 CAPTYPE_BITMAPS_COUNT = 3;
34 
36 {
37 private:
38  static const sal_uInt16 pCaptionRanges[];
39 
41 
42  std::vector<OUString> m_aStrHorzList;
43  std::vector<OUString> m_aStrVertList;
44 
46  sal_Int32 nGap;
48  bool bEscRel;
49  sal_Int32 nEscAbs;
50  sal_Int32 nEscRel;
51  sal_Int32 nLineLen;
53 
54  sal_uInt16 nPosition;
55  sal_uInt16 nExtension;
56 
58  const SdrView* pView;
59 
60  std::unique_ptr<weld::MetricSpinButton> m_xMF_SPACING;
61  std::unique_ptr<weld::ComboBox> m_xLB_EXTENSION;
62  std::unique_ptr<weld::Label> m_xFT_BYFT;
63  std::unique_ptr<weld::MetricSpinButton> m_xMF_BY;
64  std::unique_ptr<weld::Label> m_xFT_POSITIONFT;
65  std::unique_ptr<weld::ComboBox> m_xLB_POSITION;
66  std::unique_ptr<weld::ComboBox> m_xLineTypes;
67  std::unique_ptr<weld::Label> m_xFT_LENGTHFT;
68  std::unique_ptr<weld::MetricSpinButton> m_xMF_LENGTH;
69  std::unique_ptr<weld::CheckButton> m_xCB_OPTIMAL;
70  std::unique_ptr<SvtValueSet> m_xCT_CAPTTYPE;
71  std::unique_ptr<weld::CustomWeld> m_xCT_CAPTTYPEWin;
72 
73  void SetupExtension_Impl( sal_uInt16 nType );
74  void SetupType_Impl( SdrCaptionType nType );
75  DECL_LINK(ExtensionSelectHdl_Impl, weld::ComboBox&, void);
76  DECL_LINK(PositionSelectHdl_Impl, weld::ComboBox&, void);
77  DECL_LINK(LineOptHdl_Impl, weld::ToggleButton&, void);
78  DECL_LINK(SelectCaptTypeHdl_Impl, SvtValueSet*, void);
79 
80 public:
81  SvxCaptionTabPage(TabPageParent pParent, const SfxItemSet& rInAttrs);
82  virtual ~SvxCaptionTabPage() override;
83  virtual void dispose() override;
84 
86  static const sal_uInt16* GetRanges() { return pCaptionRanges; }
87 
88  virtual bool FillItemSet( SfxItemSet* ) override;
89  virtual void Reset( const SfxItemSet * ) override;
90  void Construct();
91  void SetView( const SdrView* pSdrView )
92  { pView = pSdrView; }
93 
94  virtual void DataChanged( const DataChangedEvent& rDCEvt ) override;
95  void FillValueSet();
96 };
97 
98 // class SvxCaptionTabDialog ---------------------------------------------
101 {
102 private:
103  const SdrView* pView;
105 
107 
108  virtual void PageCreated(const OString& rId, SfxTabPage &rPage) override;
109 
110 public:
111  SvxCaptionTabDialog(weld::Window* pParent, const SdrView* pView,
112  SvxAnchorIds nAnchorTypes);
113 
116 };
117 
118 
119 #endif // INCLUDED_CUI_SOURCE_INC_LABDLG_HXX
120 
121 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
std::unique_ptr< weld::MetricSpinButton > m_xMF_SPACING
Definition: labdlg.hxx:60
void FillValueSet()
Definition: labdlg.cxx:471
SvxCaptionTabDialog(weld::Window *pParent, const SdrView *pView, SvxAnchorIds nAnchorTypes)
Definition: labdlg.cxx:478
std::unique_ptr< weld::Label > m_xFT_LENGTHFT
Definition: labdlg.hxx:67
const sal_uInt16 CAPTYPE_BITMAPS_COUNT
Definition: labdlg.hxx:33
static VclPtr< SfxTabPage > Create(TabPageParent, const SfxItemSet *)
Definition: labdlg.cxx:345
std::unique_ptr< SvtValueSet > m_xCT_CAPTTYPE
Definition: labdlg.hxx:70
std::unique_ptr< weld::Label > m_xFT_BYFT
Definition: labdlg.hxx:62
SvxAnchorIds nAnchorCtrls
Definition: labdlg.hxx:104
std::unique_ptr< weld::MetricSpinButton > m_xMF_BY
Definition: labdlg.hxx:63
sal_Int32 nGap
Definition: labdlg.hxx:46
std::unique_ptr< weld::Label > m_xFT_POSITIONFT
Definition: labdlg.hxx:64
std::unique_ptr< weld::MetricSpinButton > m_xMF_LENGTH
Definition: labdlg.hxx:68
virtual void Reset(const SfxItemSet *) override
Definition: labdlg.cxx:228
SdrCaptionEscDir
void SetView(const SdrView *pSdrView)
Definition: labdlg.hxx:91
Link< SvxSwFrameValidation &, void > aValidateLink
Definition: labdlg.hxx:106
DECL_LINK(ExtensionSelectHdl_Impl, weld::ComboBox &, void)
std::vector< OUString > m_aStrVertList
Definition: labdlg.hxx:43
virtual bool FillItemSet(SfxItemSet *) override
Definition: labdlg.cxx:157
std::unique_ptr< weld::CheckButton > m_xCB_OPTIMAL
Definition: labdlg.hxx:69
void SetupExtension_Impl(sal_uInt16 nType)
Definition: labdlg.cxx:351
virtual void dispose() override
Definition: labdlg.cxx:144
sal_uInt16 nExtension
Definition: labdlg.hxx:55
SdrCaptionType
SvxCaptionTabPage(TabPageParent pParent, const SfxItemSet &rInAttrs)
Definition: labdlg.cxx:73
void SetValidateFramePosLink(const Link< SvxSwFrameValidation &, void > &rLink)
link for the Writer to validate positions
Definition: labdlg.cxx:528
const SdrView * pView
Definition: labdlg.hxx:103
sal_Int32 nEscAbs
Definition: labdlg.hxx:49
void Construct()
Definition: labdlg.cxx:151
virtual void PageCreated(const OString &rId, SfxTabPage &rPage) override
Definition: labdlg.cxx:503
std::unique_ptr< weld::ComboBox > m_xLB_EXTENSION
Definition: labdlg.hxx:61
void SetupType_Impl(SdrCaptionType nType)
Definition: labdlg.cxx:445
sal_Int32 nLineLen
Definition: labdlg.hxx:51
SdrCaptionType nCaptionType
Definition: labdlg.hxx:45
std::vector< OUString > m_aStrHorzList
Definition: labdlg.hxx:42
static const sal_uInt16 * GetRanges()
Definition: labdlg.hxx:86
SvxAnchorIds
SdrCaptionEscDir nEscDir
Definition: labdlg.hxx:47
std::unique_ptr< weld::CustomWeld > m_xCT_CAPTTYPEWin
Definition: labdlg.hxx:71
std::unique_ptr< weld::ComboBox > m_xLineTypes
Definition: labdlg.hxx:66
const SdrView * pView
Definition: labdlg.hxx:58
static const sal_uInt16 pCaptionRanges[]
Definition: labdlg.hxx:38
std::unique_ptr< weld::ComboBox > m_xLB_POSITION
Definition: labdlg.hxx:65
Image m_aBmpCapTypes[CAPTYPE_BITMAPS_COUNT]
Definition: labdlg.hxx:40
virtual ~SvxCaptionTabPage() override
Definition: labdlg.cxx:139
sal_uInt16 nPosition
Definition: labdlg.hxx:54
sal_Int32 nEscRel
Definition: labdlg.hxx:50
virtual void DataChanged(const DataChangedEvent &rDCEvt) override
Definition: labdlg.cxx:464
const SfxItemSet & rOutAttrs
Definition: labdlg.hxx:57