LibreOffice Module sw (master)  1
wrap.hxx
Go to the documentation of this file.
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 <svx/swframetypes.hxx>
25 
26 namespace vcl { class Window; }
27 class SfxItemSet;
28 class SwWrtShell;
29 
31 {
32 public:
33  SwWrapDlg(weld::Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh, bool bDrawMode);
34 };
35 
36 // circulation TabPage
38 {
40  sal_uInt16 m_nHtmlMode;
41 
43 
44  bool m_bFormat;
45  bool m_bNew;
49 
50  // WRAPPING
51  std::unique_ptr<weld::RadioButton> m_xNoWrapRB;
52  std::unique_ptr<weld::RadioButton> m_xWrapLeftRB;
53  std::unique_ptr<weld::RadioButton> m_xWrapRightRB;
54  std::unique_ptr<weld::RadioButton> m_xWrapParallelRB;
55  std::unique_ptr<weld::RadioButton> m_xWrapThroughRB;
56  std::unique_ptr<weld::RadioButton> m_xIdealWrapRB;
57 
58  // MARGIN
59  std::unique_ptr<weld::MetricSpinButton> m_xLeftMarginED;
60  std::unique_ptr<weld::MetricSpinButton> m_xRightMarginED;
61  std::unique_ptr<weld::MetricSpinButton> m_xTopMarginED;
62  std::unique_ptr<weld::MetricSpinButton> m_xBottomMarginED;
63 
64  // OPTIONS
65  std::unique_ptr<weld::CheckButton> m_xWrapAnchorOnlyCB;
66  std::unique_ptr<weld::CheckButton> m_xWrapTransparentCB;
67  std::unique_ptr<weld::CheckButton> m_xWrapOutlineCB;
68  std::unique_ptr<weld::CheckButton> m_xWrapOutsideCB;
69 
70  virtual ~SwWrapTabPage() override;
71 
72  void SetImages();
73  virtual void ActivatePage(const SfxItemSet& rSet) override;
74  virtual DeactivateRC DeactivatePage(SfxItemSet *pSet) override;
75 
76  DECL_LINK(RangeModifyHdl, weld::MetricSpinButton&, void);
77  DECL_LINK(WrapTypeHdl, weld::ToggleButton&, void);
78  DECL_LINK(ContourHdl, weld::ToggleButton&, void);
79 
82 
83  static const sal_uInt16 m_aWrapPageRg[];
84 
85 public:
86  SwWrapTabPage(TabPageParent pParent, const SfxItemSet &rSet);
87 
88  static VclPtr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet *rSet);
89 
90  virtual bool FillItemSet(SfxItemSet *rSet) override;
91  virtual void Reset(const SfxItemSet *rSet) override;
92 
93  static const sal_uInt16* GetRanges() { return m_aWrapPageRg; }
94  void SetNewFrame(bool bNewFrame) { m_bNew = bNewFrame; }
95  void SetFormatUsed(bool bFormat, bool bDrawMode) { m_bFormat = bFormat; m_bDrawMode = bDrawMode; }
96  void SetShell(SwWrtShell* pSh) { m_pWrtSh = pSh; }
97 };
98 
99 #endif
100 
101 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
const SfxItemSet * pSet
void SetFormatUsed(bool bFormat, bool bDrawMode)
Definition: wrap.hxx:95
std::unique_ptr< weld::MetricSpinButton > m_xBottomMarginED
Definition: wrap.hxx:62
virtual void ActivatePage(const SfxItemSet &)
std::unique_ptr< weld::RadioButton > m_xWrapParallelRB
Definition: wrap.hxx:54
RndStdIds m_nAnchorId
Definition: wrap.hxx:39
virtual ~SwWrapTabPage() override
Definition: wrap.cxx:111
virtual DeactivateRC DeactivatePage(SfxItemSet *pSet)
Used by the UI to modify the document model.
Definition: wrtsh.hxx:88
void SetNewFrame(bool bNewFrame)
Definition: wrap.hxx:94
virtual void Reset(const SfxItemSet *rSet) override
Definition: wrap.cxx:120
void SetShell(SwWrtShell *pSh)
Definition: wrap.hxx:96
std::unique_ptr< weld::RadioButton > m_xWrapRightRB
Definition: wrap.hxx:53
virtual DeactivateRC DeactivatePage(SfxItemSet *pSet) override
Definition: wrap.cxx:530
std::unique_ptr< weld::RadioButton > m_xWrapLeftRB
Definition: wrap.hxx:52
std::unique_ptr< weld::CheckButton > m_xWrapOutlineCB
Definition: wrap.hxx:67
std::unique_ptr< weld::RadioButton > m_xWrapThroughRB
Definition: wrap.hxx:55
std::unique_ptr< weld::MetricSpinButton > m_xRightMarginED
Definition: wrap.hxx:60
DECL_LINK(RangeModifyHdl, weld::MetricSpinButton &, void)
bool m_bHtmlMode
Definition: wrap.hxx:46
SwWrtShell * m_pWrtSh
Definition: wrap.hxx:42
std::unique_ptr< weld::MetricSpinButton > m_xLeftMarginED
Definition: wrap.hxx:59
std::unique_ptr< weld::MetricSpinButton > m_xTopMarginED
Definition: wrap.hxx:61
virtual bool FillItemSet(SfxItemSet *rSet) override
Definition: wrap.cxx:255
std::unique_ptr< weld::CheckButton > m_xWrapTransparentCB
Definition: wrap.hxx:66
bool m_bFormat
Definition: wrap.hxx:44
sal_uInt16 m_nHtmlMode
Definition: wrap.hxx:40
SwWrapTabPage(TabPageParent pParent, const SfxItemSet &rSet)
Definition: wrap.cxx:67
bool m_bDrawMode
Definition: wrap.hxx:47
std::unique_ptr< weld::CheckButton > m_xWrapAnchorOnlyCB
Definition: wrap.hxx:65
SwWrapDlg(weld::Window *pParent, SfxItemSet &rSet, SwWrtShell *pSh, bool bDrawMode)
Definition: wrap.cxx:56
bool m_bNew
Definition: wrap.hxx:45
std::unique_ptr< weld::RadioButton > m_xIdealWrapRB
Definition: wrap.hxx:56
static const sal_uInt16 m_aWrapPageRg[]
Definition: wrap.hxx:83
DeactivateRC
static VclPtr< SfxTabPage > Create(TabPageParent pParent, const SfxItemSet *rSet)
Definition: wrap.cxx:115
RndStdIds
virtual void ActivatePage(const SfxItemSet &rSet) override
Definition: wrap.cxx:356
bool m_bContourImage
Definition: wrap.hxx:48
std::unique_ptr< weld::CheckButton > m_xWrapOutsideCB
Definition: wrap.hxx:68
std::unique_ptr< weld::RadioButton > m_xNoWrapRB
Definition: wrap.hxx:51
void SetImages()
Definition: wrap.cxx:590
static const sal_uInt16 * GetRanges()
Definition: wrap.hxx:93