bump product version to 5.0.4.1
[LibreOffice.git] / cui / source / inc / measure.hxx
blob28dbdfdc7c2805a68b8d3070962d32e90132df66
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 INCLUDED_CUI_SOURCE_INC_MEASURE_HXX
20 #define INCLUDED_CUI_SOURCE_INC_MEASURE_HXX
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>
28 class SdrView;
30 /// Dialog for changing TextAtrributes
31 class SvxMeasurePage : public SvxTabPage
33 private:
34 static const sal_uInt16 pRanges[];
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;
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;
52 VclPtr<SvxXMeasurePreview> m_pCtlPreview;
54 const SfxItemSet& rOutAttrs;
55 SfxItemSet aAttrSet;
56 const SdrView* pView;
57 SfxMapUnit eUnit;
59 bool bPositionModified;
61 void FillUnitLB();
63 DECL_LINK( ClickAutoPosHdl_Impl, void * );
64 DECL_LINK( ChangeAttrHdl_Impl, void * );
66 public:
68 SvxMeasurePage( vcl::Window* pWindow, const SfxItemSet& rInAttrs );
69 virtual ~SvxMeasurePage();
70 virtual void dispose() SAL_OVERRIDE;
72 static VclPtr<SfxTabPage> Create( vcl::Window*, const SfxItemSet* );
73 static const sal_uInt16* GetRanges() { return pRanges; }
75 virtual bool FillItemSet( SfxItemSet* ) SAL_OVERRIDE;
76 virtual void Reset( const SfxItemSet * ) SAL_OVERRIDE;
78 virtual void PointChanged( vcl::Window* pWindow, RECT_POINT eRP ) SAL_OVERRIDE;
80 void Construct();
81 void SetView( const SdrView* pSdrView ) { pView = pSdrView; }
82 virtual void PageCreated(const SfxAllItemSet& aSet) SAL_OVERRIDE;
86 /* Derived from SfxSingleTabDialog, in order to be able to be
87 informed about virtual methods by the control. */
88 class SvxMeasureDialog : public SfxSingleTabDialog
90 public:
91 SvxMeasureDialog(vcl::Window* pParent, const SfxItemSet& rAttr,
92 const SdrView* pView);
95 #endif // INCLUDED_CUI_SOURCE_INC_MEASURE_HXX
97 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */