Version 4.0.0.1, tag libreoffice-4.0.0.1
[LibreOffice.git] / cui / source / inc / labdlg.hxx
blob44ca18b39430d540280478cedbf8542ba0189afa
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 _SVX_LABDLG_HXX
20 #define _SVX_LABDLG_HXX
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;
29 // class SvxCaptionTabPage -----------------------------------------------
31 const sal_uInt16 CAPTYPE_BITMAPS_COUNT = 3;
33 class SvxCaptionTabPage : public SfxTabPage
35 private:
36 ValueSet aCT_CAPTTYPE;
37 FixedText aFT_ABSTAND;
38 MetricField aMF_ABSTAND;
39 FixedText aFT_WINKEL;
40 ListBox aLB_WINKEL;
41 FixedText aFT_ANSATZ;
42 ListBox aLB_ANSATZ;
43 FixedText aFT_UM;
44 MetricField aMF_ANSATZ;
45 FixedText aFT_ANSATZ_REL;
46 ListBox aLB_ANSATZ_REL;
47 FixedText aFT_LAENGE;
48 MetricField aMF_LAENGE;
49 CheckBox aCB_LAENGE;
51 Image* mpBmpCapTypes[CAPTYPE_BITMAPS_COUNT];
53 String aStrHorzList;
54 String aStrVertList;
56 short nCaptionType;
57 sal_Bool bFixedAngle;
58 sal_Int32 nFixedAngle;
59 sal_Int32 nGap;
60 short nEscDir;
61 sal_Bool bEscRel;
62 sal_Int32 nEscAbs;
63 sal_Int32 nEscRel;
64 sal_Int32 nLineLen;
65 sal_Bool bFitLineLen;
67 sal_uInt16 nAnsatzRelPos;
68 sal_uInt16 nAnsatzTypePos;
69 sal_uInt16 nWinkelTypePos;
71 #ifdef _SVX_LABDLG_CXX
72 void SetupAnsatz_Impl( sal_uInt16 nType );
73 void SetupType_Impl( sal_uInt16 nType );
74 DECL_LINK( AnsatzSelectHdl_Impl, ListBox * );
75 DECL_LINK( AnsatzRelSelectHdl_Impl, ListBox * );
76 DECL_LINK( LineOptHdl_Impl, Button * );
77 DECL_LINK( SelectCaptTypeHdl_Impl, void * );
78 #endif
80 const SfxItemSet& rOutAttrs;
81 const SdrView* pView;
83 public:
84 SvxCaptionTabPage( Window* pParent, const SfxItemSet& rInAttrs );
85 virtual ~SvxCaptionTabPage();
87 static SfxTabPage* Create( Window*, const SfxItemSet& );
88 static sal_uInt16* GetRanges();
90 virtual sal_Bool FillItemSet( SfxItemSet& );
91 virtual void Reset( const SfxItemSet & );
92 void Construct();
93 void SetView( const SdrView* pSdrView )
94 { pView = pSdrView; }
96 virtual void DataChanged( const DataChangedEvent& rDCEvt );
97 void FillValueSet();
100 // class SvxCaptionTabDialog ---------------------------------------------
102 class SvxCaptionTabDialog : public SfxTabDialog
104 private:
105 const SdrView* pView;
106 sal_uInt16 nAnchorCtrls;
108 Link aValidateLink;
110 virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage );
112 public:
114 SvxCaptionTabDialog(Window* pParent, const SdrView* pView,
115 sal_uInt16 nAnchorTypes = 0 );
117 ~SvxCaptionTabDialog();
119 /// link for the Writer to validate positions
120 void SetValidateFramePosLink( const Link& rLink );
124 #endif //_SVX_LABDLG_HXX
126 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */