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