Version 7.6.3.2-android, tag libreoffice-7.6.3.2-android
[LibreOffice.git] / cui / source / inc / textattr.hxx
bloba6a7f2bd6f4648839592fe7c1cbc918c55da57fa
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 #pragma once
21 #include <svx/dlgctrl.hxx>
22 #include <svx/svdobjkind.hxx>
24 class SdrView;
26 /*************************************************************************
28 |* Dialog for changing TextAttributes
30 \************************************************************************/
32 class SvxTextAttrPage : public SvxTabPage
34 private:
35 static const WhichRangesContainer pRanges;
37 const SfxItemSet& rOutAttrs;
38 SdrObjKind m_eObjKind;
40 bool bAutoGrowSizeEnabled;
41 bool bContourEnabled;
42 bool bAutoGrowWidthEnabled;
43 bool bAutoGrowHeightEnabled;
44 bool bWordWrapTextEnabled;
45 bool bFitToSizeEnabled;
47 SvxRectCtl m_aCtlPosition;
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;
66 DECL_LINK(ClickFullWidthHdl_Impl, weld::Toggleable&, void);
67 DECL_LINK(ClickHdl_Impl, weld::Toggleable&, void);
69 /** Return whether the text direction is from left to right (</sal_True>) or
70 top to bottom (</sal_False>).
72 bool IsTextDirectionLeftToRight() const;
74 public:
76 SvxTextAttrPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs);
77 virtual ~SvxTextAttrPage() override;
79 static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* );
80 static WhichRangesContainer GetRanges() { return pRanges; }
82 virtual bool FillItemSet( SfxItemSet* ) override;
83 virtual void Reset( const SfxItemSet * ) override;
85 virtual void PointChanged( weld::DrawingArea* pWindow, RectPoint eRP ) override;
87 void Construct();
88 void SetObjKind(SdrObjKind eObjKind) { m_eObjKind = eObjKind; }
89 virtual void PageCreated(const SfxAllItemSet& aSet) override;
92 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */