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 _SVX_MEASURE_HXX
20 : #define _SVX_MEASURE_HXX
21 :
22 : #include <vcl/fixed.hxx>
23 : #include <vcl/group.hxx>
24 : #include <sfx2/basedlgs.hxx>
25 : #include <svx/dlgctrl.hxx>
26 : #include <svx/measctrl.hxx>
27 :
28 : class SdrView;
29 :
30 : /// Dialog for changing TextAtrributes
31 : class SvxMeasurePage : public SvxTabPage
32 : {
33 : private:
34 :
35 : FixedLine aFlLine;
36 : FixedText aFtLineDist;
37 : MetricField aMtrFldLineDist;
38 : FixedText aFtHelplineOverhang;
39 : MetricField aMtrFldHelplineOverhang;
40 : FixedText aFtHelplineDist;
41 : MetricField aMtrFldHelplineDist;
42 : FixedText aFtHelpline1Len;
43 : MetricField aMtrFldHelpline1Len;
44 : FixedText aFtHelpline2Len;
45 : MetricField aMtrFldHelpline2Len;
46 : TriStateBox aTsbBelowRefEdge;
47 : FixedText aFtDecimalPlaces;
48 : MetricField aMtrFldDecimalPlaces;
49 :
50 : FixedLine aFlLabel;
51 : FixedText aFtPosition;
52 : SvxRectCtl aCtlPosition;
53 : TriStateBox aTsbAutoPosV;
54 : TriStateBox aTsbAutoPosH;
55 : TriStateBox aTsbShowUnit;
56 : ListBox aLbUnit;
57 : TriStateBox aTsbParallel;
58 :
59 : SvxXMeasurePreview aCtlPreview;
60 :
61 : FixedLine aFlVert;
62 :
63 : const SfxItemSet& rOutAttrs;
64 : SfxItemSet aAttrSet;
65 : const SdrView* pView;
66 : SfxMapUnit eUnit;
67 :
68 : sal_Bool bPositionModified;
69 :
70 : void FillUnitLB();
71 :
72 : DECL_LINK( ClickAutoPosHdl_Impl, void * );
73 : DECL_LINK( ChangeAttrHdl_Impl, void * );
74 :
75 : public:
76 :
77 : SvxMeasurePage( Window* pWindow, const SfxItemSet& rInAttrs );
78 : ~SvxMeasurePage();
79 :
80 : static SfxTabPage* Create( Window*, const SfxItemSet& );
81 : static sal_uInt16* GetRanges();
82 :
83 : virtual sal_Bool FillItemSet( SfxItemSet& );
84 : virtual void Reset( const SfxItemSet & );
85 :
86 : virtual void PointChanged( Window* pWindow, RECT_POINT eRP );
87 :
88 : void Construct();
89 0 : void SetView( const SdrView* pSdrView ) { pView = pSdrView; }
90 : virtual void PageCreated (SfxAllItemSet aSet);
91 : };
92 :
93 : /* Derived from SfxNoLayoutSingleTabDialog, in order to be able to be
94 : informed about virtual methods by the control. */
95 : class SvxMeasureDialog : public SfxNoLayoutSingleTabDialog
96 : {
97 : public:
98 : SvxMeasureDialog( Window* pParent, const SfxItemSet& rAttr,
99 : const SdrView* pView );
100 : ~SvxMeasureDialog();
101 : };
102 :
103 :
104 : #endif // _SVX_MEASURE_HXX
105 :
106 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|