1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 #ifndef _SVX_TEXTATTR_HXX
20 #define _SVX_TEXTATTR_HXX
22 #include <svx/dlgctrl.hxx>
24 #include <vcl/group.hxx>
26 #include <vcl/fixed.hxx>
27 #include <sfx2/basedlgs.hxx>
31 /*************************************************************************
33 |* Dialog for changing TextAttributes
35 \************************************************************************/
37 class SvxTextAttrPage
: public SvxTabPage
41 TriStateBox aTsbAutoGrowWidth
;
42 TriStateBox aTsbAutoGrowHeight
;
43 TriStateBox aTsbFitToSize
;
44 TriStateBox aTsbContour
;
45 TriStateBox aTsbWordWrapText
;
46 TriStateBox aTsbAutoGrowSize
;
49 FixedLine aFlDistance
;
51 MetricField aMtrFldLeft
;
53 MetricField aMtrFldRight
;
55 MetricField aMtrFldTop
;
57 MetricField aMtrFldBottom
;
59 FixedLine aFlSeparator
;
61 FixedLine aFlPosition
;
62 SvxRectCtl aCtlPosition
;
63 TriStateBox aTsbFullWidth
;
65 const SfxItemSet
& rOutAttrs
;
68 sal_Bool bAutoGrowSizeEnabled
;
69 sal_Bool bContourEnabled
;
70 sal_Bool bAutoGrowWidthEnabled
;
71 sal_Bool bAutoGrowHeightEnabled
;
72 sal_Bool bWordWrapTextEnabled
;
73 sal_Bool bFitToSizeEnabled
;
76 #ifdef _SVX_TEXTATTR_CXX
77 DECL_LINK( ClickFullWidthHdl_Impl
, void * );
78 DECL_LINK( ClickHdl_Impl
, void * );
81 /** Return whether the text direction is from left to right (</sal_True>) or
82 top to bottom (</sal_False>).
84 bool IsTextDirectionLeftToRight (void) const;
88 SvxTextAttrPage( Window
* pWindow
, const SfxItemSet
& rInAttrs
);
91 static SfxTabPage
* Create( Window
*, const SfxItemSet
& );
92 static sal_uInt16
* GetRanges();
94 virtual sal_Bool
FillItemSet( SfxItemSet
& );
95 virtual void Reset( const SfxItemSet
& );
97 virtual void PointChanged( Window
* pWindow
, RECT_POINT eRP
);
100 void SetView( const SdrView
* pSdrView
) { pView
= pSdrView
; }
101 virtual void PageCreated(SfxAllItemSet aSet
);
104 #endif // _SVX_TEXTATTR_HXX
106 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */