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 INCLUDED_CUI_SOURCE_INC_TEXTATTR_HXX
20 #define INCLUDED_CUI_SOURCE_INC_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
40 static const sal_uInt16 pRanges
[];
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
;
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
;
55 VclPtr
<VclFrame
> m_pFlPosition
;
56 VclPtr
<SvxRectCtl
> m_pCtlPosition
;
57 VclPtr
<TriStateBox
> m_pTsbFullWidth
;
59 const SfxItemSet
& rOutAttrs
;
62 bool bAutoGrowSizeEnabled
;
64 bool bAutoGrowWidthEnabled
;
65 bool bAutoGrowHeightEnabled
;
66 bool bWordWrapTextEnabled
;
67 bool bFitToSizeEnabled
;
69 DECL_LINK( ClickFullWidthHdl_Impl
, void * );
70 DECL_LINK( ClickHdl_Impl
, void * );
72 /** Return whether the text direction is from left to right (</sal_True>) or
73 top to bottom (</sal_False>).
75 bool IsTextDirectionLeftToRight() const;
79 SvxTextAttrPage( vcl::Window
* pWindow
, const SfxItemSet
& rInAttrs
);
80 virtual ~SvxTextAttrPage();
81 virtual void dispose() SAL_OVERRIDE
;
83 static VclPtr
<SfxTabPage
> Create( vcl::Window
*, const SfxItemSet
* );
84 static const sal_uInt16
* GetRanges() { return pRanges
; }
86 virtual bool FillItemSet( SfxItemSet
* ) SAL_OVERRIDE
;
87 virtual void Reset( const SfxItemSet
* ) SAL_OVERRIDE
;
89 virtual void PointChanged( vcl::Window
* pWindow
, RECT_POINT eRP
) SAL_OVERRIDE
;
92 void SetView( const SdrView
* pSdrView
) { pView
= pSdrView
; }
93 virtual void PageCreated(const SfxAllItemSet
& aSet
) SAL_OVERRIDE
;
96 #endif // INCLUDED_CUI_SOURCE_INC_TEXTATTR_HXX
98 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */