Line data Source code
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_CUI_SOURCE_INC_TABSTPGE_HXX
20 : #define INCLUDED_CUI_SOURCE_INC_TABSTPGE_HXX
21 :
22 : #include <vcl/group.hxx>
23 : #include <vcl/edit.hxx>
24 : #include <vcl/field.hxx>
25 : #include <vcl/fixed.hxx>
26 : #include <vcl/layout.hxx>
27 : #include <sfx2/tabdlg.hxx>
28 :
29 : #include <editeng/tstpitem.hxx>
30 : #include <svx/flagsdef.hxx>
31 :
32 : class TabWin_Impl;
33 :
34 : // class SvxTabulatorTabPage ---------------------------------------------
35 : /*
36 : [Description]
37 : In this TabPage tabulators are managed.
38 :
39 : [Items]
40 : <SvxTabStopItem><SID_ATTR_TABSTOP>
41 : <SfxUInt16Item><SID_ATTR_TABSTOP_DEFAULTS>
42 : <SfxUInt16Item><SID_ATTR_TABSTOP_POS>
43 : <SfxInt32Item><SID_ATTR_TABSTOP_OFFSET>
44 : */
45 :
46 : class SvxTabulatorTabPage : public SfxTabPage
47 : {
48 : friend class VclPtr<SvxTabulatorTabPage>;
49 : using TabPage::DeactivatePage;
50 : static const sal_uInt16 pRanges[];
51 :
52 : public:
53 : virtual ~SvxTabulatorTabPage();
54 : virtual void dispose() SAL_OVERRIDE;
55 : static VclPtr<SfxTabPage> Create( vcl::Window* pParent, const SfxItemSet* rSet );
56 0 : static const sal_uInt16* GetRanges() { return pRanges; }
57 :
58 : virtual bool FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
59 : virtual void Reset( const SfxItemSet* rSet ) SAL_OVERRIDE;
60 :
61 : void DisableControls( const sal_uInt16 nFlag );
62 :
63 : protected:
64 : virtual sfxpg DeactivatePage( SfxItemSet* pSet = 0 ) SAL_OVERRIDE;
65 :
66 : private:
67 : SvxTabulatorTabPage( vcl::Window* pParent, const SfxItemSet& rSet );
68 :
69 : // tabulators and positions
70 : VclPtr<MetricBox> m_pTabBox;
71 : // TabType
72 : VclPtr<RadioButton> m_pLeftTab;
73 : VclPtr<RadioButton> m_pRightTab;
74 : VclPtr<RadioButton> m_pCenterTab;
75 : VclPtr<RadioButton> m_pDezTab;
76 :
77 : VclPtr<TabWin_Impl> m_pLeftWin;
78 : VclPtr<TabWin_Impl> m_pRightWin;
79 : VclPtr<TabWin_Impl> m_pCenterWin;
80 : VclPtr<TabWin_Impl> m_pDezWin;
81 :
82 : VclPtr<FixedText> m_pDezCharLabel;
83 : VclPtr<Edit> m_pDezChar;
84 :
85 : VclPtr<RadioButton> m_pNoFillChar;
86 : VclPtr<RadioButton> m_pFillPoints;
87 : VclPtr<RadioButton> m_pFillDashLine ;
88 : VclPtr<RadioButton> m_pFillSolidLine;
89 : VclPtr<RadioButton> m_pFillSpecial;
90 : VclPtr<Edit> m_pFillChar;
91 :
92 : VclPtr<PushButton> m_pNewBtn;
93 : VclPtr<PushButton> m_pDelAllBtn;
94 : VclPtr<PushButton> m_pDelBtn;
95 :
96 : VclPtr<VclContainer> m_pTypeFrame;
97 : VclPtr<VclContainer> m_pFillFrame;
98 :
99 : // local variables, internal functions
100 : SvxTabStop aAktTab;
101 : SvxTabStopItem aNewTabs;
102 : long nDefDist;
103 : FieldUnit eDefUnit;
104 : bool bCheck;
105 :
106 : void InitTabPos_Impl( sal_uInt16 nPos = 0 );
107 : void SetFillAndTabType_Impl();
108 :
109 : // Handler
110 : DECL_LINK( NewHdl_Impl, Button* );
111 : DECL_LINK(DelHdl_Impl, void *);
112 : DECL_LINK(DelAllHdl_Impl, void *);
113 :
114 : DECL_LINK( FillTypeCheckHdl_Impl, RadioButton* );
115 : DECL_LINK( TabTypeCheckHdl_Impl, RadioButton* );
116 :
117 : DECL_LINK(SelectHdl_Impl, void *);
118 : DECL_LINK(ModifyHdl_Impl, void *);
119 : DECL_LINK( GetFillCharHdl_Impl, Edit* );
120 : DECL_LINK( GetDezCharHdl_Impl, Edit* );
121 :
122 : virtual void PageCreated(const SfxAllItemSet& aSet) SAL_OVERRIDE;
123 : };
124 :
125 : #endif // INCLUDED_CUI_SOURCE_INC_TABSTPGE_HXX
126 :
127 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|