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_LABDLG_HXX
20 #define INCLUDED_CUI_SOURCE_INC_LABDLG_HXX
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>
31 // class SvxCaptionTabPage -----------------------------------------------
33 const sal_uInt16 CAPTYPE_BITMAPS_COUNT
= 3;
35 class SvxCaptionTabPage
: public SfxTabPage
38 static const sal_uInt16 pCaptionRanges
[];
40 Image m_aBmpCapTypes
[CAPTYPE_BITMAPS_COUNT
];
42 std::vector
<OUString
> m_aStrHorzList
;
43 std::vector
<OUString
> m_aStrVertList
;
45 SdrCaptionType nCaptionType
;
47 SdrCaptionEscDir nEscDir
;
55 sal_uInt16 nExtension
;
57 const SfxItemSet
& rOutAttrs
;
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
;
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);
81 SvxCaptionTabPage(weld::Container
* pPage
, weld::DialogController
* pController
, const SfxItemSet
& rInAttrs
);
82 virtual ~SvxCaptionTabPage() override
;
84 static std::unique_ptr
<SfxTabPage
> Create( weld::Container
* pPage
, weld::DialogController
* pController
, const SfxItemSet
* );
85 static const sal_uInt16
* GetRanges() { return pCaptionRanges
; }
87 virtual bool FillItemSet( SfxItemSet
* ) override
;
88 virtual void Reset( const SfxItemSet
* ) override
;
90 void SetView( const SdrView
* pSdrView
)
96 // class SvxCaptionTabDialog ---------------------------------------------
97 struct SvxSwFrameValidation
;
98 class SvxCaptionTabDialog
: public SfxTabDialogController
101 const SdrView
* pView
;
102 SvxAnchorIds nAnchorCtrls
;
104 Link
<SvxSwFrameValidation
&,void> aValidateLink
;
106 virtual void PageCreated(const OString
& rId
, SfxTabPage
&rPage
) override
;
109 SvxCaptionTabDialog(weld::Window
* pParent
, const SdrView
* pView
,
110 SvxAnchorIds nAnchorTypes
);
112 /// link for the Writer to validate positions
113 void SetValidateFramePosLink( const Link
<SvxSwFrameValidation
&,void>& rLink
);
117 #endif // INCLUDED_CUI_SOURCE_INC_LABDLG_HXX
119 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */