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