LibreOffice Module sw (master) 1
pggrid.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_PGGRID_HXX
20#define INCLUDED_SW_SOURCE_UIBASE_INC_PGGRID_HXX
21
22#include <sfx2/tabdlg.hxx>
23#include "colex.hxx"
24#include <vcl/customweld.hxx>
25#include <vcl/weld.hxx>
26#include <svx/colorbox.hxx>
27
28// TabPage Format/(Styles/)Page/Text grid
29class SwTextGridPage final : public SfxTabPage
30{
38
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;
61
62 void UpdatePageSize(const SfxItemSet& rSet);
63 void PutGridItem(SfxItemSet& rSet);
64 static void SetLinesOrCharsRanges(weld::Label& rField, const sal_Int32 nValue);
65
66 void GridModifyHdl();
67
68 DECL_LINK(GridTypeHdl, weld::Toggleable&, 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::Toggleable&, void);
73 DECL_LINK(DisplayGridHdl, weld::Toggleable&, void);
74
75public:
76 SwTextGridPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet &rSet);
77 virtual ~SwTextGridPage() override;
78
79 static std::unique_ptr<SfxTabPage> Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet *rSet);
81
82 virtual bool FillItemSet(SfxItemSet *rSet) override;
83 virtual void Reset(const SfxItemSet *rSet) override;
84
85 virtual void ActivatePage( const SfxItemSet& rSet ) override;
86 virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
87};
88
89#endif
90
91/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
std::unique_ptr< weld::MetricSpinButton > m_xTextSizeMF
Definition: pggrid.hxx:48
bool m_bVertical
Definition: pggrid.hxx:34
std::unique_ptr< weld::CustomWeld > m_xExampleWN
Definition: pggrid.hxx:44
std::unique_ptr< weld::Widget > m_xDisplayFL
Definition: pggrid.hxx:57
std::unique_ptr< weld::Label > m_xLinesRangeFT
Definition: pggrid.hxx:47
DECL_LINK(GridTypeHdl, weld::Toggleable &, void)
bool m_bSquaredMode
Definition: pggrid.hxx:35
static void SetLinesOrCharsRanges(weld::Label &rField, const sal_Int32 nValue)
Definition: pggrid.cxx:347
std::unique_ptr< weld::SpinButton > m_xLinesPerPageNF
Definition: pggrid.hxx:46
bool m_bVRulerChanged
Definition: pggrid.hxx:37
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rSet)
Definition: pggrid.cxx:126
std::unique_ptr< weld::Label > m_xRubySizeFT
Definition: pggrid.hxx:54
std::unique_ptr< weld::CheckButton > m_xDisplayCB
Definition: pggrid.hxx:58
virtual void ActivatePage(const SfxItemSet &rSet) override
Definition: pggrid.cxx:211
std::unique_ptr< weld::RadioButton > m_xLinesGridRB
Definition: pggrid.hxx:41
static WhichRangesContainer GetRanges()
Definition: pggrid.cxx:353
virtual ~SwTextGridPage() override
Definition: pggrid.cxx:121
DECL_LINK(TextSizeChangedHdl, weld::MetricSpinButton &, void)
DECL_LINK(GridModifyClickHdl, weld::Toggleable &, void)
std::unique_ptr< weld::RadioButton > m_xNoGridRB
Definition: pggrid.hxx:40
DECL_LINK(CharorLineChangedHdl, weld::SpinButton &, void)
std::unique_ptr< weld::Label > m_xCharWidthFT
Definition: pggrid.hxx:52
SwTextGridPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rSet)
Definition: pggrid.cxx:40
sal_Int32 m_nRubyUserValue
Definition: pggrid.hxx:31
DECL_LINK(DisplayGridHdl, weld::Toggleable &, void)
void UpdatePageSize(const SfxItemSet &rSet)
Definition: pggrid.cxx:262
std::unique_ptr< weld::MetricSpinButton > m_xCharWidthMF
Definition: pggrid.hxx:53
bool m_bRubyUserValue
Definition: pggrid.hxx:32
std::unique_ptr< weld::Label > m_xCharsPerLineFT
Definition: pggrid.hxx:49
std::unique_ptr< weld::SpinButton > m_xCharsPerLineNF
Definition: pggrid.hxx:50
void PutGridItem(SfxItemSet &rSet)
Definition: pggrid.cxx:225
void GridModifyHdl()
Definition: pggrid.cxx:539
std::unique_ptr< weld::CheckButton > m_xPrintCB
Definition: pggrid.hxx:59
bool m_bHRulerChanged
Definition: pggrid.hxx:36
virtual DeactivateRC DeactivatePage(SfxItemSet *pSet) override
Definition: pggrid.cxx:220
std::unique_ptr< weld::CheckButton > m_xSnapToCharsCB
Definition: pggrid.hxx:43
virtual void Reset(const SfxItemSet *rSet) override
Definition: pggrid.cxx:162
virtual bool FillItemSet(SfxItemSet *rSet) override
Definition: pggrid.cxx:131
std::unique_ptr< weld::MetricSpinButton > m_xRubySizeMF
Definition: pggrid.hxx:55
SwPageGridExample m_aExampleWN
Definition: pggrid.hxx:39
std::unique_ptr< weld::Widget > m_xLayoutFL
Definition: pggrid.hxx:45
std::unique_ptr< weld::RadioButton > m_xCharsGridRB
Definition: pggrid.hxx:42
std::unique_ptr< weld::CheckButton > m_xRubyBelowCB
Definition: pggrid.hxx:56
Size m_aPageSize
Definition: pggrid.hxx:33
std::unique_ptr< ColorListBox > m_xColorLB
Definition: pggrid.hxx:60
DECL_LINK(ColorModifyHdl, ColorListBox &, void)
std::unique_ptr< weld::Label > m_xCharsRangeFT
Definition: pggrid.hxx:51
DeactivateRC