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