xref: /aoo4110/main/sd/source/ui/inc/tpoption.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 
24 #ifndef _SD_TPOPTION_HXX
25 #define _SD_TPOPTION_HXX
26 
27 
28 #ifndef _LSTBOX_HXX //autogen
29 #include <vcl/lstbox.hxx>
30 #endif
31 #ifndef _GROUP_HXX //autogen
32 #include <vcl/group.hxx>
33 #endif
34 #ifndef _FIXED_HXX //autogen
35 #include <vcl/fixed.hxx>
36 #endif
37 #ifndef _FIELD_HXX //autogen
38 #include <vcl/field.hxx>
39 #endif
40 #ifndef _BUTTON_HXX //autogen
41 #include <vcl/button.hxx>
42 #endif
43 #include <svtools/stdctrl.hxx>
44 #include <sfx2/tabdlg.hxx>
45 #include <svx/optgrid.hxx>
46 
47 /*************************************************************************
48 |*
49 |* Optionen-Tab-Page: Snap
50 |*
51 \************************************************************************/
52 class SdTpOptionsSnap : public SvxGridTabPage
53 {
54 public:
55 			SdTpOptionsSnap( Window* pParent, const SfxItemSet& rInAttrs  );
56 			~SdTpOptionsSnap();
57 
58 	static	SfxTabPage* Create( Window*, const SfxItemSet& );
59 	virtual sal_Bool FillItemSet( SfxItemSet& );
60 	virtual void Reset( const SfxItemSet & );
61 
62 //    virtual void ActivatePage( const SfxItemSet& rSet );
63 //    virtual int  DeactivatePage( SfxItemSet* pSet );
64 };
65 /*************************************************************************
66 |*
67 |* Optionen-Tab-Page: Contents (Inhalte)
68 |*
69 \************************************************************************/
70 class SdTpOptionsContents : public SfxTabPage
71 {
72 private:
73     FixedLine    aGrpDisplay;
74     CheckBox    aCbxRuler;
75 	CheckBox	aCbxDragStripes;
76 	CheckBox	aCbxHandlesBezier;
77 	CheckBox	aCbxMoveOutline;
78 
79 
80 public:
81 			SdTpOptionsContents( Window* pParent, const SfxItemSet& rInAttrs  );
82 			~SdTpOptionsContents();
83 
84 	static	SfxTabPage* Create( Window*, const SfxItemSet& );
85 	virtual sal_Bool FillItemSet( SfxItemSet& );
86 	virtual void Reset( const SfxItemSet & );
87 };
88 
89 /*************************************************************************
90 |*
91 |* Optionen-Tab-Page: View
92 |*
93 \************************************************************************/
94 class SdModule;
95 class SdTpOptionsMisc : public SfxTabPage
96 {
97  friend class SdOptionsDlg;
98  friend class SdModule;
99 
100 private:
101     FixedLine   aGrpText;
102     CheckBox    aCbxQuickEdit;
103     CheckBox    aCbxPickThrough;
104 
105     FixedLine   aGrpProgramStart;
106     CheckBox    aCbxStartWithTemplate;
107 
108     FixedLine   aGrpSettings;
109     CheckBox    aCbxMasterPageCache;
110     CheckBox    aCbxCopy;
111     CheckBox    aCbxMarkedHitMovesAlways;
112     CheckBox    aCbxCrookNoContortion;
113 
114     FixedText   aTxtMetric;
115     ListBox     aLbMetric;
116     FixedText   aTxtTabstop;
117 	MetricField	aMtrFldTabstop;
118 
119     CheckBox    aCbxStartWithActualPage;
120     CheckBox    aCbxStartWithPresenterScreen;
121     FixedLine   aGrpStartWithActualPage;
122     FixedLine   aTxtCompatibility;
123     CheckBox    aCbxUsePrinterMetrics;
124     CheckBox    aCbxCompatibility;
125 
126     //Scale
127     FixedLine       aGrpScale;
128     FixedText       aFtScale;
129     ComboBox        aCbScale;
130 
131     FixedText       aFtOriginal;
132     FixedText       aFtEquivalent;
133 
134     FixedText       aFtPageWidth;
135 	FixedInfo		aFiInfo1;
136     MetricField     aMtrFldOriginalWidth;
137 
138     FixedText       aFtPageHeight;
139 	FixedInfo		aFiInfo2;
140     MetricField     aMtrFldOriginalHeight;
141 
142     MetricField     aMtrFldInfo1;
143 	MetricField 	aMtrFldInfo2;
144 
145     sal_uInt32          nWidth;
146 	sal_uInt32			nHeight;
147 	String			aInfo1;
148 	String			aInfo2;
149 
150 	SfxMapUnit			ePoolUnit;
151 
152 	String			GetScale( sal_Int32 nX, sal_Int32 nY );
153 	sal_Bool			SetScale( const String& aScale, sal_Int32& rX, sal_Int32& rY );
154 
155 	DECL_LINK( ModifyScaleHdl, void * );
156 	DECL_LINK( ModifyOriginalScaleHdl, void * );
157     DECL_LINK( SelectMetricHdl_Impl, ListBox * );
158 
159     /** Enable or disable the controls in the compatibility section of the
160         'general' tab page depending on whether there is at least one
161         document.
162     */
163     void UpdateCompatibilityControls (void);
164 
165 protected:
166 	virtual void ActivatePage( const SfxItemSet& rSet );
167 	virtual int	DeactivatePage( SfxItemSet* pSet );
168 
169 public:
170 			SdTpOptionsMisc( Window* pParent, const SfxItemSet& rInAttrs  );
171 			~SdTpOptionsMisc();
172 
173 	static	SfxTabPage* Create( Window*, const SfxItemSet& );
174 	virtual sal_Bool FillItemSet( SfxItemSet& );
175 	virtual void Reset( const SfxItemSet & );
176 
177     /** Hide Impress specific controls, make Draw specific controls visible
178         and arrange the visible controls.  Do not call this method or the
179         <member>SetImpressMode()</member> method more than once.
180     */
181     void SetDrawMode (void);
182 
183     /** Hide Draw specific controls, make Impress specific controls visible
184         and arrange the visible controls.  Do not call this method or the
185         <member>SetDrawMode()</member> method more than once.
186     */
187     void SetImpressMode (void);
188 	virtual void		PageCreated (SfxAllItemSet aSet);
189 
190 	using TabPage::ActivatePage;
191 	using TabPage::DeactivatePage;
192 	using OutputDevice::SetDrawMode;
193 
194 };
195 
196 
197 #endif // _SD_TPOPTION_HXX
198 
199