LibreOffice Module cui (master)  1
textattr.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 #pragma once
20 
21 #include <svx/dlgctrl.hxx>
22 #include <svx/svdobj.hxx>
23 
24 class SdrView;
25 
26 /*************************************************************************
27 |*
28 |* Dialog for changing TextAttributes
29 |*
30 \************************************************************************/
31 
33 {
34 private:
35  static const sal_uInt16 pRanges[];
36 
39 
46 
48 
49  std::unique_ptr<weld::Widget> m_xDrawingText;
50  std::unique_ptr<weld::Widget> m_xCustomShapeText;
51  std::unique_ptr<weld::CheckButton> m_xTsbAutoGrowWidth;
52  std::unique_ptr<weld::CheckButton> m_xTsbAutoGrowHeight;
53  std::unique_ptr<weld::CheckButton> m_xTsbFitToSize;
54  std::unique_ptr<weld::CheckButton> m_xTsbContour;
55  std::unique_ptr<weld::CheckButton> m_xTsbWordWrapText;
56  std::unique_ptr<weld::CheckButton> m_xTsbAutoGrowSize;
57  std::unique_ptr<weld::Frame> m_xFlDistance;
58  std::unique_ptr<weld::MetricSpinButton> m_xMtrFldLeft;
59  std::unique_ptr<weld::MetricSpinButton> m_xMtrFldRight;
60  std::unique_ptr<weld::MetricSpinButton> m_xMtrFldTop;
61  std::unique_ptr<weld::MetricSpinButton> m_xMtrFldBottom;
62  std::unique_ptr<weld::Frame> m_xFlPosition;
63  std::unique_ptr<weld::CustomWeld> m_xCtlPosition;
64  std::unique_ptr<weld::CheckButton> m_xTsbFullWidth;
65 
66  DECL_LINK(ClickFullWidthHdl_Impl, weld::Button&, void);
67  DECL_LINK(ClickHdl_Impl, weld::Button&, void);
68 
72  bool IsTextDirectionLeftToRight() const;
73 
74 public:
75 
76  SvxTextAttrPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs);
77  virtual ~SvxTextAttrPage() override;
78 
79  static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* );
80  static const sal_uInt16* GetRanges() { return pRanges; }
81 
82  virtual bool FillItemSet( SfxItemSet* ) override;
83  virtual void Reset( const SfxItemSet * ) override;
84 
85  virtual void PointChanged( weld::DrawingArea* pWindow, RectPoint eRP ) override;
86 
87  void Construct();
88  void SetObjKind(SdrObjKind eObjKind) { m_eObjKind = eObjKind; }
89  virtual void PageCreated(const SfxAllItemSet& aSet) override;
90 };
91 
92 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
static const sal_uInt16 pRanges[]
Definition: textattr.hxx:35
bool bAutoGrowSizeEnabled
Definition: textattr.hxx:40
bool bWordWrapTextEnabled
Definition: textattr.hxx:44
std::unique_ptr< weld::Frame > m_xFlPosition
Definition: textattr.hxx:62
std::unique_ptr< weld::Frame > m_xFlDistance
Definition: textattr.hxx:57
SvxTextAttrPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rInAttrs)
Definition: textattr.cxx:51
virtual bool FillItemSet(SfxItemSet *) override
Definition: textattr.cxx:291
std::unique_ptr< weld::MetricSpinButton > m_xMtrFldBottom
Definition: textattr.hxx:61
std::unique_ptr< weld::CheckButton > m_xTsbAutoGrowHeight
Definition: textattr.hxx:52
bool bContourEnabled
Definition: textattr.hxx:41
static const sal_uInt16 * GetRanges()
Definition: textattr.hxx:80
SdrObjKind m_eObjKind
Definition: textattr.hxx:38
std::unique_ptr< weld::MetricSpinButton > m_xMtrFldLeft
Definition: textattr.hxx:58
std::unique_ptr< weld::CheckButton > m_xTsbFitToSize
Definition: textattr.hxx:53
bool bFitToSizeEnabled
Definition: textattr.hxx:45
virtual void PageCreated(const SfxAllItemSet &aSet) override
Definition: textattr.cxx:658
bool bAutoGrowHeightEnabled
Definition: textattr.hxx:43
const SfxItemSet & rOutAttrs
Definition: textattr.hxx:37
std::unique_ptr< weld::CheckButton > m_xTsbFullWidth
Definition: textattr.hxx:64
std::unique_ptr< weld::MetricSpinButton > m_xMtrFldTop
Definition: textattr.hxx:60
void Construct()
Definition: textattr.cxx:432
std::unique_ptr< weld::CheckButton > m_xTsbWordWrapText
Definition: textattr.hxx:55
virtual void PointChanged(weld::DrawingArea *pWindow, RectPoint eRP) override
Check whether we have to uncheck the "Full width" check box.
Definition: textattr.cxx:484
RectPoint
std::unique_ptr< weld::CustomWeld > m_xCtlPosition
Definition: textattr.hxx:63
bool IsTextDirectionLeftToRight() const
Return whether the text direction is from left to right () or top to bottom ()...
Definition: textattr.cxx:643
std::unique_ptr< weld::CheckButton > m_xTsbContour
Definition: textattr.hxx:54
std::unique_ptr< weld::MetricSpinButton > m_xMtrFldRight
Definition: textattr.hxx:59
std::unique_ptr< weld::CheckButton > m_xTsbAutoGrowWidth
Definition: textattr.hxx:51
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *)
Definition: textattr.cxx:477
virtual ~SvxTextAttrPage() override
Definition: textattr.cxx:97
std::unique_ptr< weld::Widget > m_xDrawingText
Definition: textattr.hxx:49
void SetObjKind(SdrObjKind eObjKind)
Definition: textattr.hxx:88
SdrObjKind
virtual void Reset(const SfxItemSet *) override
Definition: textattr.cxx:107
bool bAutoGrowWidthEnabled
Definition: textattr.hxx:42
DECL_LINK(ClickFullWidthHdl_Impl, weld::Button &, void)
std::unique_ptr< weld::Widget > m_xCustomShapeText
Definition: textattr.hxx:50
std::unique_ptr< weld::CheckButton > m_xTsbAutoGrowSize
Definition: textattr.hxx:56
SvxRectCtl m_aCtlPosition
Definition: textattr.hxx:47