LibreOffice Module cui (master)  1
measure.hxx
Go to the documentation of this file.
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 <sfx2/basedlgs.hxx>
23 #include <svx/dlgctrl.hxx>
24 #include <svx/measctrl.hxx>
25 
26 class SdrView;
27 
29 class SvxMeasurePage : public SvxTabPage
30 {
31 private:
32  static const sal_uInt16 pRanges[];
33 
36  const SdrView* pView;
38 
40 
43  std::unique_ptr<weld::MetricSpinButton> m_xMtrFldLineDist;
44  std::unique_ptr<weld::MetricSpinButton> m_xMtrFldHelplineOverhang;
45  std::unique_ptr<weld::MetricSpinButton> m_xMtrFldHelplineDist;
46  std::unique_ptr<weld::MetricSpinButton> m_xMtrFldHelpline1Len;
47  std::unique_ptr<weld::MetricSpinButton> m_xMtrFldHelpline2Len;
48  std::unique_ptr<weld::CheckButton> m_xTsbBelowRefEdge;
49  std::unique_ptr<weld::SpinButton> m_xMtrFldDecimalPlaces;
50  std::unique_ptr<weld::CheckButton> m_xTsbAutoPosV;
51  std::unique_ptr<weld::CheckButton> m_xTsbAutoPosH;
52  std::unique_ptr<weld::CheckButton> m_xTsbShowUnit;
53  std::unique_ptr<weld::ComboBox> m_xLbUnit;
54  std::unique_ptr<weld::CheckButton> m_xTsbParallel;
55  std::unique_ptr<weld::Label> m_xFtAutomatic;
56  std::unique_ptr<weld::CustomWeld> m_xCtlPosition;
57  std::unique_ptr<weld::CustomWeld> m_xCtlPreview;
58 
59  void FillUnitLB();
60 
61  DECL_LINK(ClickAutoPosHdl_Impl, weld::ToggleButton&, void);
62  DECL_LINK(ChangeAttrEditHdl_Impl, weld::MetricSpinButton&, void);
63  DECL_LINK(ChangeAttrSpinHdl_Impl, weld::SpinButton&, void);
64  DECL_LINK(ChangeAttrListBoxHdl_Impl, weld::ComboBox&, void);
65  DECL_LINK(ChangeAttrClickHdl_Impl, weld::ToggleButton&, void);
66  void ChangeAttrHdl_Impl(void const *);
67 
68 public:
69 
70  SvxMeasurePage(TabPageParent pWindow, const SfxItemSet& rInAttrs);
71  virtual ~SvxMeasurePage() override;
72  virtual void dispose() override;
73 
75  static const sal_uInt16* GetRanges() { return pRanges; }
76 
77  virtual bool FillItemSet( SfxItemSet* ) override;
78  virtual void Reset( const SfxItemSet * ) override;
79 
80  virtual void PointChanged( weld::DrawingArea* pWindow, RectPoint eRP ) override;
81 
82  void Construct();
83  void SetView( const SdrView* pSdrView ) { pView = pSdrView; }
84  virtual void PageCreated(const SfxAllItemSet& aSet) override;
85 
86 };
87 
88 /* Derived from SfxSingleTabDialogController, in order to be able to be
89  informed about virtual methods by the control. */
91 {
92 public:
93  SvxMeasureDialog(weld::Window* pParent, const SfxItemSet& rAttr,
94  const SdrView* pView);
95 };
96 
97 #endif // INCLUDED_CUI_SOURCE_INC_MEASURE_HXX
98 
99 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
void ChangeAttrHdl_Impl(void const *)
Definition: measure.cxx:608
std::unique_ptr< weld::CustomWeld > m_xCtlPreview
Definition: measure.hxx:57
std::unique_ptr< weld::SpinButton > m_xMtrFldDecimalPlaces
Definition: measure.hxx:49
void SetView(const SdrView *pSdrView)
Definition: measure.hxx:83
void Construct()
Definition: measure.cxx:516
std::unique_ptr< weld::CheckButton > m_xTsbShowUnit
Definition: measure.hxx:52
std::unique_ptr< weld::MetricSpinButton > m_xMtrFldLineDist
Definition: measure.hxx:43
std::unique_ptr< weld::MetricSpinButton > m_xMtrFldHelpline1Len
Definition: measure.hxx:46
static VclPtr< SfxTabPage > Create(TabPageParent, const SfxItemSet *)
Definition: measure.cxx:530
SvxXMeasurePreview m_aCtlPreview
Definition: measure.hxx:42
virtual ~SvxMeasurePage() override
Definition: measure.cxx:131
std::unique_ptr< weld::MetricSpinButton > m_xMtrFldHelplineOverhang
Definition: measure.hxx:44
static const sal_uInt16 pRanges[]
Definition: measure.hxx:32
virtual void PointChanged(weld::DrawingArea *pWindow, RectPoint eRP) override
Definition: measure.cxx:536
virtual void PageCreated(const SfxAllItemSet &aSet) override
Definition: measure.cxx:752
std::unique_ptr< weld::MetricSpinButton > m_xMtrFldHelpline2Len
Definition: measure.hxx:47
RectPoint
void FillUnitLB()
Definition: measure.cxx:736
SvxMeasureDialog(weld::Window *pParent, const SfxItemSet &rAttr, const SdrView *pView)
Definition: measure.cxx:52
const SdrView * pView
Definition: measure.hxx:36
DECL_LINK(ClickAutoPosHdl_Impl, weld::ToggleButton &, void)
virtual bool FillItemSet(SfxItemSet *) override
Definition: measure.cxx:357
std::unique_ptr< weld::CheckButton > m_xTsbBelowRefEdge
Definition: measure.hxx:48
std::unique_ptr< weld::MetricSpinButton > m_xMtrFldHelplineDist
Definition: measure.hxx:45
SvxMeasurePage(TabPageParent pWindow, const SfxItemSet &rInAttrs)
Definition: measure.cxx:72
std::unique_ptr< weld::ComboBox > m_xLbUnit
Definition: measure.hxx:53
virtual void Reset(const SfxItemSet *) override
Definition: measure.cxx:149
std::unique_ptr< weld::CheckButton > m_xTsbAutoPosV
Definition: measure.hxx:50
const SfxItemSet & rOutAttrs
Definition: measure.hxx:34
std::unique_ptr< weld::CustomWeld > m_xCtlPosition
Definition: measure.hxx:56
std::unique_ptr< weld::CheckButton > m_xTsbAutoPosH
Definition: measure.hxx:51
static const sal_uInt16 * GetRanges()
Definition: measure.hxx:75
SvxRectCtl m_aCtlPosition
Definition: measure.hxx:41
SfxItemSet aAttrSet
Definition: measure.hxx:35
MapUnit eUnit
Definition: measure.hxx:37
bool bPositionModified
Definition: measure.hxx:39
virtual void dispose() override
Definition: measure.cxx:136
Dialog for changing TextAttributes.
Definition: measure.hxx:29
MapUnit
std::unique_ptr< weld::CheckButton > m_xTsbParallel
Definition: measure.hxx:54
std::unique_ptr< weld::Label > m_xFtAutomatic
Definition: measure.hxx:55