Update ooo320-m1
[ooovba.git] / sw / source / ui / inc / pggrid.hxx
bloba3062cad64251c46072ce6a8810690613f117aaf
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: pggrid.hxx,v $
10 * $Revision: 1.11 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef _PGGRID_HXX
31 #define _PGGRID_HXX
33 #include <sfx2/tabdlg.hxx>
34 #include <colex.hxx>
35 #ifndef _FIELD_HXX
36 #include <vcl/field.hxx>
37 #endif
38 #ifndef _FIXED_HXX
39 #include <vcl/fixed.hxx>
40 #endif
41 #include <svtools/ctrlbox.hxx>
42 /*--------------------------------------------------------------------
43 Description: TabPage Format/(Styles/)Page/Text grid
44 --------------------------------------------------------------------*/
46 class SwTextGridPage: public SfxTabPage
48 FixedLine aGridTypeFL;
49 RadioButton aNoGridRB;
50 RadioButton aLinesGridRB;
51 RadioButton aCharsGridRB;
52 CheckBox aSnapToCharsCB;
54 SwPageGridExample aExampleWN;
56 FixedLine aLayoutFL;
58 FixedText aLinesPerPageFT;
59 NumericField aLinesPerPageNF;
60 FixedText aLinesRangeFT;
62 FixedText aTextSizeFT;
63 MetricField aTextSizeMF;
65 FixedText aCharsPerLineFT;
66 NumericField aCharsPerLineNF;
67 FixedText aCharsRangeFT;
69 FixedText aCharWidthFT;
70 MetricField aCharWidthMF;
72 FixedText aRubySizeFT;
73 MetricField aRubySizeMF;
75 CheckBox aRubyBelowCB;
77 FixedLine aDisplayFL;
79 CheckBox aDisplayCB;
80 CheckBox aPrintCB;
81 FixedText aColorFT;
82 ColorListBox aColorLB;
84 Window* aControls[20];
86 sal_Int32 m_nRubyUserValue;
87 sal_Bool m_bRubyUserValue;
88 Size m_aPageSize;
89 sal_Bool m_bVertical;
90 sal_Bool m_bSquaredMode;
91 sal_Bool m_bHRulerChanged;
92 sal_Bool m_bVRulerChanged;
94 SwTextGridPage(Window *pParent, const SfxItemSet &rSet);
95 ~SwTextGridPage();
97 void UpdatePageSize(const SfxItemSet& rSet);
98 void PutGridItem(SfxItemSet& rSet);
99 void SetLinesOrCharsRanges(FixedText & rField, const sal_Int32 nValue );
101 DECL_LINK(GridTypeHdl, RadioButton*);
102 DECL_LINK(CharorLineChangedHdl, SpinField*);
103 DECL_LINK(TextSizeChangedHdl, SpinField*);
104 DECL_LINK(GridModifyHdl, void*);
105 DECL_LINK(DisplayGridHdl, CheckBox*);
107 using SfxTabPage::ActivatePage;
108 using SfxTabPage::DeactivatePage;
110 public:
111 static SfxTabPage *Create(Window *pParent, const SfxItemSet &rSet);
112 static USHORT* GetRanges();
114 virtual BOOL FillItemSet(SfxItemSet &rSet);
115 virtual void Reset(const SfxItemSet &rSet);
117 virtual void ActivatePage( const SfxItemSet& rSet );
118 virtual int DeactivatePage( SfxItemSet* pSet = 0 );
121 #endif