xref: /aoo41x/main/cui/source/inc/textattr.hxx (revision c4eee24d)
1*c4eee24dSAndrew Rist /**************************************************************
2*c4eee24dSAndrew Rist  *
3*c4eee24dSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*c4eee24dSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*c4eee24dSAndrew Rist  * distributed with this work for additional information
6*c4eee24dSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*c4eee24dSAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*c4eee24dSAndrew Rist  * "License"); you may not use this file except in compliance
9*c4eee24dSAndrew Rist  * with the License.  You may obtain a copy of the License at
10*c4eee24dSAndrew Rist  *
11*c4eee24dSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12cdf0e10cSrcweir  *
13*c4eee24dSAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*c4eee24dSAndrew Rist  * software distributed under the License is distributed on an
15*c4eee24dSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*c4eee24dSAndrew Rist  * KIND, either express or implied.  See the License for the
17*c4eee24dSAndrew Rist  * specific language governing permissions and limitations
18*c4eee24dSAndrew Rist  * under the License.
19*c4eee24dSAndrew Rist  *
20*c4eee24dSAndrew Rist  *************************************************************/
21*c4eee24dSAndrew Rist 
22*c4eee24dSAndrew Rist 
23cdf0e10cSrcweir #ifndef _SVX_TEXTATTR_HXX
24cdf0e10cSrcweir #define _SVX_TEXTATTR_HXX
25cdf0e10cSrcweir 
26cdf0e10cSrcweir // include ---------------------------------------------------------------
27cdf0e10cSrcweir 
28cdf0e10cSrcweir #include <svx/dlgctrl.hxx>
29cdf0e10cSrcweir 
30cdf0e10cSrcweir #ifndef _GROUP_HXX //autogen
31cdf0e10cSrcweir #include <vcl/group.hxx>
32cdf0e10cSrcweir #endif
33cdf0e10cSrcweir 
34cdf0e10cSrcweir #ifndef _FIXED_HXX //autogen
35cdf0e10cSrcweir #include <vcl/fixed.hxx>
36cdf0e10cSrcweir #endif
37cdf0e10cSrcweir #include <sfx2/basedlgs.hxx>
38cdf0e10cSrcweir 
39cdf0e10cSrcweir class SdrView;
40cdf0e10cSrcweir 
41cdf0e10cSrcweir /*************************************************************************
42cdf0e10cSrcweir |*
43cdf0e10cSrcweir |* Dialog zum "Andern von TextAttributen
44cdf0e10cSrcweir |*
45cdf0e10cSrcweir \************************************************************************/
46cdf0e10cSrcweir 
47cdf0e10cSrcweir class SvxTextAttrPage : public SvxTabPage
48cdf0e10cSrcweir {
49cdf0e10cSrcweir private:
50cdf0e10cSrcweir 	FixedLine			aFlText;
51cdf0e10cSrcweir 	TriStateBox         aTsbAutoGrowWidth;
52cdf0e10cSrcweir 	TriStateBox         aTsbAutoGrowHeight;
53cdf0e10cSrcweir 	TriStateBox			aTsbFitToSize;
54cdf0e10cSrcweir 	TriStateBox			aTsbContour;
55cdf0e10cSrcweir     TriStateBox         aTsbWordWrapText;
56cdf0e10cSrcweir     TriStateBox         aTsbAutoGrowSize;
57cdf0e10cSrcweir 
58cdf0e10cSrcweir 
59cdf0e10cSrcweir 	FixedLine			aFlDistance;
60cdf0e10cSrcweir 	FixedText			aFtLeft;
61cdf0e10cSrcweir 	MetricField			aMtrFldLeft;
62cdf0e10cSrcweir 	FixedText			aFtRight;
63cdf0e10cSrcweir 	MetricField			aMtrFldRight;
64cdf0e10cSrcweir 	FixedText			aFtTop;
65cdf0e10cSrcweir 	MetricField			aMtrFldTop;
66cdf0e10cSrcweir 	FixedText			aFtBottom;
67cdf0e10cSrcweir 	MetricField			aMtrFldBottom;
68cdf0e10cSrcweir 
69cdf0e10cSrcweir 	FixedLine			aFlSeparator;
70cdf0e10cSrcweir 
71cdf0e10cSrcweir 	FixedLine			aFlPosition;
72cdf0e10cSrcweir 	SvxRectCtl			aCtlPosition;
73cdf0e10cSrcweir 	TriStateBox			aTsbFullWidth;
74cdf0e10cSrcweir 
75cdf0e10cSrcweir 	const SfxItemSet&	rOutAttrs;
76cdf0e10cSrcweir 	const SdrView*		pView;
77cdf0e10cSrcweir 
78cdf0e10cSrcweir 	sal_Bool				bAutoGrowSizeEnabled;
79cdf0e10cSrcweir 	sal_Bool				bContourEnabled;
80cdf0e10cSrcweir     sal_Bool                bAutoGrowWidthEnabled;
81cdf0e10cSrcweir     sal_Bool                bAutoGrowHeightEnabled;
82cdf0e10cSrcweir     sal_Bool                bWordWrapTextEnabled;
83cdf0e10cSrcweir     sal_Bool                bFitToSizeEnabled;
84cdf0e10cSrcweir 
85cdf0e10cSrcweir 
86cdf0e10cSrcweir #ifdef _SVX_TEXTATTR_CXX
87cdf0e10cSrcweir 	DECL_LINK( ClickFullWidthHdl_Impl, void * );
88cdf0e10cSrcweir 	DECL_LINK( ClickHdl_Impl, void * );
89cdf0e10cSrcweir #endif
90cdf0e10cSrcweir 
91cdf0e10cSrcweir     /** Return whether the text direction is from left to right (</sal_True>) or
92cdf0e10cSrcweir         top to bottom (</sal_False>).
93cdf0e10cSrcweir     */
94cdf0e10cSrcweir     bool IsTextDirectionLeftToRight (void) const;
95cdf0e10cSrcweir 
96cdf0e10cSrcweir public:
97cdf0e10cSrcweir 
98cdf0e10cSrcweir 	SvxTextAttrPage( Window* pWindow, const SfxItemSet& rInAttrs );
99cdf0e10cSrcweir 	~SvxTextAttrPage();
100cdf0e10cSrcweir 
101cdf0e10cSrcweir 	static SfxTabPage* 	Create( Window*, const SfxItemSet& );
102cdf0e10cSrcweir 	static  sal_uInt16*	    GetRanges();
103cdf0e10cSrcweir 
104cdf0e10cSrcweir 	virtual sal_Bool 		FillItemSet( SfxItemSet& );
105cdf0e10cSrcweir 	virtual void 		Reset( const SfxItemSet & );
106cdf0e10cSrcweir 
107cdf0e10cSrcweir 	virtual void 		PointChanged( Window* pWindow, RECT_POINT eRP );
108cdf0e10cSrcweir 
109cdf0e10cSrcweir 	void 		 Construct();
SetView(const SdrView * pSdrView)110cdf0e10cSrcweir 	void		 SetView( const SdrView* pSdrView ) { pView = pSdrView; }
111cdf0e10cSrcweir 	virtual void 			PageCreated(SfxAllItemSet aSet); // add CHINA001
112cdf0e10cSrcweir };
113cdf0e10cSrcweir 
114cdf0e10cSrcweir /*************************************************************************
115cdf0e10cSrcweir |*
116cdf0e10cSrcweir |* Von SfxSingleTabDialog abgeleitet, um vom Control "uber virtuelle Methode
117cdf0e10cSrcweir |* benachrichtigt werden zu k"onnen.
118cdf0e10cSrcweir |*
119cdf0e10cSrcweir \************************************************************************/
120cdf0e10cSrcweir 
121cdf0e10cSrcweir //CHINA001 class SvxTextAttrDialog : public SfxSingleTabDialog
122cdf0e10cSrcweir //CHINA001 {
123cdf0e10cSrcweir //CHINA001 public:
124cdf0e10cSrcweir //CHINA001 SvxTextAttrDialog( Window* pParent, const SfxItemSet& rAttr,
125cdf0e10cSrcweir //CHINA001 const SdrView* pView );
126cdf0e10cSrcweir //CHINA001 ~SvxTextAttrDialog();
127cdf0e10cSrcweir //CHINA001 };
128cdf0e10cSrcweir 
129cdf0e10cSrcweir 
130cdf0e10cSrcweir #endif // _SVX_TEXTATTR_HXX
131cdf0e10cSrcweir 
132