xref: /aoo41x/main/sd/source/ui/inc/tpoption.hxx (revision c45d927a)
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     FixedLine   aGrpStartWithActualPage;
121     FixedLine   aTxtCompatibility;
122     CheckBox    aCbxUsePrinterMetrics;
123     CheckBox    aCbxCompatibility;
124 
125     //Scale
126     FixedLine       aGrpScale;
127     FixedText       aFtScale;
128     ComboBox        aCbScale;
129 
130     FixedText       aFtOriginal;
131     FixedText       aFtEquivalent;
132 
133     FixedText       aFtPageWidth;
134 	FixedInfo		aFiInfo1;
135     MetricField     aMtrFldOriginalWidth;
136 
137     FixedText       aFtPageHeight;
138 	FixedInfo		aFiInfo2;
139     MetricField     aMtrFldOriginalHeight;
140 
141     MetricField     aMtrFldInfo1;
142 	MetricField 	aMtrFldInfo2;
143 
144     sal_uInt32          nWidth;
145 	sal_uInt32			nHeight;
146 	String			aInfo1;
147 	String			aInfo2;
148 
149 	SfxMapUnit			ePoolUnit;
150 
151 	String			GetScale( sal_Int32 nX, sal_Int32 nY );
152 	sal_Bool			SetScale( const String& aScale, sal_Int32& rX, sal_Int32& rY );
153 
154 	DECL_LINK( ModifyScaleHdl, void * );
155 	DECL_LINK( ModifyOriginalScaleHdl, void * );
156     DECL_LINK( SelectMetricHdl_Impl, ListBox * );
157 
158     /** Enable or disable the controls in the compatibility section of the
159         'general' tab page depending on whether there is at least one
160         document.
161     */
162     void UpdateCompatibilityControls (void);
163 
164 protected:
165 	virtual void ActivatePage( const SfxItemSet& rSet );
166 	virtual int	DeactivatePage( SfxItemSet* pSet );
167 
168 public:
169 			SdTpOptionsMisc( Window* pParent, const SfxItemSet& rInAttrs  );
170 			~SdTpOptionsMisc();
171 
172 	static	SfxTabPage* Create( Window*, const SfxItemSet& );
173 	virtual sal_Bool FillItemSet( SfxItemSet& );
174 	virtual void Reset( const SfxItemSet & );
175 
176     /** Hide Impress specific controls, make Draw specific controls visible
177         and arrange the visible controls.  Do not call this method or the
178         <member>SetImpressMode()</member> method more than once.
179     */
180     void SetDrawMode (void);
181 
182     /** Hide Draw specific controls, make Impress specific controls visible
183         and arrange the visible controls.  Do not call this method or the
184         <member>SetDrawMode()</member> method more than once.
185     */
186     void SetImpressMode (void);
187 	virtual void		PageCreated (SfxAllItemSet aSet);
188 
189 	using TabPage::ActivatePage;
190 	using TabPage::DeactivatePage;
191 	using OutputDevice::SetDrawMode;
192 
193 };
194 
195 
196 #endif // _SD_TPOPTION_HXX
197 
198