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 : #ifdef _SVX_MEASURE_CXX
71 : void FillUnitLB();
72 :
73 : DECL_LINK( ClickAutoPosHdl_Impl, void * );
74 : DECL_LINK( ChangeAttrHdl_Impl, void * );
75 : #endif
76 :
77 : public:
78 :
79 : SvxMeasurePage( Window* pWindow, const SfxItemSet& rInAttrs );
80 : ~SvxMeasurePage();
81 :
82 : static SfxTabPage* Create( Window*, const SfxItemSet& );
83 : static sal_uInt16* GetRanges();
84 :
85 : virtual sal_Bool FillItemSet( SfxItemSet& );
86 : virtual void Reset( const SfxItemSet & );
87 :
88 : virtual void PointChanged( Window* pWindow, RECT_POINT eRP );
89 :
90 : void Construct();
91 0 : void SetView( const SdrView* pSdrView ) { pView = pSdrView; }
92 : virtual void PageCreated (SfxAllItemSet aSet);
93 : };
94 :
95 : /* Derived from SfxSingleTabDialog, in order to be able to be
96 : informed about virtual methods by the control. */
97 : class SvxMeasureDialog : public SfxSingleTabDialog
98 : {
99 : public:
100 : SvxMeasureDialog( Window* pParent, const SfxItemSet& rAttr,
101 : const SdrView* pView );
102 : ~SvxMeasureDialog();
103 : };
104 :
105 :
106 : #endif // _SVX_MEASURE_HXX
107 :
108 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|