update dev300-m58
[ooovba.git] / sw / source / ui / inc / wrap.hxx
blobfb157414c9a1029b5515eefbc1dcb694f5a2db3f
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: wrap.hxx,v $
10 * $Revision: 1.9 $
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 ************************************************************************/
30 #ifndef _WRAP_HXX
31 #define _WRAP_HXX
33 #include <sfx2/tabdlg.hxx>
34 #include <sfx2/basedlgs.hxx>
36 #ifndef _IMAGEBTN_HXX //autogen
37 #include <vcl/imagebtn.hxx>
38 #endif
40 #ifndef _BUTTON_HXX //autogen
41 #include <vcl/button.hxx>
42 #endif
44 #ifndef _FIXED_HXX //autogen
45 #include <vcl/fixed.hxx>
46 #endif
48 #ifndef _FIELD_HXX //autogen
49 #include <vcl/field.hxx>
50 #endif
52 class Window;
53 class SfxItemSet;
54 class SwWrtShell;
56 class SwWrapDlg : public SfxSingleTabDialog
58 SwWrtShell* pWrtShell;
60 public:
61 SwWrapDlg(Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh, BOOL bDrawMode);
62 ~SwWrapDlg();
64 inline SwWrtShell* GetWrtShell() { return pWrtShell; }
68 /*--------------------------------------------------------------------
69 Beschreibung: Umlauf-TabPage
70 --------------------------------------------------------------------*/
72 class SwWrapTabPage: public SfxTabPage
74 // WRAPPING
75 FixedLine aWrapFLC;
76 ImageRadioButton aNoWrapRB;
77 ImageRadioButton aWrapLeftRB;
78 ImageRadioButton aWrapRightRB;
79 ImageRadioButton aWrapParallelRB;
80 ImageRadioButton aWrapThroughRB;
81 ImageRadioButton aIdealWrapRB;
83 // MARGIN
84 FixedLine aMarginFL;
85 FixedText aLeftMarginFT;
86 MetricField aLeftMarginED;
87 FixedText aRightMarginFT;
88 MetricField aRightMarginED;
89 FixedText aTopMarginFT;
90 MetricField aTopMarginED;
91 FixedText aBottomMarginFT;
92 MetricField aBottomMarginED;
94 // OPTIONS
95 FixedLine aOptionsSepFL;
96 FixedLine aOptionsFL;
97 CheckBox aWrapAnchorOnlyCB;
98 CheckBox aWrapTransparentCB;
99 CheckBox aWrapOutlineCB;
100 CheckBox aWrapOutsideCB;
102 ImageList aWrapIL;
103 ImageList aWrapILH;
105 USHORT nOldLeftMargin;
106 USHORT nOldRightMargin;
107 USHORT nOldUpperMargin;
108 USHORT nOldLowerMargin;
110 RndStdIds nAnchorId;
111 USHORT nHtmlMode;
113 Size aFrmSize;
114 SwWrtShell* pWrtSh;
116 BOOL bFormat;
117 BOOL bNew;
118 BOOL bHtmlMode;
119 BOOL bDrawMode;
120 BOOL bContourImage;
122 SwWrapTabPage(Window *pParent, const SfxItemSet &rSet);
123 ~SwWrapTabPage();
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;
138 public:
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;
148 bDrawMode = bDrw; }
149 inline void SetShell(SwWrtShell* pSh) { pWrtSh = pSh; }
152 #endif