Line data Source code
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 :
24 : #include <vcl/group.hxx>
25 :
26 : #include <vcl/fixed.hxx>
27 : #include <sfx2/basedlgs.hxx>
28 :
29 : class SdrView;
30 :
31 : /*************************************************************************
32 : |*
33 : |* Dialog for changing TextAttributes
34 : |*
35 : \************************************************************************/
36 :
37 : class SvxTextAttrPage : public SvxTabPage
38 : {
39 : private:
40 : static const sal_uInt16 pRanges[];
41 :
42 : VclPtr<TriStateBox> m_pTsbAutoGrowWidth;
43 : VclPtr<TriStateBox> m_pTsbAutoGrowHeight;
44 : VclPtr<TriStateBox> m_pTsbFitToSize;
45 : VclPtr<TriStateBox> m_pTsbContour;
46 : VclPtr<TriStateBox> m_pTsbWordWrapText;
47 : VclPtr<TriStateBox> m_pTsbAutoGrowSize;
48 :
49 : VclPtr<VclFrame> m_pFlDistance;
50 : VclPtr<MetricField> m_pMtrFldLeft;
51 : VclPtr<MetricField> m_pMtrFldRight;
52 : VclPtr<MetricField> m_pMtrFldTop;
53 : VclPtr<MetricField> m_pMtrFldBottom;
54 :
55 : VclPtr<VclFrame> m_pFlPosition;
56 : VclPtr<SvxRectCtl> m_pCtlPosition;
57 : VclPtr<TriStateBox> m_pTsbFullWidth;
58 :
59 : const SfxItemSet& rOutAttrs;
60 : const SdrView* pView;
61 :
62 : bool bAutoGrowSizeEnabled;
63 : bool bContourEnabled;
64 : bool bAutoGrowWidthEnabled;
65 : bool bAutoGrowHeightEnabled;
66 : bool bWordWrapTextEnabled;
67 : bool bFitToSizeEnabled;
68 :
69 : DECL_LINK( ClickFullWidthHdl_Impl, void * );
70 : DECL_LINK( ClickHdl_Impl, void * );
71 :
72 : /** Return whether the text direction is from left to right (</sal_True>) or
73 : top to bottom (</sal_False>).
74 : */
75 : bool IsTextDirectionLeftToRight() const;
76 :
77 : public:
78 :
79 : SvxTextAttrPage( vcl::Window* pWindow, const SfxItemSet& rInAttrs );
80 : virtual ~SvxTextAttrPage();
81 : virtual void dispose() SAL_OVERRIDE;
82 :
83 : static VclPtr<SfxTabPage> Create( vcl::Window*, const SfxItemSet* );
84 0 : static const sal_uInt16* GetRanges() { return pRanges; }
85 :
86 : virtual bool FillItemSet( SfxItemSet* ) SAL_OVERRIDE;
87 : virtual void Reset( const SfxItemSet * ) SAL_OVERRIDE;
88 :
89 : virtual void PointChanged( vcl::Window* pWindow, RECT_POINT eRP ) SAL_OVERRIDE;
90 :
91 : void Construct();
92 0 : void SetView( const SdrView* pSdrView ) { pView = pSdrView; }
93 : virtual void PageCreated(const SfxAllItemSet& aSet) SAL_OVERRIDE;
94 : };
95 :
96 : #endif // INCLUDED_CUI_SOURCE_INC_TEXTATTR_HXX
97 :
98 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|