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_MEASURE_HXX
20 : #define INCLUDED_CUI_SOURCE_INC_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 : static const sal_uInt16 pRanges[];
35 :
36 : VclPtr<MetricField> m_pMtrFldLineDist;
37 : VclPtr<MetricField> m_pMtrFldHelplineOverhang;
38 : VclPtr<MetricField> m_pMtrFldHelplineDist;
39 : VclPtr<MetricField> m_pMtrFldHelpline1Len;
40 : VclPtr<MetricField> m_pMtrFldHelpline2Len;
41 : VclPtr<TriStateBox> m_pTsbBelowRefEdge;
42 : VclPtr<MetricField> m_pMtrFldDecimalPlaces;
43 :
44 : VclPtr<SvxRectCtl> m_pCtlPosition;
45 : VclPtr<TriStateBox> m_pTsbAutoPosV;
46 : VclPtr<TriStateBox> m_pTsbAutoPosH;
47 : VclPtr<TriStateBox> m_pTsbShowUnit;
48 : VclPtr<ListBox> m_pLbUnit;
49 : VclPtr<TriStateBox> m_pTsbParallel;
50 : VclPtr<FixedText> m_pFtAutomatic;
51 :
52 : VclPtr<SvxXMeasurePreview> m_pCtlPreview;
53 :
54 : const SfxItemSet& rOutAttrs;
55 : SfxItemSet aAttrSet;
56 : const SdrView* pView;
57 : SfxMapUnit eUnit;
58 :
59 : bool bPositionModified;
60 :
61 : void FillUnitLB();
62 :
63 : DECL_LINK( ClickAutoPosHdl_Impl, void * );
64 : DECL_LINK( ChangeAttrHdl_Impl, void * );
65 :
66 : public:
67 :
68 : SvxMeasurePage( vcl::Window* pWindow, const SfxItemSet& rInAttrs );
69 : virtual ~SvxMeasurePage();
70 : virtual void dispose() SAL_OVERRIDE;
71 :
72 : static VclPtr<SfxTabPage> Create( vcl::Window*, const SfxItemSet* );
73 0 : static const sal_uInt16* GetRanges() { return pRanges; }
74 :
75 : virtual bool FillItemSet( SfxItemSet* ) SAL_OVERRIDE;
76 : virtual void Reset( const SfxItemSet * ) SAL_OVERRIDE;
77 :
78 : virtual void PointChanged( vcl::Window* pWindow, RECT_POINT eRP ) SAL_OVERRIDE;
79 :
80 : void Construct();
81 0 : void SetView( const SdrView* pSdrView ) { pView = pSdrView; }
82 : virtual void PageCreated(const SfxAllItemSet& aSet) SAL_OVERRIDE;
83 :
84 : };
85 :
86 : /* Derived from SfxSingleTabDialog, in order to be able to be
87 : informed about virtual methods by the control. */
88 0 : class SvxMeasureDialog : public SfxSingleTabDialog
89 : {
90 : public:
91 : SvxMeasureDialog(vcl::Window* pParent, const SfxItemSet& rAttr,
92 : const SdrView* pView);
93 : };
94 :
95 : #endif // INCLUDED_CUI_SOURCE_INC_MEASURE_HXX
96 :
97 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|