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