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 
20 #pragma once
21 
22 #include <sfx2/tabdlg.hxx>
23 #include <sfx2/basedlgs.hxx>
24 #include <svx/swframetypes.hxx>
25 
26 class SfxItemSet;
27 class SwWrtShell;
28 
30 {
31 public:
32  SwWrapDlg(weld::Window* pParent, const SfxItemSet& rSet, SwWrtShell* pSh, bool bDrawMode);
33 };
34 
35 // circulation TabPage
36 class SwWrapTabPage final : public SfxTabPage
37 {
39  sal_uInt16 m_nHtmlMode;
40 
42 
43  bool m_bFormat;
44  bool m_bNew;
48 
49  // WRAPPING
50  std::unique_ptr<weld::Image> m_xNoWrapImg;
51  std::unique_ptr<weld::RadioButton> m_xNoWrapRB;
52  std::unique_ptr<weld::Image> m_xWrapLeftImg;
53  std::unique_ptr<weld::RadioButton> m_xWrapLeftRB;
54  std::unique_ptr<weld::Image> m_xWrapRightImg;
55  std::unique_ptr<weld::RadioButton> m_xWrapRightRB;
56  std::unique_ptr<weld::Image> m_xWrapParallelImg;
57  std::unique_ptr<weld::RadioButton> m_xWrapParallelRB;
58  std::unique_ptr<weld::Image> m_xWrapThroughImg;
59  std::unique_ptr<weld::RadioButton> m_xWrapThroughRB;
60  std::unique_ptr<weld::Image> m_xIdealWrapImg;
61  std::unique_ptr<weld::RadioButton> m_xIdealWrapRB;
62 
63  // MARGIN
64  std::unique_ptr<weld::MetricSpinButton> m_xLeftMarginED;
65  std::unique_ptr<weld::MetricSpinButton> m_xRightMarginED;
66  std::unique_ptr<weld::MetricSpinButton> m_xTopMarginED;
67  std::unique_ptr<weld::MetricSpinButton> m_xBottomMarginED;
68 
69  // OPTIONS
70  std::unique_ptr<weld::CheckButton> m_xWrapAnchorOnlyCB;
71  std::unique_ptr<weld::CheckButton> m_xWrapTransparentCB;
72  std::unique_ptr<weld::CheckButton> m_xWrapOutlineCB;
73  std::unique_ptr<weld::CheckButton> m_xWrapOutsideCB;
74  std::unique_ptr<weld::CheckButton> m_xAllowOverlapCB;
75 
76  void SetImages();
77  virtual void ActivatePage(const SfxItemSet& rSet) override;
78  virtual DeactivateRC DeactivatePage(SfxItemSet *pSet) override;
79 
80  DECL_LINK(RangeModifyHdl, weld::MetricSpinButton&, void);
81  DECL_LINK(WrapTypeHdl, weld::Toggleable&, void);
82  DECL_LINK(ContourHdl, weld::Toggleable&, void);
83 
85 
86 public:
87  SwWrapTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet &rSet);
88  static std::unique_ptr<SfxTabPage> Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet *rSet);
89  virtual ~SwWrapTabPage() override;
90 
91  virtual bool FillItemSet(SfxItemSet *rSet) override;
92  virtual void Reset(const SfxItemSet *rSet) override;
93 
95  void SetNewFrame(bool bNewFrame) { m_bNew = bNewFrame; }
96  void SetFormatUsed(bool bFormat, bool bDrawMode) { m_bFormat = bFormat; m_bDrawMode = bDrawMode; }
97  void SetShell(SwWrtShell* pSh) { m_pWrtSh = pSh; }
98 };
99 
100 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
const SfxItemSet * pSet
void SetFormatUsed(bool bFormat, bool bDrawMode)
Definition: wrap.hxx:96
std::unique_ptr< weld::MetricSpinButton > m_xBottomMarginED
Definition: wrap.hxx:67
std::unique_ptr< weld::Image > m_xIdealWrapImg
Definition: wrap.hxx:60
static WhichRangesContainer GetRanges()
Definition: wrap.hxx:94
std::unique_ptr< weld::RadioButton > m_xWrapParallelRB
Definition: wrap.hxx:57
RndStdIds m_nAnchorId
Definition: wrap.hxx:38
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rSet)
Definition: wrap.cxx:119
virtual ~SwWrapTabPage() override
Definition: wrap.cxx:115
std::unique_ptr< weld::Image > m_xWrapParallelImg
Definition: wrap.hxx:56
Used by the UI to modify the document model.
Definition: wrtsh.hxx:93
std::unique_ptr< weld::Image > m_xWrapRightImg
Definition: wrap.hxx:54
static const WhichRangesContainer m_aWrapPageRg
Definition: wrap.hxx:84
void SetNewFrame(bool bNewFrame)
Definition: wrap.hxx:95
virtual void Reset(const SfxItemSet *rSet) override
Definition: wrap.cxx:124
void SetShell(SwWrtShell *pSh)
Definition: wrap.hxx:97
std::unique_ptr< weld::RadioButton > m_xWrapRightRB
Definition: wrap.hxx:55
virtual DeactivateRC DeactivatePage(SfxItemSet *pSet) override
Definition: wrap.cxx:550
std::unique_ptr< weld::RadioButton > m_xWrapLeftRB
Definition: wrap.hxx:53
std::unique_ptr< weld::CheckButton > m_xWrapOutlineCB
Definition: wrap.hxx:72
SwWrapTabPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rSet)
Definition: wrap.cxx:64
std::unique_ptr< weld::RadioButton > m_xWrapThroughRB
Definition: wrap.hxx:59
std::unique_ptr< weld::MetricSpinButton > m_xRightMarginED
Definition: wrap.hxx:65
DECL_LINK(RangeModifyHdl, weld::MetricSpinButton &, void)
bool m_bHtmlMode
Definition: wrap.hxx:45
SwWrtShell * m_pWrtSh
Definition: wrap.hxx:41
std::unique_ptr< weld::MetricSpinButton > m_xLeftMarginED
Definition: wrap.hxx:64
std::unique_ptr< weld::MetricSpinButton > m_xTopMarginED
Definition: wrap.hxx:66
virtual bool FillItemSet(SfxItemSet *rSet) override
Definition: wrap.cxx:263
std::unique_ptr< weld::CheckButton > m_xWrapTransparentCB
Definition: wrap.hxx:71
bool m_bFormat
Definition: wrap.hxx:43
sal_uInt16 m_nHtmlMode
Definition: wrap.hxx:39
bool m_bDrawMode
Definition: wrap.hxx:46
std::unique_ptr< weld::CheckButton > m_xWrapAnchorOnlyCB
Definition: wrap.hxx:70
bool m_bNew
Definition: wrap.hxx:44
std::unique_ptr< weld::RadioButton > m_xIdealWrapRB
Definition: wrap.hxx:61
DeactivateRC
RndStdIds
virtual void ActivatePage(const SfxItemSet &rSet) override
Definition: wrap.cxx:376
std::unique_ptr< weld::CheckButton > m_xAllowOverlapCB
Definition: wrap.hxx:74
std::unique_ptr< weld::Image > m_xWrapLeftImg
Definition: wrap.hxx:52
bool m_bContourImage
Definition: wrap.hxx:47
std::unique_ptr< weld::CheckButton > m_xWrapOutsideCB
Definition: wrap.hxx:73
std::unique_ptr< weld::RadioButton > m_xNoWrapRB
Definition: wrap.hxx:51
void SetImages()
Definition: wrap.cxx:610
std::unique_ptr< weld::Image > m_xWrapThroughImg
Definition: wrap.hxx:58
SwWrapDlg(weld::Window *pParent, const SfxItemSet &rSet, SwWrtShell *pSh, bool bDrawMode)
Definition: wrap.cxx:53
std::unique_ptr< weld::Image > m_xNoWrapImg
Definition: wrap.hxx:50