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