nss: upgrade to release 3.73
[LibreOffice.git] / sw / source / uibase / inc / wrap.hxx
blob3a69e43ff210b9f47c329d2ca84d51bff5541864
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #pragma once
22 #include <sfx2/tabdlg.hxx>
23 #include <sfx2/basedlgs.hxx>
24 #include <svx/swframetypes.hxx>
26 namespace vcl { class Window; }
27 class SfxItemSet;
28 class SwWrtShell;
30 class SwWrapDlg : public SfxSingleTabDialogController
32 public:
33 SwWrapDlg(weld::Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh, bool bDrawMode);
36 // circulation TabPage
37 class SwWrapTabPage: public SfxTabPage
39 RndStdIds m_nAnchorId;
40 sal_uInt16 m_nHtmlMode;
42 SwWrtShell* m_pWrtSh;
44 bool m_bFormat;
45 bool m_bNew;
46 bool m_bHtmlMode;
47 bool m_bDrawMode;
48 bool m_bContourImage;
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;
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;
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;
71 void SetImages();
72 virtual void ActivatePage(const SfxItemSet& rSet) override;
73 virtual DeactivateRC DeactivatePage(SfxItemSet *pSet) override;
75 DECL_LINK(RangeModifyHdl, weld::MetricSpinButton&, void);
76 DECL_LINK(WrapTypeHdl, weld::ToggleButton&, void);
77 DECL_LINK(ContourHdl, weld::ToggleButton&, void);
79 static const sal_uInt16 m_aWrapPageRg[];
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;
86 virtual bool FillItemSet(SfxItemSet *rSet) override;
87 virtual void Reset(const SfxItemSet *rSet) override;
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; }
95 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */