Line data Source code
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 <vcl/field.hxx>
23 : #include <vcl/lstbox.hxx>
24 : #include <vcl/fixed.hxx>
25 : #include <svtools/valueset.hxx>
26 : #include <sfx2/tabdlg.hxx>
27 : class SdrView;
28 :
29 : // class SvxCaptionTabPage -----------------------------------------------
30 :
31 : const sal_uInt16 CAPTYPE_BITMAPS_COUNT = 3;
32 :
33 0 : class SvxCaptionTabPage : public SfxTabPage
34 : {
35 : private:
36 : ValueSet* m_pCT_CAPTTYPE;
37 : MetricField* m_pMF_ABSTAND;
38 : ListBox* m_pLB_ANSATZ;
39 : FixedText* m_pFT_UM;
40 : MetricField* m_pMF_ANSATZ;
41 : FixedText* m_pFT_ANSATZ_REL;
42 : ListBox* m_pLB_ANSATZ_REL;
43 : FixedText* m_pFT_LAENGE;
44 : MetricField* m_pMF_LAENGE;
45 : CheckBox* m_pCB_LAENGE;
46 :
47 : Image m_aBmpCapTypes[CAPTYPE_BITMAPS_COUNT];
48 :
49 : std::vector<OUString> m_aStrHorzList;
50 : std::vector<OUString> m_aStrVertList;
51 : std::vector<OUString> m_aLineTypes;
52 :
53 : short nCaptionType;
54 : sal_Int32 nGap;
55 : short nEscDir;
56 : sal_Bool bEscRel;
57 : sal_Int32 nEscAbs;
58 : sal_Int32 nEscRel;
59 : sal_Int32 nLineLen;
60 : sal_Bool bFitLineLen;
61 :
62 : sal_uInt16 nAnsatzRelPos;
63 : sal_uInt16 nAnsatzTypePos;
64 :
65 : void SetupAnsatz_Impl( sal_uInt16 nType );
66 : void SetupType_Impl( sal_uInt16 nType );
67 : DECL_LINK( AnsatzSelectHdl_Impl, ListBox * );
68 : DECL_LINK( AnsatzRelSelectHdl_Impl, ListBox * );
69 : DECL_LINK( LineOptHdl_Impl, Button * );
70 : DECL_LINK( SelectCaptTypeHdl_Impl, void * );
71 :
72 : const SfxItemSet& rOutAttrs;
73 : const SdrView* pView;
74 :
75 : public:
76 : SvxCaptionTabPage( Window* pParent, const SfxItemSet& rInAttrs );
77 :
78 : static SfxTabPage* Create( Window*, const SfxItemSet& );
79 : static sal_uInt16* GetRanges();
80 :
81 : virtual bool FillItemSet( SfxItemSet& ) SAL_OVERRIDE;
82 : virtual void Reset( const SfxItemSet & ) SAL_OVERRIDE;
83 : void Construct();
84 0 : void SetView( const SdrView* pSdrView )
85 0 : { pView = pSdrView; }
86 :
87 : virtual void DataChanged( const DataChangedEvent& rDCEvt ) SAL_OVERRIDE;
88 : void FillValueSet();
89 : };
90 :
91 : // class SvxCaptionTabDialog ---------------------------------------------
92 :
93 0 : class SvxCaptionTabDialog : public SfxTabDialog
94 : {
95 : private:
96 : const SdrView* pView;
97 : sal_uInt16 nAnchorCtrls;
98 : sal_uInt16 m_nSwPosSizePageId;
99 : sal_uInt16 m_nPositionSizePageId;
100 : sal_uInt16 m_nCaptionPageId;
101 :
102 : Link aValidateLink;
103 :
104 : virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) SAL_OVERRIDE;
105 :
106 : public:
107 : SvxCaptionTabDialog(Window* pParent, const SdrView* pView,
108 : sal_uInt16 nAnchorTypes = 0);
109 :
110 : /// link for the Writer to validate positions
111 : void SetValidateFramePosLink( const Link& rLink );
112 : };
113 :
114 :
115 : #endif // INCLUDED_CUI_SOURCE_INC_LABDLG_HXX
116 :
117 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|