LibreOffice Module cui (master) 1
tabstpge.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#pragma once
20
21#include <vcl/customweld.hxx>
22#include <vcl/weld.hxx>
23#include <sfx2/tabdlg.hxx>
24
25#include <editeng/tstpitem.hxx>
26#include <svx/flagsdef.hxx>
27
29
30// class TabWin_Impl -----------------------------------------------------
31
33{
34private:
35 sal_uInt16 nTabStyle;
36
37public:
38
40 {
41 }
42 virtual void Paint(vcl::RenderContext& rRenderContext, const ::tools::Rectangle& rRect) override;
43
44 void SetTabStyle(sal_uInt16 nStyle) {nTabStyle = nStyle; }
45};
46
47// class SvxTabulatorTabPage ---------------------------------------------
48/*
49 [Description]
50 In this TabPage tabulators are managed.
51
52 [Items]
53 <SvxTabStopItem><SID_ATTR_TABSTOP>
54 <SfxUInt16Item><SID_ATTR_TABSTOP_DEFAULTS>
55 <SfxUInt16Item><SID_ATTR_TABSTOP_POS>
56 <SfxInt32Item><SID_ATTR_TABSTOP_OFFSET>
57*/
58
60{
62
63public:
65 static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rSet );
66 virtual ~SvxTabulatorTabPage() override;
67
69
70 virtual bool FillItemSet( SfxItemSet* rSet ) override;
71 virtual void Reset( const SfxItemSet* rSet ) override;
72
73 void DisableControls( const TabulatorDisableFlags nFlag );
74
75protected:
76 virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
77
78private:
79 // local variables, internal functions
81 std::unique_ptr<SvxTabStopItem> aNewTabs;
83
88
89 // just to format the numbers, not shown
90 std::unique_ptr<weld::MetricSpinButton> m_xTabSpin;
91 // tabulators and positions
92 std::unique_ptr<weld::EntryTreeView> m_xTabBox;
93 // TabType
94 std::unique_ptr<weld::RadioButton> m_xLeftTab;
95 std::unique_ptr<weld::RadioButton> m_xRightTab;
96 std::unique_ptr<weld::RadioButton> m_xCenterTab;
97 std::unique_ptr<weld::RadioButton> m_xDezTab;
98
99 std::unique_ptr<weld::Entry> m_xDezChar;
100 std::unique_ptr<weld::Label> m_xDezCharLabel;
101
102 std::unique_ptr<weld::RadioButton> m_xNoFillChar;
103 std::unique_ptr<weld::RadioButton> m_xFillPoints;
104 std::unique_ptr<weld::RadioButton> m_xFillDashLine ;
105 std::unique_ptr<weld::RadioButton> m_xFillSolidLine;
106 std::unique_ptr<weld::RadioButton> m_xFillSpecial;
107 std::unique_ptr<weld::Entry> m_xFillChar;
108
109 std::unique_ptr<weld::Button> m_xNewBtn;
110 std::unique_ptr<weld::Button> m_xDelAllBtn;
111 std::unique_ptr<weld::Button> m_xDelBtn;
112
113 std::unique_ptr<weld::Container> m_xTypeFrame;
114 std::unique_ptr<weld::Container> m_xFillFrame;
115
116 std::unique_ptr<weld::CustomWeld> m_xLeftWin;
117 std::unique_ptr<weld::CustomWeld> m_xRightWin;
118 std::unique_ptr<weld::CustomWeld> m_xCenterWin;
119 std::unique_ptr<weld::CustomWeld> m_xDezWin;
120
121 void InitTabPos_Impl( sal_uInt16 nPos = 0 );
123 void NewHdl_Impl(const weld::Button*);
124
125 OUString FormatTab();
126
127 // Handler
129 DECL_LINK(DelHdl_Impl, weld::Button&, void);
130 DECL_LINK(DelAllHdl_Impl, weld::Button&, void);
131
132 DECL_LINK(FillTypeCheckHdl_Impl, weld::Toggleable&, void);
133 DECL_LINK(TabTypeCheckHdl_Impl, weld::Toggleable&, void);
134
135 DECL_LINK(SelectHdl_Impl, weld::TreeView&, bool);
136 DECL_LINK(ModifyHdl_Impl, weld::ComboBox&, void);
137 DECL_LINK(ReformatHdl_Impl, weld::Widget&, void);
138 DECL_LINK(GetFillCharHdl_Impl, weld::Widget&, void);
139 DECL_LINK(GetDezCharHdl_Impl, weld::Widget&, void);
140
141 int FindCurrentTab();
142
143 virtual void PageCreated(const SfxAllItemSet& aSet) override;
144};
145
146/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
const SfxItemSet * pSet
DECL_LINK(DelAllHdl_Impl, weld::Button &, void)
TabWin_Impl m_aRightWin
Definition: tabstpge.hxx:85
DECL_LINK(GetDezCharHdl_Impl, weld::Widget &, void)
std::unique_ptr< weld::RadioButton > m_xLeftTab
Definition: tabstpge.hxx:94
void DisableControls(const TabulatorDisableFlags nFlag)
Definition: tabstpge.cxx:264
SvxTabulatorTabPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rSet)
Definition: tabstpge.cxx:62
DECL_LINK(GetFillCharHdl_Impl, weld::Widget &, void)
DECL_LINK(ReformatHdl_Impl, weld::Widget &, void)
std::unique_ptr< weld::RadioButton > m_xNoFillChar
Definition: tabstpge.hxx:102
DECL_LINK(TabTypeCheckHdl_Impl, weld::Toggleable &, void)
OUString FormatTab()
Definition: tabstpge.cxx:626
std::unique_ptr< SvxTabStopItem > aNewTabs
Definition: tabstpge.hxx:81
std::unique_ptr< weld::RadioButton > m_xRightTab
Definition: tabstpge.hxx:95
std::unique_ptr< weld::Entry > m_xFillChar
Definition: tabstpge.hxx:107
DECL_LINK(ModifyHdl_Impl, weld::ComboBox &, void)
DECL_LINK(FillTypeCheckHdl_Impl, weld::Toggleable &, void)
std::unique_ptr< weld::CustomWeld > m_xCenterWin
Definition: tabstpge.hxx:118
std::unique_ptr< weld::Button > m_xDelBtn
Definition: tabstpge.hxx:111
std::unique_ptr< weld::Button > m_xDelAllBtn
Definition: tabstpge.hxx:110
DECL_LINK(SelectHdl_Impl, weld::TreeView &, bool)
virtual bool FillItemSet(SfxItemSet *rSet) override
Definition: tabstpge.cxx:153
void InitTabPos_Impl(sal_uInt16 nPos=0)
Definition: tabstpge.cxx:314
std::unique_ptr< weld::RadioButton > m_xFillSolidLine
Definition: tabstpge.hxx:105
tools::Long nDefDist
Definition: tabstpge.hxx:82
std::unique_ptr< weld::Label > m_xDezCharLabel
Definition: tabstpge.hxx:100
std::unique_ptr< weld::CustomWeld > m_xRightWin
Definition: tabstpge.hxx:117
virtual ~SvxTabulatorTabPage() override
Definition: tabstpge.cxx:142
virtual DeactivateRC DeactivatePage(SfxItemSet *pSet) override
Definition: tabstpge.cxx:307
static const WhichRangesContainer pRanges
Definition: tabstpge.hxx:61
void NewHdl_Impl(const weld::Button *)
Definition: tabstpge.cxx:419
std::unique_ptr< weld::CustomWeld > m_xLeftWin
Definition: tabstpge.hxx:116
SvxTabStop aCurrentTab
Definition: tabstpge.hxx:80
virtual void PageCreated(const SfxAllItemSet &aSet) override
Definition: tabstpge.cxx:656
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rSet)
Definition: tabstpge.cxx:210
std::unique_ptr< weld::MetricSpinButton > m_xTabSpin
Definition: tabstpge.hxx:90
TabWin_Impl m_aCenterWin
Definition: tabstpge.hxx:86
std::unique_ptr< weld::EntryTreeView > m_xTabBox
Definition: tabstpge.hxx:92
static WhichRangesContainer GetRanges()
Definition: tabstpge.hxx:68
std::unique_ptr< weld::RadioButton > m_xFillDashLine
Definition: tabstpge.hxx:104
std::unique_ptr< weld::CustomWeld > m_xDezWin
Definition: tabstpge.hxx:119
virtual void Reset(const SfxItemSet *rSet) override
Definition: tabstpge.cxx:215
std::unique_ptr< weld::RadioButton > m_xCenterTab
Definition: tabstpge.hxx:96
TabWin_Impl m_aLeftWin
Definition: tabstpge.hxx:84
std::unique_ptr< weld::Container > m_xFillFrame
Definition: tabstpge.hxx:114
DECL_LINK(DelHdl_Impl, weld::Button &, void)
std::unique_ptr< weld::Entry > m_xDezChar
Definition: tabstpge.hxx:99
std::unique_ptr< weld::Button > m_xNewBtn
Definition: tabstpge.hxx:109
std::unique_ptr< weld::RadioButton > m_xFillSpecial
Definition: tabstpge.hxx:106
DECL_LINK(NewHdl_Impl, weld::Button &, void)
void SetFillAndTabType_Impl()
Definition: tabstpge.cxx:369
std::unique_ptr< weld::RadioButton > m_xFillPoints
Definition: tabstpge.hxx:103
std::unique_ptr< weld::Container > m_xTypeFrame
Definition: tabstpge.hxx:113
std::unique_ptr< weld::RadioButton > m_xDezTab
Definition: tabstpge.hxx:97
TabWin_Impl m_aDezWin
Definition: tabstpge.hxx:87
virtual void Paint(vcl::RenderContext &rRenderContext, const ::tools::Rectangle &rRect) override
Definition: tabstpge.cxx:48
sal_uInt16 nTabStyle
Definition: tabstpge.hxx:35
void SetTabStyle(sal_uInt16 nStyle)
Definition: tabstpge.hxx:44
TabulatorDisableFlags
long Long
DeactivateRC