nss: upgrade to release 3.73
[LibreOffice.git] / sw / source / uibase / inc / pggrid.hxx
bloba43aee7b468631c4250ad27dac20deb7187d2df7
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 .
19 #ifndef INCLUDED_SW_SOURCE_UIBASE_INC_PGGRID_HXX
20 #define INCLUDED_SW_SOURCE_UIBASE_INC_PGGRID_HXX
22 #include <sfx2/tabdlg.hxx>
23 #include "colex.hxx"
24 #include <vcl/customweld.hxx>
25 #include <vcl/weld.hxx>
26 #include <svx/colorbox.hxx>
28 // TabPage Format/(Styles/)Page/Text grid
29 class SwTextGridPage: public SfxTabPage
31 sal_Int32 m_nRubyUserValue;
32 bool m_bRubyUserValue;
33 Size m_aPageSize;
34 bool m_bVertical;
35 bool m_bSquaredMode;
36 bool m_bHRulerChanged;
37 bool m_bVRulerChanged;
39 SwPageGridExample m_aExampleWN;
40 std::unique_ptr<weld::RadioButton> m_xNoGridRB;
41 std::unique_ptr<weld::RadioButton> m_xLinesGridRB;
42 std::unique_ptr<weld::RadioButton> m_xCharsGridRB;
43 std::unique_ptr<weld::CheckButton> m_xSnapToCharsCB;
44 std::unique_ptr<weld::CustomWeld> m_xExampleWN;
45 std::unique_ptr<weld::Widget> m_xLayoutFL;
46 std::unique_ptr<weld::SpinButton> m_xLinesPerPageNF;
47 std::unique_ptr<weld::Label> m_xLinesRangeFT;
48 std::unique_ptr<weld::MetricSpinButton> m_xTextSizeMF;
49 std::unique_ptr<weld::Label> m_xCharsPerLineFT;
50 std::unique_ptr<weld::SpinButton> m_xCharsPerLineNF;
51 std::unique_ptr<weld::Label> m_xCharsRangeFT;
52 std::unique_ptr<weld::Label> m_xCharWidthFT;
53 std::unique_ptr<weld::MetricSpinButton> m_xCharWidthMF;
54 std::unique_ptr<weld::Label> m_xRubySizeFT;
55 std::unique_ptr<weld::MetricSpinButton> m_xRubySizeMF;
56 std::unique_ptr<weld::CheckButton> m_xRubyBelowCB;
57 std::unique_ptr<weld::Widget> m_xDisplayFL;
58 std::unique_ptr<weld::CheckButton> m_xDisplayCB;
59 std::unique_ptr<weld::CheckButton> m_xPrintCB;
60 std::unique_ptr<ColorListBox> m_xColorLB;
62 void UpdatePageSize(const SfxItemSet& rSet);
63 void PutGridItem(SfxItemSet& rSet);
64 static void SetLinesOrCharsRanges(weld::Label& rField, const sal_Int32 nValue);
66 void GridModifyHdl();
68 DECL_LINK(GridTypeHdl, weld::ToggleButton&, void);
69 DECL_LINK(CharorLineChangedHdl, weld::SpinButton&, void);
70 DECL_LINK(TextSizeChangedHdl, weld::MetricSpinButton&, void);
71 DECL_LINK(ColorModifyHdl, ColorListBox&, void);
72 DECL_LINK(GridModifyClickHdl, weld::ToggleButton&, void);
73 DECL_LINK(DisplayGridHdl, weld::ToggleButton&, void);
75 public:
76 SwTextGridPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet &rSet);
77 virtual ~SwTextGridPage() override;
79 static std::unique_ptr<SfxTabPage> Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet *rSet);
80 static const sal_uInt16* GetRanges();
82 virtual bool FillItemSet(SfxItemSet *rSet) override;
83 virtual void Reset(const SfxItemSet *rSet) override;
85 virtual void ActivatePage( const SfxItemSet& rSet ) override;
86 virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
89 #endif
91 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */