1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: wrap.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
33 #include <sfx2/tabdlg.hxx>
34 #include <sfx2/basedlgs.hxx>
36 #ifndef _IMAGEBTN_HXX //autogen
37 #include <vcl/imagebtn.hxx>
40 #ifndef _BUTTON_HXX //autogen
41 #include <vcl/button.hxx>
44 #ifndef _FIXED_HXX //autogen
45 #include <vcl/fixed.hxx>
48 #ifndef _FIELD_HXX //autogen
49 #include <vcl/field.hxx>
56 class SwWrapDlg
: public SfxSingleTabDialog
58 SwWrtShell
* pWrtShell
;
61 SwWrapDlg(Window
* pParent
, SfxItemSet
& rSet
, SwWrtShell
* pSh
, BOOL bDrawMode
);
64 inline SwWrtShell
* GetWrtShell() { return pWrtShell
; }
68 /*--------------------------------------------------------------------
69 Beschreibung: Umlauf-TabPage
70 --------------------------------------------------------------------*/
72 class SwWrapTabPage
: public SfxTabPage
76 ImageRadioButton aNoWrapRB
;
77 ImageRadioButton aWrapLeftRB
;
78 ImageRadioButton aWrapRightRB
;
79 ImageRadioButton aWrapParallelRB
;
80 ImageRadioButton aWrapThroughRB
;
81 ImageRadioButton aIdealWrapRB
;
85 FixedText aLeftMarginFT
;
86 MetricField aLeftMarginED
;
87 FixedText aRightMarginFT
;
88 MetricField aRightMarginED
;
89 FixedText aTopMarginFT
;
90 MetricField aTopMarginED
;
91 FixedText aBottomMarginFT
;
92 MetricField aBottomMarginED
;
95 FixedLine aOptionsSepFL
;
97 CheckBox aWrapAnchorOnlyCB
;
98 CheckBox aWrapTransparentCB
;
99 CheckBox aWrapOutlineCB
;
100 CheckBox aWrapOutsideCB
;
105 USHORT nOldLeftMargin
;
106 USHORT nOldRightMargin
;
107 USHORT nOldUpperMargin
;
108 USHORT nOldLowerMargin
;
122 SwWrapTabPage(Window
*pParent
, const SfxItemSet
&rSet
);
125 void ApplyImageList();
126 void EnableModes(const SfxItemSet
& rSet
);
127 virtual void ActivatePage(const SfxItemSet
& rSet
);
128 virtual int DeactivatePage(SfxItemSet
*pSet
);
129 virtual void DataChanged( const DataChangedEvent
& rDCEvt
);
131 DECL_LINK( RangeModifyHdl
, MetricField
* );
132 DECL_LINK( WrapTypeHdl
, ImageRadioButton
* );
133 DECL_LINK( ContourHdl
, CheckBox
* );
135 using SfxTabPage::ActivatePage
;
136 using SfxTabPage::DeactivatePage
;
140 static SfxTabPage
*Create(Window
*pParent
, const SfxItemSet
&rSet
);
142 virtual BOOL
FillItemSet(SfxItemSet
&rSet
);
143 virtual void Reset(const SfxItemSet
&rSet
);
145 static USHORT
* GetRanges();
146 inline void SetNewFrame(BOOL bNewFrame
) { bNew
= bNewFrame
; }
147 inline void SetFormatUsed(BOOL bFmt
, BOOL bDrw
) { bFormat
= bFmt
;
149 inline void SetShell(SwWrtShell
* pSh
) { pWrtSh
= pSh
; }