xref: /aoo41x/main/sw/source/ui/inc/wrap.hxx (revision cdf0e10c)
1*cdf0e10cSrcweir /*************************************************************************
2*cdf0e10cSrcweir  *
3*cdf0e10cSrcweir  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4*cdf0e10cSrcweir  *
5*cdf0e10cSrcweir  * Copyright 2000, 2010 Oracle and/or its affiliates.
6*cdf0e10cSrcweir  *
7*cdf0e10cSrcweir  * OpenOffice.org - a multi-platform office productivity suite
8*cdf0e10cSrcweir  *
9*cdf0e10cSrcweir  * This file is part of OpenOffice.org.
10*cdf0e10cSrcweir  *
11*cdf0e10cSrcweir  * OpenOffice.org is free software: you can redistribute it and/or modify
12*cdf0e10cSrcweir  * it under the terms of the GNU Lesser General Public License version 3
13*cdf0e10cSrcweir  * only, as published by the Free Software Foundation.
14*cdf0e10cSrcweir  *
15*cdf0e10cSrcweir  * OpenOffice.org is distributed in the hope that it will be useful,
16*cdf0e10cSrcweir  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17*cdf0e10cSrcweir  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18*cdf0e10cSrcweir  * GNU Lesser General Public License version 3 for more details
19*cdf0e10cSrcweir  * (a copy is included in the LICENSE file that accompanied this code).
20*cdf0e10cSrcweir  *
21*cdf0e10cSrcweir  * You should have received a copy of the GNU Lesser General Public License
22*cdf0e10cSrcweir  * version 3 along with OpenOffice.org.  If not, see
23*cdf0e10cSrcweir  * <http://www.openoffice.org/license.html>
24*cdf0e10cSrcweir  * for a copy of the LGPLv3 License.
25*cdf0e10cSrcweir  *
26*cdf0e10cSrcweir  ************************************************************************/
27*cdf0e10cSrcweir #ifndef _WRAP_HXX
28*cdf0e10cSrcweir #define _WRAP_HXX
29*cdf0e10cSrcweir 
30*cdf0e10cSrcweir #include <sfx2/tabdlg.hxx>
31*cdf0e10cSrcweir #include <sfx2/basedlgs.hxx>
32*cdf0e10cSrcweir 
33*cdf0e10cSrcweir #ifndef _IMAGEBTN_HXX //autogen
34*cdf0e10cSrcweir #include <vcl/button.hxx>
35*cdf0e10cSrcweir #endif
36*cdf0e10cSrcweir 
37*cdf0e10cSrcweir #ifndef _BUTTON_HXX //autogen
38*cdf0e10cSrcweir #include <vcl/button.hxx>
39*cdf0e10cSrcweir #endif
40*cdf0e10cSrcweir 
41*cdf0e10cSrcweir #ifndef _FIXED_HXX //autogen
42*cdf0e10cSrcweir #include <vcl/fixed.hxx>
43*cdf0e10cSrcweir #endif
44*cdf0e10cSrcweir 
45*cdf0e10cSrcweir #ifndef _FIELD_HXX //autogen
46*cdf0e10cSrcweir #include <vcl/field.hxx>
47*cdf0e10cSrcweir #endif
48*cdf0e10cSrcweir 
49*cdf0e10cSrcweir class Window;
50*cdf0e10cSrcweir class SfxItemSet;
51*cdf0e10cSrcweir class SwWrtShell;
52*cdf0e10cSrcweir 
53*cdf0e10cSrcweir class SwWrapDlg : public SfxSingleTabDialog
54*cdf0e10cSrcweir {
55*cdf0e10cSrcweir 	SwWrtShell* 		pWrtShell;
56*cdf0e10cSrcweir 
57*cdf0e10cSrcweir public:
58*cdf0e10cSrcweir 	 SwWrapDlg(Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh, sal_Bool bDrawMode);
59*cdf0e10cSrcweir 	~SwWrapDlg();
60*cdf0e10cSrcweir 
61*cdf0e10cSrcweir 	inline SwWrtShell* 	GetWrtShell()	{ return pWrtShell; }
62*cdf0e10cSrcweir };
63*cdf0e10cSrcweir 
64*cdf0e10cSrcweir 
65*cdf0e10cSrcweir /*--------------------------------------------------------------------
66*cdf0e10cSrcweir 	Beschreibung:	Umlauf-TabPage
67*cdf0e10cSrcweir  --------------------------------------------------------------------*/
68*cdf0e10cSrcweir 
69*cdf0e10cSrcweir class SwWrapTabPage: public SfxTabPage
70*cdf0e10cSrcweir {
71*cdf0e10cSrcweir 	// WRAPPING
72*cdf0e10cSrcweir     FixedLine           aWrapFLC;
73*cdf0e10cSrcweir 	ImageRadioButton	aNoWrapRB;
74*cdf0e10cSrcweir 	ImageRadioButton	aWrapLeftRB;
75*cdf0e10cSrcweir 	ImageRadioButton	aWrapRightRB;
76*cdf0e10cSrcweir 	ImageRadioButton	aWrapParallelRB;
77*cdf0e10cSrcweir 	ImageRadioButton	aWrapThroughRB;
78*cdf0e10cSrcweir 	ImageRadioButton	aIdealWrapRB;
79*cdf0e10cSrcweir 
80*cdf0e10cSrcweir 	// MARGIN
81*cdf0e10cSrcweir     FixedLine           aMarginFL;
82*cdf0e10cSrcweir 	FixedText			aLeftMarginFT;
83*cdf0e10cSrcweir 	MetricField 		aLeftMarginED;
84*cdf0e10cSrcweir 	FixedText			aRightMarginFT;
85*cdf0e10cSrcweir 	MetricField 		aRightMarginED;
86*cdf0e10cSrcweir 	FixedText			aTopMarginFT;
87*cdf0e10cSrcweir 	MetricField 		aTopMarginED;
88*cdf0e10cSrcweir 	FixedText			aBottomMarginFT;
89*cdf0e10cSrcweir 	MetricField 		aBottomMarginED;
90*cdf0e10cSrcweir 
91*cdf0e10cSrcweir     // OPTIONS
92*cdf0e10cSrcweir     FixedLine           aOptionsSepFL;
93*cdf0e10cSrcweir     FixedLine           aOptionsFL;
94*cdf0e10cSrcweir     CheckBox            aWrapAnchorOnlyCB;
95*cdf0e10cSrcweir 	CheckBox			aWrapTransparentCB;
96*cdf0e10cSrcweir 	CheckBox			aWrapOutlineCB;
97*cdf0e10cSrcweir 	CheckBox			aWrapOutsideCB;
98*cdf0e10cSrcweir 
99*cdf0e10cSrcweir 	ImageList			aWrapIL;
100*cdf0e10cSrcweir     ImageList           aWrapILH;
101*cdf0e10cSrcweir 
102*cdf0e10cSrcweir 	sal_uInt16				nOldLeftMargin;
103*cdf0e10cSrcweir 	sal_uInt16				nOldRightMargin;
104*cdf0e10cSrcweir 	sal_uInt16				nOldUpperMargin;
105*cdf0e10cSrcweir 	sal_uInt16				nOldLowerMargin;
106*cdf0e10cSrcweir 
107*cdf0e10cSrcweir     RndStdIds           nAnchorId;
108*cdf0e10cSrcweir 	sal_uInt16 				nHtmlMode;
109*cdf0e10cSrcweir 
110*cdf0e10cSrcweir 	Size aFrmSize;
111*cdf0e10cSrcweir 	SwWrtShell*			pWrtSh;
112*cdf0e10cSrcweir 
113*cdf0e10cSrcweir 	sal_Bool bFormat;
114*cdf0e10cSrcweir 	sal_Bool bNew;
115*cdf0e10cSrcweir 	sal_Bool bHtmlMode;
116*cdf0e10cSrcweir 	sal_Bool bDrawMode;
117*cdf0e10cSrcweir 	sal_Bool bContourImage;
118*cdf0e10cSrcweir 
119*cdf0e10cSrcweir 	SwWrapTabPage(Window *pParent, const SfxItemSet &rSet);
120*cdf0e10cSrcweir 	~SwWrapTabPage();
121*cdf0e10cSrcweir 
122*cdf0e10cSrcweir     void            ApplyImageList();
123*cdf0e10cSrcweir     void            EnableModes(const SfxItemSet& rSet);
124*cdf0e10cSrcweir 	virtual void 	ActivatePage(const SfxItemSet& rSet);
125*cdf0e10cSrcweir 	virtual int 	DeactivatePage(SfxItemSet *pSet);
126*cdf0e10cSrcweir     virtual void    DataChanged( const DataChangedEvent& rDCEvt );
127*cdf0e10cSrcweir 
128*cdf0e10cSrcweir 	DECL_LINK( RangeModifyHdl, MetricField * );
129*cdf0e10cSrcweir 	DECL_LINK( WrapTypeHdl, ImageRadioButton * );
130*cdf0e10cSrcweir 	DECL_LINK( ContourHdl, CheckBox * );
131*cdf0e10cSrcweir 
132*cdf0e10cSrcweir     using SfxTabPage::ActivatePage;
133*cdf0e10cSrcweir     using SfxTabPage::DeactivatePage;
134*cdf0e10cSrcweir 
135*cdf0e10cSrcweir public:
136*cdf0e10cSrcweir 
137*cdf0e10cSrcweir     static SfxTabPage *Create(Window *pParent, const SfxItemSet &rSet);
138*cdf0e10cSrcweir 
139*cdf0e10cSrcweir 	virtual sal_Bool 	FillItemSet(SfxItemSet &rSet);
140*cdf0e10cSrcweir 	virtual void 	Reset(const SfxItemSet &rSet);
141*cdf0e10cSrcweir 
142*cdf0e10cSrcweir 	static sal_uInt16*	GetRanges();
143*cdf0e10cSrcweir 	inline void		SetNewFrame(sal_Bool bNewFrame) { bNew = bNewFrame; }
144*cdf0e10cSrcweir 	inline void		SetFormatUsed(sal_Bool bFmt, sal_Bool bDrw) { bFormat = bFmt;
145*cdf0e10cSrcweir 															bDrawMode = bDrw; }
146*cdf0e10cSrcweir 	inline void		SetShell(SwWrtShell* pSh) { pWrtSh = pSh; }
147*cdf0e10cSrcweir };
148*cdf0e10cSrcweir 
149*cdf0e10cSrcweir #endif
150*cdf0e10cSrcweir 
151*cdf0e10cSrcweir 
152