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  std::unique_ptr<weld::CheckButton> m_xAllowOverlapCB;
70 
71  void SetImages();
72  virtual void ActivatePage(const SfxItemSet& rSet) override;
73  virtual DeactivateRC DeactivatePage(SfxItemSet *pSet) override;
74 
75  DECL_LINK(RangeModifyHdl, weld::MetricSpinButton&, void);
76  DECL_LINK(WrapTypeHdl, weld::ToggleButton&, void);
77  DECL_LINK(ContourHdl, weld::ToggleButton&, void);
78 
79  static const sal_uInt16 m_aWrapPageRg[];
80 
81 public:
82  SwWrapTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet &rSet);
83  static std::unique_ptr<SfxTabPage> Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet *rSet);
84  virtual ~SwWrapTabPage() override;
85 
86  virtual bool FillItemSet(SfxItemSet *rSet) override;
87  virtual void Reset(const SfxItemSet *rSet) override;
88 
89  static const sal_uInt16* GetRanges() { return m_aWrapPageRg; }
90  void SetNewFrame(bool bNewFrame) { m_bNew = bNewFrame; }
91  void SetFormatUsed(bool bFormat, bool bDrawMode) { m_bFormat = bFormat; m_bDrawMode = bDrawMode; }
92  void SetShell(SwWrtShell* pSh) { m_pWrtSh = pSh; }
93 };
94 
95 #endif
96 
97 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
const SfxItemSet * pSet
void SetFormatUsed(bool bFormat, bool bDrawMode)
Definition: wrap.hxx:91
std::unique_ptr< weld::MetricSpinButton > m_xBottomMarginED
Definition: wrap.hxx:62
std::unique_ptr< weld::RadioButton > m_xWrapParallelRB
Definition: wrap.hxx:54
RndStdIds m_nAnchorId
Definition: wrap.hxx:39
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rSet)
Definition: wrap.cxx:117
virtual ~SwWrapTabPage() override
Definition: wrap.cxx:113
Used by the UI to modify the document model.
Definition: wrtsh.hxx:90
void SetNewFrame(bool bNewFrame)
Definition: wrap.hxx:90
virtual void Reset(const SfxItemSet *rSet) override
Definition: wrap.cxx:122
void SetShell(SwWrtShell *pSh)
Definition: wrap.hxx:92
std::unique_ptr< weld::RadioButton > m_xWrapRightRB
Definition: wrap.hxx:53
virtual DeactivateRC DeactivatePage(SfxItemSet *pSet) override
Definition: wrap.cxx:548
std::unique_ptr< weld::RadioButton > m_xWrapLeftRB
Definition: wrap.hxx:52
std::unique_ptr< weld::CheckButton > m_xWrapOutlineCB
Definition: wrap.hxx:67
SwWrapTabPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rSet)
Definition: wrap.cxx:68
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:261
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
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:57
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:79
DeactivateRC
RndStdIds
virtual void ActivatePage(const SfxItemSet &rSet) override
Definition: wrap.cxx:374
std::unique_ptr< weld::CheckButton > m_xAllowOverlapCB
Definition: wrap.hxx:69
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:608
static const sal_uInt16 * GetRanges()
Definition: wrap.hxx:89