xref: /aoo42x/main/sd/source/ui/inc/tpoption.hxx (revision c45d927a)
1*c45d927aSAndrew Rist /**************************************************************
2*c45d927aSAndrew Rist  *
3*c45d927aSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*c45d927aSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*c45d927aSAndrew Rist  * distributed with this work for additional information
6*c45d927aSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*c45d927aSAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*c45d927aSAndrew Rist  * "License"); you may not use this file except in compliance
9*c45d927aSAndrew Rist  * with the License.  You may obtain a copy of the License at
10*c45d927aSAndrew Rist  *
11*c45d927aSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12cdf0e10cSrcweir  *
13*c45d927aSAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*c45d927aSAndrew Rist  * software distributed under the License is distributed on an
15*c45d927aSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*c45d927aSAndrew Rist  * KIND, either express or implied.  See the License for the
17*c45d927aSAndrew Rist  * specific language governing permissions and limitations
18*c45d927aSAndrew Rist  * under the License.
19*c45d927aSAndrew Rist  *
20*c45d927aSAndrew Rist  *************************************************************/
21*c45d927aSAndrew Rist 
22*c45d927aSAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #ifndef _SD_TPOPTION_HXX
25cdf0e10cSrcweir #define _SD_TPOPTION_HXX
26cdf0e10cSrcweir 
27cdf0e10cSrcweir 
28cdf0e10cSrcweir #ifndef _LSTBOX_HXX //autogen
29cdf0e10cSrcweir #include <vcl/lstbox.hxx>
30cdf0e10cSrcweir #endif
31cdf0e10cSrcweir #ifndef _GROUP_HXX //autogen
32cdf0e10cSrcweir #include <vcl/group.hxx>
33cdf0e10cSrcweir #endif
34cdf0e10cSrcweir #ifndef _FIXED_HXX //autogen
35cdf0e10cSrcweir #include <vcl/fixed.hxx>
36cdf0e10cSrcweir #endif
37cdf0e10cSrcweir #ifndef _FIELD_HXX //autogen
38cdf0e10cSrcweir #include <vcl/field.hxx>
39cdf0e10cSrcweir #endif
40cdf0e10cSrcweir #ifndef _BUTTON_HXX //autogen
41cdf0e10cSrcweir #include <vcl/button.hxx>
42cdf0e10cSrcweir #endif
43cdf0e10cSrcweir #include <svtools/stdctrl.hxx>
44cdf0e10cSrcweir #include <sfx2/tabdlg.hxx>
45cdf0e10cSrcweir #include <svx/optgrid.hxx>
46cdf0e10cSrcweir 
47cdf0e10cSrcweir /*************************************************************************
48cdf0e10cSrcweir |*
49cdf0e10cSrcweir |* Optionen-Tab-Page: Snap
50cdf0e10cSrcweir |*
51cdf0e10cSrcweir \************************************************************************/
52cdf0e10cSrcweir class SdTpOptionsSnap : public SvxGridTabPage
53cdf0e10cSrcweir {
54cdf0e10cSrcweir public:
55cdf0e10cSrcweir 			SdTpOptionsSnap( Window* pParent, const SfxItemSet& rInAttrs  );
56cdf0e10cSrcweir 			~SdTpOptionsSnap();
57cdf0e10cSrcweir 
58cdf0e10cSrcweir 	static	SfxTabPage* Create( Window*, const SfxItemSet& );
59cdf0e10cSrcweir 	virtual sal_Bool FillItemSet( SfxItemSet& );
60cdf0e10cSrcweir 	virtual void Reset( const SfxItemSet & );
61cdf0e10cSrcweir 
62cdf0e10cSrcweir //    virtual void ActivatePage( const SfxItemSet& rSet );
63cdf0e10cSrcweir //    virtual int  DeactivatePage( SfxItemSet* pSet );
64cdf0e10cSrcweir };
65cdf0e10cSrcweir /*************************************************************************
66cdf0e10cSrcweir |*
67cdf0e10cSrcweir |* Optionen-Tab-Page: Contents (Inhalte)
68cdf0e10cSrcweir |*
69cdf0e10cSrcweir \************************************************************************/
70cdf0e10cSrcweir class SdTpOptionsContents : public SfxTabPage
71cdf0e10cSrcweir {
72cdf0e10cSrcweir private:
73cdf0e10cSrcweir     FixedLine    aGrpDisplay;
74cdf0e10cSrcweir     CheckBox    aCbxRuler;
75cdf0e10cSrcweir 	CheckBox	aCbxDragStripes;
76cdf0e10cSrcweir 	CheckBox	aCbxHandlesBezier;
77cdf0e10cSrcweir 	CheckBox	aCbxMoveOutline;
78cdf0e10cSrcweir 
79cdf0e10cSrcweir 
80cdf0e10cSrcweir public:
81cdf0e10cSrcweir 			SdTpOptionsContents( Window* pParent, const SfxItemSet& rInAttrs  );
82cdf0e10cSrcweir 			~SdTpOptionsContents();
83cdf0e10cSrcweir 
84cdf0e10cSrcweir 	static	SfxTabPage* Create( Window*, const SfxItemSet& );
85cdf0e10cSrcweir 	virtual sal_Bool FillItemSet( SfxItemSet& );
86cdf0e10cSrcweir 	virtual void Reset( const SfxItemSet & );
87cdf0e10cSrcweir };
88cdf0e10cSrcweir 
89cdf0e10cSrcweir /*************************************************************************
90cdf0e10cSrcweir |*
91cdf0e10cSrcweir |* Optionen-Tab-Page: View
92cdf0e10cSrcweir |*
93cdf0e10cSrcweir \************************************************************************/
94cdf0e10cSrcweir class SdModule;
95cdf0e10cSrcweir class SdTpOptionsMisc : public SfxTabPage
96cdf0e10cSrcweir {
97cdf0e10cSrcweir  friend class SdOptionsDlg;
98cdf0e10cSrcweir  friend class SdModule;
99cdf0e10cSrcweir 
100cdf0e10cSrcweir private:
101cdf0e10cSrcweir     FixedLine   aGrpText;
102cdf0e10cSrcweir     CheckBox    aCbxQuickEdit;
103cdf0e10cSrcweir     CheckBox    aCbxPickThrough;
104cdf0e10cSrcweir 
105cdf0e10cSrcweir     FixedLine   aGrpProgramStart;
106cdf0e10cSrcweir     CheckBox    aCbxStartWithTemplate;
107cdf0e10cSrcweir 
108cdf0e10cSrcweir     FixedLine   aGrpSettings;
109cdf0e10cSrcweir     CheckBox    aCbxMasterPageCache;
110cdf0e10cSrcweir     CheckBox    aCbxCopy;
111cdf0e10cSrcweir     CheckBox    aCbxMarkedHitMovesAlways;
112cdf0e10cSrcweir     CheckBox    aCbxCrookNoContortion;
113cdf0e10cSrcweir 
114cdf0e10cSrcweir     FixedText   aTxtMetric;
115cdf0e10cSrcweir     ListBox     aLbMetric;
116cdf0e10cSrcweir     FixedText   aTxtTabstop;
117cdf0e10cSrcweir 	MetricField	aMtrFldTabstop;
118cdf0e10cSrcweir 
119cdf0e10cSrcweir     CheckBox    aCbxStartWithActualPage;
120cdf0e10cSrcweir     FixedLine   aGrpStartWithActualPage;
121cdf0e10cSrcweir     FixedLine   aTxtCompatibility;
122cdf0e10cSrcweir     CheckBox    aCbxUsePrinterMetrics;
123cdf0e10cSrcweir     CheckBox    aCbxCompatibility;
124cdf0e10cSrcweir 
125cdf0e10cSrcweir     //Scale
126cdf0e10cSrcweir     FixedLine       aGrpScale;
127cdf0e10cSrcweir     FixedText       aFtScale;
128cdf0e10cSrcweir     ComboBox        aCbScale;
129cdf0e10cSrcweir 
130cdf0e10cSrcweir     FixedText       aFtOriginal;
131cdf0e10cSrcweir     FixedText       aFtEquivalent;
132cdf0e10cSrcweir 
133cdf0e10cSrcweir     FixedText       aFtPageWidth;
134cdf0e10cSrcweir 	FixedInfo		aFiInfo1;
135cdf0e10cSrcweir     MetricField     aMtrFldOriginalWidth;
136cdf0e10cSrcweir 
137cdf0e10cSrcweir     FixedText       aFtPageHeight;
138cdf0e10cSrcweir 	FixedInfo		aFiInfo2;
139cdf0e10cSrcweir     MetricField     aMtrFldOriginalHeight;
140cdf0e10cSrcweir 
141cdf0e10cSrcweir     MetricField     aMtrFldInfo1;
142cdf0e10cSrcweir 	MetricField 	aMtrFldInfo2;
143cdf0e10cSrcweir 
144cdf0e10cSrcweir     sal_uInt32          nWidth;
145cdf0e10cSrcweir 	sal_uInt32			nHeight;
146cdf0e10cSrcweir 	String			aInfo1;
147cdf0e10cSrcweir 	String			aInfo2;
148cdf0e10cSrcweir 
149cdf0e10cSrcweir 	SfxMapUnit			ePoolUnit;
150cdf0e10cSrcweir 
151cdf0e10cSrcweir 	String			GetScale( sal_Int32 nX, sal_Int32 nY );
152cdf0e10cSrcweir 	sal_Bool			SetScale( const String& aScale, sal_Int32& rX, sal_Int32& rY );
153cdf0e10cSrcweir 
154cdf0e10cSrcweir 	DECL_LINK( ModifyScaleHdl, void * );
155cdf0e10cSrcweir 	DECL_LINK( ModifyOriginalScaleHdl, void * );
156cdf0e10cSrcweir     DECL_LINK( SelectMetricHdl_Impl, ListBox * );
157cdf0e10cSrcweir 
158cdf0e10cSrcweir     /** Enable or disable the controls in the compatibility section of the
159cdf0e10cSrcweir         'general' tab page depending on whether there is at least one
160cdf0e10cSrcweir         document.
161cdf0e10cSrcweir     */
162cdf0e10cSrcweir     void UpdateCompatibilityControls (void);
163cdf0e10cSrcweir 
164cdf0e10cSrcweir protected:
165cdf0e10cSrcweir 	virtual void ActivatePage( const SfxItemSet& rSet );
166cdf0e10cSrcweir 	virtual int	DeactivatePage( SfxItemSet* pSet );
167cdf0e10cSrcweir 
168cdf0e10cSrcweir public:
169cdf0e10cSrcweir 			SdTpOptionsMisc( Window* pParent, const SfxItemSet& rInAttrs  );
170cdf0e10cSrcweir 			~SdTpOptionsMisc();
171cdf0e10cSrcweir 
172cdf0e10cSrcweir 	static	SfxTabPage* Create( Window*, const SfxItemSet& );
173cdf0e10cSrcweir 	virtual sal_Bool FillItemSet( SfxItemSet& );
174cdf0e10cSrcweir 	virtual void Reset( const SfxItemSet & );
175cdf0e10cSrcweir 
176cdf0e10cSrcweir     /** Hide Impress specific controls, make Draw specific controls visible
177cdf0e10cSrcweir         and arrange the visible controls.  Do not call this method or the
178cdf0e10cSrcweir         <member>SetImpressMode()</member> method more than once.
179cdf0e10cSrcweir     */
180cdf0e10cSrcweir     void SetDrawMode (void);
181cdf0e10cSrcweir 
182cdf0e10cSrcweir     /** Hide Draw specific controls, make Impress specific controls visible
183cdf0e10cSrcweir         and arrange the visible controls.  Do not call this method or the
184cdf0e10cSrcweir         <member>SetDrawMode()</member> method more than once.
185cdf0e10cSrcweir     */
186cdf0e10cSrcweir     void SetImpressMode (void);
187cdf0e10cSrcweir 	virtual void		PageCreated (SfxAllItemSet aSet);
188cdf0e10cSrcweir 
189cdf0e10cSrcweir 	using TabPage::ActivatePage;
190cdf0e10cSrcweir 	using TabPage::DeactivatePage;
191cdf0e10cSrcweir 	using OutputDevice::SetDrawMode;
192cdf0e10cSrcweir 
193cdf0e10cSrcweir };
194cdf0e10cSrcweir 
195cdf0e10cSrcweir 
196cdf0e10cSrcweir #endif // _SD_TPOPTION_HXX
197cdf0e10cSrcweir 
198