xref: /aoo4110/main/sw/source/ui/inc/pggrid.hxx (revision b1cdbd2c)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 #ifndef _PGGRID_HXX
24 #define _PGGRID_HXX
25 
26 #include <sfx2/tabdlg.hxx>
27 #include <colex.hxx>
28 #ifndef _FIELD_HXX
29 #include <vcl/field.hxx>
30 #endif
31 #ifndef _FIXED_HXX
32 #include <vcl/fixed.hxx>
33 #endif
34 #include <svtools/ctrlbox.hxx>
35 /*--------------------------------------------------------------------
36     Description:   TabPage Format/(Styles/)Page/Text grid
37  --------------------------------------------------------------------*/
38 
39 class SwTextGridPage: public SfxTabPage
40 {
41     FixedLine       aGridTypeFL;
42     RadioButton     aNoGridRB;
43     RadioButton     aLinesGridRB;
44     RadioButton     aCharsGridRB;
45     CheckBox        aSnapToCharsCB;
46 
47     SwPageGridExample   aExampleWN;
48 
49     FixedLine       aLayoutFL;
50 
51     FixedText       aLinesPerPageFT;
52     NumericField    aLinesPerPageNF;
53 
54     FixedText       aTextSizeFT;
55     MetricField     aTextSizeMF;
56 
57     FixedText       aCharsPerLineFT;
58     NumericField    aCharsPerLineNF;
59 
60     FixedText       aCharWidthFT;
61     MetricField     aCharWidthMF;
62 
63     FixedText       aRubySizeFT;
64     MetricField     aRubySizeMF;
65 
66     CheckBox        aRubyBelowCB;
67 
68     FixedLine       aDisplayFL;
69 
70     CheckBox        aDisplayCB;
71     CheckBox        aPrintCB;
72     FixedText       aColorFT;
73     ColorListBox    aColorLB;
74 
75     Window*         aControls[18];
76 
77     sal_Int32       m_nRubyUserValue;
78     sal_Bool        m_bRubyUserValue;
79     Size            m_aPageSize;
80     sal_Bool        m_bVertical;
81 	sal_Bool		m_bSquaredMode;
82 
83     SwTextGridPage(Window *pParent, const SfxItemSet &rSet);
84     ~SwTextGridPage();
85 
86     void UpdatePageSize(const SfxItemSet& rSet);
87     void PutGridItem(SfxItemSet& rSet);
88 
89     DECL_LINK(GridTypeHdl, RadioButton*);
90     DECL_LINK(CharorLineChangedHdl, SpinField*);
91     DECL_LINK(TextSizeChangedHdl, SpinField*);
92     DECL_LINK(GridModifyHdl, void*);
93     DECL_LINK(DisplayGridHdl, CheckBox*);
94 
95     using SfxTabPage::ActivatePage;
96     using SfxTabPage::DeactivatePage;
97 
98 public:
99 	static SfxTabPage *Create(Window *pParent, const SfxItemSet &rSet);
100     static sal_uInt16* GetRanges();
101 
102     virtual sal_Bool    FillItemSet(SfxItemSet &rSet);
103     virtual void    Reset(const SfxItemSet &rSet);
104 
105     virtual void    ActivatePage( const SfxItemSet& rSet );
106 	virtual int		DeactivatePage( SfxItemSet* pSet = 0 );
107 };
108 
109 #endif
110