Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
5 : * This Source Code Form is subject to the terms of the Mozilla Public
6 : * License, v. 2.0. If a copy of the MPL was not distributed with this
7 : * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
11 : * Licensed to the Apache Software Foundation (ASF) under one or more
12 : * contributor license agreements. See the NOTICE file distributed
13 : * with this work for additional information regarding copyright
14 : * ownership. The ASF licenses this file to you under the Apache
15 : * License, Version 2.0 (the "License"); you may not use this file
16 : * except in compliance with the License. You may obtain a copy of
17 : * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 : */
19 : #ifndef _WRAP_HXX
20 : #define _WRAP_HXX
21 :
22 : #include <sfx2/tabdlg.hxx>
23 : #include <sfx2/basedlgs.hxx>
24 : #include <vcl/button.hxx>
25 : #include <vcl/fixed.hxx>
26 : #include <vcl/field.hxx>
27 :
28 : class Window;
29 : class SfxItemSet;
30 : class SwWrtShell;
31 :
32 : class SwWrapDlg : public SfxNoLayoutSingleTabDialog
33 : {
34 : SwWrtShell* pWrtShell;
35 :
36 : public:
37 : SwWrapDlg(Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh, sal_Bool bDrawMode);
38 : ~SwWrapDlg();
39 :
40 : inline SwWrtShell* GetWrtShell() { return pWrtShell; }
41 : };
42 :
43 :
44 : /*--------------------------------------------------------------------
45 : Description: circulation TabPage
46 : --------------------------------------------------------------------*/
47 :
48 : class SwWrapTabPage: public SfxTabPage
49 : {
50 : // WRAPPING
51 : FixedLine aWrapFLC;
52 : ImageRadioButton aNoWrapRB;
53 : ImageRadioButton aWrapLeftRB;
54 : ImageRadioButton aWrapRightRB;
55 : ImageRadioButton aWrapParallelRB;
56 : ImageRadioButton aWrapThroughRB;
57 : ImageRadioButton aIdealWrapRB;
58 :
59 : // MARGIN
60 : FixedLine aMarginFL;
61 : FixedText aLeftMarginFT;
62 : MetricField aLeftMarginED;
63 : FixedText aRightMarginFT;
64 : MetricField aRightMarginED;
65 : FixedText aTopMarginFT;
66 : MetricField aTopMarginED;
67 : FixedText aBottomMarginFT;
68 : MetricField aBottomMarginED;
69 :
70 : // OPTIONS
71 : FixedLine aOptionsSepFL;
72 : FixedLine aOptionsFL;
73 : CheckBox aWrapAnchorOnlyCB;
74 : CheckBox aWrapTransparentCB;
75 : CheckBox aWrapOutlineCB;
76 : CheckBox aWrapOutsideCB;
77 :
78 : ImageList aWrapIL;
79 :
80 : sal_uInt16 nOldLeftMargin;
81 : sal_uInt16 nOldRightMargin;
82 : sal_uInt16 nOldUpperMargin;
83 : sal_uInt16 nOldLowerMargin;
84 :
85 : RndStdIds nAnchorId;
86 : sal_uInt16 nHtmlMode;
87 :
88 : Size aFrmSize;
89 : SwWrtShell* pWrtSh;
90 :
91 : sal_Bool bFormat;
92 : sal_Bool bNew;
93 : sal_Bool bHtmlMode;
94 : sal_Bool bDrawMode;
95 : sal_Bool bContourImage;
96 :
97 : SwWrapTabPage(Window *pParent, const SfxItemSet &rSet);
98 : ~SwWrapTabPage();
99 :
100 : void ApplyImageList();
101 : void EnableModes(const SfxItemSet& rSet);
102 : virtual void ActivatePage(const SfxItemSet& rSet);
103 : virtual int DeactivatePage(SfxItemSet *pSet);
104 : virtual void DataChanged( const DataChangedEvent& rDCEvt );
105 :
106 : DECL_LINK( RangeModifyHdl, MetricField * );
107 : DECL_LINK( WrapTypeHdl, ImageRadioButton * );
108 : DECL_LINK(ContourHdl, void *);
109 :
110 : using SfxTabPage::ActivatePage;
111 : using SfxTabPage::DeactivatePage;
112 :
113 : public:
114 :
115 : static SfxTabPage *Create(Window *pParent, const SfxItemSet &rSet);
116 :
117 : virtual sal_Bool FillItemSet(SfxItemSet &rSet);
118 : virtual void Reset(const SfxItemSet &rSet);
119 :
120 : static sal_uInt16* GetRanges();
121 0 : inline void SetNewFrame(sal_Bool bNewFrame) { bNew = bNewFrame; }
122 0 : inline void SetFormatUsed(sal_Bool bFmt, sal_Bool bDrw) { bFormat = bFmt;
123 0 : bDrawMode = bDrw; }
124 0 : inline void SetShell(SwWrtShell* pSh) { pWrtSh = pSh; }
125 : };
126 :
127 : #endif
128 :
129 :
130 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|