1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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_CUI_SOURCE_INC_TABSTPGE_HXX
20 #define INCLUDED_CUI_SOURCE_INC_TABSTPGE_HXX
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>
29 #include <editeng/tstpitem.hxx>
30 #include <svx/flagsdef.hxx>
34 // class SvxTabulatorTabPage ---------------------------------------------
37 In this TabPage tabulators are managed.
40 <SvxTabStopItem><SID_ATTR_TABSTOP>
41 <SfxUInt16Item><SID_ATTR_TABSTOP_DEFAULTS>
42 <SfxUInt16Item><SID_ATTR_TABSTOP_POS>
43 <SfxInt32Item><SID_ATTR_TABSTOP_OFFSET>
46 class SvxTabulatorTabPage
: public SfxTabPage
48 friend class VclPtr
<SvxTabulatorTabPage
>;
49 using TabPage::DeactivatePage
;
50 static const sal_uInt16 pRanges
[];
53 virtual ~SvxTabulatorTabPage();
54 virtual void dispose() SAL_OVERRIDE
;
55 static VclPtr
<SfxTabPage
> Create( vcl::Window
* pParent
, const SfxItemSet
* rSet
);
56 static const sal_uInt16
* GetRanges() { return pRanges
; }
58 virtual bool FillItemSet( SfxItemSet
* rSet
) SAL_OVERRIDE
;
59 virtual void Reset( const SfxItemSet
* rSet
) SAL_OVERRIDE
;
61 void DisableControls( const sal_uInt16 nFlag
);
64 virtual sfxpg
DeactivatePage( SfxItemSet
* pSet
= 0 ) SAL_OVERRIDE
;
67 SvxTabulatorTabPage( vcl::Window
* pParent
, const SfxItemSet
& rSet
);
69 // tabulators and positions
70 VclPtr
<MetricBox
> m_pTabBox
;
72 VclPtr
<RadioButton
> m_pLeftTab
;
73 VclPtr
<RadioButton
> m_pRightTab
;
74 VclPtr
<RadioButton
> m_pCenterTab
;
75 VclPtr
<RadioButton
> m_pDezTab
;
77 VclPtr
<TabWin_Impl
> m_pLeftWin
;
78 VclPtr
<TabWin_Impl
> m_pRightWin
;
79 VclPtr
<TabWin_Impl
> m_pCenterWin
;
80 VclPtr
<TabWin_Impl
> m_pDezWin
;
82 VclPtr
<FixedText
> m_pDezCharLabel
;
83 VclPtr
<Edit
> m_pDezChar
;
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
;
92 VclPtr
<PushButton
> m_pNewBtn
;
93 VclPtr
<PushButton
> m_pDelAllBtn
;
94 VclPtr
<PushButton
> m_pDelBtn
;
96 VclPtr
<VclContainer
> m_pTypeFrame
;
97 VclPtr
<VclContainer
> m_pFillFrame
;
99 // local variables, internal functions
101 SvxTabStopItem aNewTabs
;
106 void InitTabPos_Impl( sal_uInt16 nPos
= 0 );
107 void SetFillAndTabType_Impl();
110 DECL_LINK( NewHdl_Impl
, Button
* );
111 DECL_LINK(DelHdl_Impl
, void *);
112 DECL_LINK(DelAllHdl_Impl
, void *);
114 DECL_LINK( FillTypeCheckHdl_Impl
, RadioButton
* );
115 DECL_LINK( TabTypeCheckHdl_Impl
, RadioButton
* );
117 DECL_LINK(SelectHdl_Impl
, void *);
118 DECL_LINK(ModifyHdl_Impl
, void *);
119 DECL_LINK( GetFillCharHdl_Impl
, Edit
* );
120 DECL_LINK( GetDezCharHdl_Impl
, Edit
* );
122 virtual void PageCreated(const SfxAllItemSet
& aSet
) SAL_OVERRIDE
;
125 #endif // INCLUDED_CUI_SOURCE_INC_TABSTPGE_HXX
127 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */