xref: /aoo41x/main/sw/source/ui/inc/wrap.hxx (revision 1d2dbeb0)
1*1d2dbeb0SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*1d2dbeb0SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*1d2dbeb0SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*1d2dbeb0SAndrew Rist  * distributed with this work for additional information
6*1d2dbeb0SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*1d2dbeb0SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*1d2dbeb0SAndrew Rist  * "License"); you may not use this file except in compliance
9*1d2dbeb0SAndrew Rist  * with the License.  You may obtain a copy of the License at
10*1d2dbeb0SAndrew Rist  *
11*1d2dbeb0SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*1d2dbeb0SAndrew Rist  *
13*1d2dbeb0SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*1d2dbeb0SAndrew Rist  * software distributed under the License is distributed on an
15*1d2dbeb0SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*1d2dbeb0SAndrew Rist  * KIND, either express or implied.  See the License for the
17*1d2dbeb0SAndrew Rist  * specific language governing permissions and limitations
18*1d2dbeb0SAndrew Rist  * under the License.
19*1d2dbeb0SAndrew Rist  *
20*1d2dbeb0SAndrew Rist  *************************************************************/
21*1d2dbeb0SAndrew Rist 
22*1d2dbeb0SAndrew Rist 
23cdf0e10cSrcweir #ifndef _WRAP_HXX
24cdf0e10cSrcweir #define _WRAP_HXX
25cdf0e10cSrcweir 
26cdf0e10cSrcweir #include <sfx2/tabdlg.hxx>
27cdf0e10cSrcweir #include <sfx2/basedlgs.hxx>
28cdf0e10cSrcweir 
29cdf0e10cSrcweir #ifndef _IMAGEBTN_HXX //autogen
30cdf0e10cSrcweir #include <vcl/button.hxx>
31cdf0e10cSrcweir #endif
32cdf0e10cSrcweir 
33cdf0e10cSrcweir #ifndef _BUTTON_HXX //autogen
34cdf0e10cSrcweir #include <vcl/button.hxx>
35cdf0e10cSrcweir #endif
36cdf0e10cSrcweir 
37cdf0e10cSrcweir #ifndef _FIXED_HXX //autogen
38cdf0e10cSrcweir #include <vcl/fixed.hxx>
39cdf0e10cSrcweir #endif
40cdf0e10cSrcweir 
41cdf0e10cSrcweir #ifndef _FIELD_HXX //autogen
42cdf0e10cSrcweir #include <vcl/field.hxx>
43cdf0e10cSrcweir #endif
44cdf0e10cSrcweir 
45cdf0e10cSrcweir class Window;
46cdf0e10cSrcweir class SfxItemSet;
47cdf0e10cSrcweir class SwWrtShell;
48cdf0e10cSrcweir 
49cdf0e10cSrcweir class SwWrapDlg : public SfxSingleTabDialog
50cdf0e10cSrcweir {
51cdf0e10cSrcweir 	SwWrtShell* 		pWrtShell;
52cdf0e10cSrcweir 
53cdf0e10cSrcweir public:
54cdf0e10cSrcweir 	 SwWrapDlg(Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh, sal_Bool bDrawMode);
55cdf0e10cSrcweir 	~SwWrapDlg();
56cdf0e10cSrcweir 
GetWrtShell()57cdf0e10cSrcweir 	inline SwWrtShell* 	GetWrtShell()	{ return pWrtShell; }
58cdf0e10cSrcweir };
59cdf0e10cSrcweir 
60cdf0e10cSrcweir 
61cdf0e10cSrcweir /*--------------------------------------------------------------------
62cdf0e10cSrcweir 	Beschreibung:	Umlauf-TabPage
63cdf0e10cSrcweir  --------------------------------------------------------------------*/
64cdf0e10cSrcweir 
65cdf0e10cSrcweir class SwWrapTabPage: public SfxTabPage
66cdf0e10cSrcweir {
67cdf0e10cSrcweir 	// WRAPPING
68cdf0e10cSrcweir     FixedLine           aWrapFLC;
69cdf0e10cSrcweir 	ImageRadioButton	aNoWrapRB;
70cdf0e10cSrcweir 	ImageRadioButton	aWrapLeftRB;
71cdf0e10cSrcweir 	ImageRadioButton	aWrapRightRB;
72cdf0e10cSrcweir 	ImageRadioButton	aWrapParallelRB;
73cdf0e10cSrcweir 	ImageRadioButton	aWrapThroughRB;
74cdf0e10cSrcweir 	ImageRadioButton	aIdealWrapRB;
75cdf0e10cSrcweir 
76cdf0e10cSrcweir 	// MARGIN
77cdf0e10cSrcweir     FixedLine           aMarginFL;
78cdf0e10cSrcweir 	FixedText			aLeftMarginFT;
79cdf0e10cSrcweir 	MetricField 		aLeftMarginED;
80cdf0e10cSrcweir 	FixedText			aRightMarginFT;
81cdf0e10cSrcweir 	MetricField 		aRightMarginED;
82cdf0e10cSrcweir 	FixedText			aTopMarginFT;
83cdf0e10cSrcweir 	MetricField 		aTopMarginED;
84cdf0e10cSrcweir 	FixedText			aBottomMarginFT;
85cdf0e10cSrcweir 	MetricField 		aBottomMarginED;
86cdf0e10cSrcweir 
87cdf0e10cSrcweir     // OPTIONS
88cdf0e10cSrcweir     FixedLine           aOptionsSepFL;
89cdf0e10cSrcweir     FixedLine           aOptionsFL;
90cdf0e10cSrcweir     CheckBox            aWrapAnchorOnlyCB;
91cdf0e10cSrcweir 	CheckBox			aWrapTransparentCB;
92cdf0e10cSrcweir 	CheckBox			aWrapOutlineCB;
93cdf0e10cSrcweir 	CheckBox			aWrapOutsideCB;
94cdf0e10cSrcweir 
95cdf0e10cSrcweir 	ImageList			aWrapIL;
96cdf0e10cSrcweir     ImageList           aWrapILH;
97cdf0e10cSrcweir 
98cdf0e10cSrcweir 	sal_uInt16				nOldLeftMargin;
99cdf0e10cSrcweir 	sal_uInt16				nOldRightMargin;
100cdf0e10cSrcweir 	sal_uInt16				nOldUpperMargin;
101cdf0e10cSrcweir 	sal_uInt16				nOldLowerMargin;
102cdf0e10cSrcweir 
103cdf0e10cSrcweir     RndStdIds           nAnchorId;
104cdf0e10cSrcweir 	sal_uInt16 				nHtmlMode;
105cdf0e10cSrcweir 
106cdf0e10cSrcweir 	Size aFrmSize;
107cdf0e10cSrcweir 	SwWrtShell*			pWrtSh;
108cdf0e10cSrcweir 
109cdf0e10cSrcweir 	sal_Bool bFormat;
110cdf0e10cSrcweir 	sal_Bool bNew;
111cdf0e10cSrcweir 	sal_Bool bHtmlMode;
112cdf0e10cSrcweir 	sal_Bool bDrawMode;
113cdf0e10cSrcweir 	sal_Bool bContourImage;
114cdf0e10cSrcweir 
115cdf0e10cSrcweir 	SwWrapTabPage(Window *pParent, const SfxItemSet &rSet);
116cdf0e10cSrcweir 	~SwWrapTabPage();
117cdf0e10cSrcweir 
118cdf0e10cSrcweir     void            ApplyImageList();
119cdf0e10cSrcweir     void            EnableModes(const SfxItemSet& rSet);
120cdf0e10cSrcweir 	virtual void 	ActivatePage(const SfxItemSet& rSet);
121cdf0e10cSrcweir 	virtual int 	DeactivatePage(SfxItemSet *pSet);
122cdf0e10cSrcweir     virtual void    DataChanged( const DataChangedEvent& rDCEvt );
123cdf0e10cSrcweir 
124cdf0e10cSrcweir 	DECL_LINK( RangeModifyHdl, MetricField * );
125cdf0e10cSrcweir 	DECL_LINK( WrapTypeHdl, ImageRadioButton * );
126cdf0e10cSrcweir 	DECL_LINK( ContourHdl, CheckBox * );
127cdf0e10cSrcweir 
128cdf0e10cSrcweir     using SfxTabPage::ActivatePage;
129cdf0e10cSrcweir     using SfxTabPage::DeactivatePage;
130cdf0e10cSrcweir 
131cdf0e10cSrcweir public:
132cdf0e10cSrcweir 
133cdf0e10cSrcweir     static SfxTabPage *Create(Window *pParent, const SfxItemSet &rSet);
134cdf0e10cSrcweir 
135cdf0e10cSrcweir 	virtual sal_Bool 	FillItemSet(SfxItemSet &rSet);
136cdf0e10cSrcweir 	virtual void 	Reset(const SfxItemSet &rSet);
137cdf0e10cSrcweir 
138cdf0e10cSrcweir 	static sal_uInt16*	GetRanges();
SetNewFrame(sal_Bool bNewFrame)139cdf0e10cSrcweir 	inline void		SetNewFrame(sal_Bool bNewFrame) { bNew = bNewFrame; }
SetFormatUsed(sal_Bool bFmt,sal_Bool bDrw)140cdf0e10cSrcweir 	inline void		SetFormatUsed(sal_Bool bFmt, sal_Bool bDrw) { bFormat = bFmt;
141cdf0e10cSrcweir 															bDrawMode = bDrw; }
SetShell(SwWrtShell * pSh)142cdf0e10cSrcweir 	inline void		SetShell(SwWrtShell* pSh) { pWrtSh = pSh; }
143cdf0e10cSrcweir };
144cdf0e10cSrcweir 
145cdf0e10cSrcweir #endif
146cdf0e10cSrcweir 
147cdf0e10cSrcweir 
148