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 INCLUDED_SW_SOURCE_UI_INC_WRAP_HXX
20 : #define INCLUDED_SW_SOURCE_UI_INC_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 0 : class SwWrapDlg : public SfxSingleTabDialog
33 : {
34 : SwWrtShell* pWrtShell;
35 :
36 : public:
37 : SwWrapDlg(Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh, bool bDrawMode);
38 :
39 : SwWrtShell* GetWrtShell() { return pWrtShell; }
40 : };
41 :
42 : /*--------------------------------------------------------------------
43 : Description: circulation TabPage
44 : --------------------------------------------------------------------*/
45 :
46 : class SwWrapTabPage: public SfxTabPage
47 : {
48 : // WRAPPING
49 : RadioButton* m_pNoWrapRB;
50 : RadioButton* m_pWrapLeftRB;
51 : RadioButton* m_pWrapRightRB;
52 : RadioButton* m_pWrapParallelRB;
53 : RadioButton* m_pWrapThroughRB;
54 : RadioButton* m_pIdealWrapRB;
55 :
56 : // MARGIN
57 : MetricField* m_pLeftMarginED;
58 : MetricField* m_pRightMarginED;
59 : MetricField* m_pTopMarginED;
60 : MetricField* m_pBottomMarginED;
61 :
62 : // OPTIONS
63 : CheckBox* m_pWrapAnchorOnlyCB;
64 : CheckBox* m_pWrapTransparentCB;
65 : CheckBox* m_pWrapOutlineCB;
66 : CheckBox* m_pWrapOutsideCB;
67 :
68 : sal_uInt16 nOldLeftMargin;
69 : sal_uInt16 nOldRightMargin;
70 : sal_uInt16 nOldUpperMargin;
71 : sal_uInt16 nOldLowerMargin;
72 :
73 : RndStdIds nAnchorId;
74 : sal_uInt16 nHtmlMode;
75 :
76 : Size aFrmSize;
77 : SwWrtShell* pWrtSh;
78 :
79 : sal_Bool bFormat;
80 : sal_Bool bNew;
81 : sal_Bool bHtmlMode;
82 : sal_Bool bDrawMode;
83 : sal_Bool bContourImage;
84 :
85 : SwWrapTabPage(Window *pParent, const SfxItemSet &rSet);
86 : virtual ~SwWrapTabPage();
87 :
88 : void ApplyImageList();
89 : void EnableModes(const SfxItemSet& rSet);
90 : virtual void ActivatePage(const SfxItemSet& rSet) SAL_OVERRIDE;
91 : virtual int DeactivatePage(SfxItemSet *pSet) SAL_OVERRIDE;
92 : virtual void DataChanged( const DataChangedEvent& rDCEvt ) SAL_OVERRIDE;
93 :
94 : DECL_LINK( RangeModifyHdl, MetricField * );
95 : DECL_LINK( WrapTypeHdl, RadioButton * );
96 : DECL_LINK(ContourHdl, void *);
97 :
98 : using SfxTabPage::ActivatePage;
99 : using SfxTabPage::DeactivatePage;
100 :
101 : public:
102 :
103 : static SfxTabPage *Create(Window *pParent, const SfxItemSet &rSet);
104 :
105 : virtual bool FillItemSet(SfxItemSet &rSet) SAL_OVERRIDE;
106 : virtual void Reset(const SfxItemSet &rSet) SAL_OVERRIDE;
107 :
108 : static sal_uInt16* GetRanges();
109 0 : inline void SetNewFrame(sal_Bool bNewFrame) { bNew = bNewFrame; }
110 0 : inline void SetFormatUsed(sal_Bool bFmt, sal_Bool bDrw) { bFormat = bFmt;
111 0 : bDrawMode = bDrw; }
112 0 : inline void SetShell(SwWrtShell* pSh) { pWrtSh = pSh; }
113 : };
114 :
115 : #endif
116 :
117 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|