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 _SVX_TEXTATTR_HXX
20 : #define _SVX_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 : FixedLine aFlText;
41 : TriStateBox aTsbAutoGrowWidth;
42 : TriStateBox aTsbAutoGrowHeight;
43 : TriStateBox aTsbFitToSize;
44 : TriStateBox aTsbContour;
45 : TriStateBox aTsbWordWrapText;
46 : TriStateBox aTsbAutoGrowSize;
47 :
48 :
49 : FixedLine aFlDistance;
50 : FixedText aFtLeft;
51 : MetricField aMtrFldLeft;
52 : FixedText aFtRight;
53 : MetricField aMtrFldRight;
54 : FixedText aFtTop;
55 : MetricField aMtrFldTop;
56 : FixedText aFtBottom;
57 : MetricField aMtrFldBottom;
58 :
59 : FixedLine aFlSeparator;
60 :
61 : FixedLine aFlPosition;
62 : SvxRectCtl aCtlPosition;
63 : TriStateBox aTsbFullWidth;
64 :
65 : const SfxItemSet& rOutAttrs;
66 : const SdrView* pView;
67 :
68 : sal_Bool bAutoGrowSizeEnabled;
69 : sal_Bool bContourEnabled;
70 : sal_Bool bAutoGrowWidthEnabled;
71 : sal_Bool bAutoGrowHeightEnabled;
72 : sal_Bool bWordWrapTextEnabled;
73 : sal_Bool bFitToSizeEnabled;
74 :
75 :
76 : #ifdef _SVX_TEXTATTR_CXX
77 : DECL_LINK( ClickFullWidthHdl_Impl, void * );
78 : DECL_LINK( ClickHdl_Impl, void * );
79 : #endif
80 :
81 : /** Return whether the text direction is from left to right (</sal_True>) or
82 : top to bottom (</sal_False>).
83 : */
84 : bool IsTextDirectionLeftToRight (void) const;
85 :
86 : public:
87 :
88 : SvxTextAttrPage( Window* pWindow, const SfxItemSet& rInAttrs );
89 : ~SvxTextAttrPage();
90 :
91 : static SfxTabPage* Create( Window*, const SfxItemSet& );
92 : static sal_uInt16* GetRanges();
93 :
94 : virtual sal_Bool FillItemSet( SfxItemSet& );
95 : virtual void Reset( const SfxItemSet & );
96 :
97 : virtual void PointChanged( Window* pWindow, RECT_POINT eRP );
98 :
99 : void Construct();
100 0 : void SetView( const SdrView* pSdrView ) { pView = pSdrView; }
101 : virtual void PageCreated(SfxAllItemSet aSet);
102 : };
103 :
104 : #endif // _SVX_TEXTATTR_HXX
105 :
106 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|