Add Marathi autocorrect
[LibreOffice.git] / sw / source / uibase / inc / pggrid.hxx
blob52964df5b5ccfbb2761ea1076adac15d700b0e29
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 #pragma once
21 #include <sfx2/tabdlg.hxx>
22 #include "colex.hxx"
23 #include <vcl/customweld.hxx>
24 #include <vcl/weld.hxx>
25 #include <svx/colorbox.hxx>
27 // TabPage Format/(Styles/)Page/Text grid
28 class SwTextGridPage final : public SfxTabPage
30 sal_Int32 m_nRubyUserValue;
31 bool m_bRubyUserValue;
32 Size m_aPageSize;
33 bool m_bVertical;
34 bool m_bSquaredMode;
35 bool m_bHRulerChanged;
36 bool m_bVRulerChanged;
38 SwPageGridExample m_aExampleWN;
39 std::unique_ptr<weld::RadioButton> m_xNoGridRB;
40 std::unique_ptr<weld::RadioButton> m_xLinesGridRB;
41 std::unique_ptr<weld::RadioButton> m_xCharsGridRB;
42 std::unique_ptr<weld::CheckButton> m_xSnapToCharsCB;
43 std::unique_ptr<weld::CustomWeld> m_xExampleWN;
44 std::unique_ptr<weld::Widget> m_xLayoutFL;
45 std::unique_ptr<weld::SpinButton> m_xLinesPerPageNF;
46 std::unique_ptr<weld::Label> m_xLinesRangeFT;
47 std::unique_ptr<weld::MetricSpinButton> m_xTextSizeMF;
48 std::unique_ptr<weld::Label> m_xCharsPerLineFT;
49 std::unique_ptr<weld::SpinButton> m_xCharsPerLineNF;
50 std::unique_ptr<weld::Label> m_xCharsRangeFT;
51 std::unique_ptr<weld::Label> m_xCharWidthFT;
52 std::unique_ptr<weld::MetricSpinButton> m_xCharWidthMF;
53 std::unique_ptr<weld::Label> m_xRubySizeFT;
54 std::unique_ptr<weld::MetricSpinButton> m_xRubySizeMF;
55 std::unique_ptr<weld::CheckButton> m_xRubyBelowCB;
56 std::unique_ptr<weld::Widget> m_xDisplayFL;
57 std::unique_ptr<weld::CheckButton> m_xDisplayCB;
58 std::unique_ptr<weld::CheckButton> m_xPrintCB;
59 std::unique_ptr<ColorListBox> m_xColorLB;
61 void UpdatePageSize(const SfxItemSet& rSet);
62 void PutGridItem(SfxItemSet& rSet);
63 static void SetLinesOrCharsRanges(weld::Label& rField, const sal_Int32 nValue);
65 void GridModifyHdl();
67 DECL_LINK(GridTypeHdl, weld::Toggleable&, void);
68 DECL_LINK(CharorLineChangedHdl, weld::SpinButton&, void);
69 DECL_LINK(TextSizeChangedHdl, weld::MetricSpinButton&, void);
70 DECL_LINK(ColorModifyHdl, ColorListBox&, void);
71 DECL_LINK(GridModifyClickHdl, weld::Toggleable&, void);
72 DECL_LINK(DisplayGridHdl, weld::Toggleable&, void);
74 public:
75 SwTextGridPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet &rSet);
76 virtual ~SwTextGridPage() override;
78 static std::unique_ptr<SfxTabPage> Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet *rSet);
79 static const WhichRangesContainer & GetRanges();
81 virtual bool FillItemSet(SfxItemSet *rSet) override;
82 virtual void Reset(const SfxItemSet *rSet) override;
84 virtual void ActivatePage( const SfxItemSet& rSet ) override;
85 virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
88 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */