xref: /aoo41x/main/toolkit/workben/layout/zoom.hxx (revision 50e6b072)
1*50e6b072SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*50e6b072SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*50e6b072SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*50e6b072SAndrew Rist  * distributed with this work for additional information
6*50e6b072SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*50e6b072SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*50e6b072SAndrew Rist  * "License"); you may not use this file except in compliance
9*50e6b072SAndrew Rist  * with the License.  You may obtain a copy of the License at
10*50e6b072SAndrew Rist  *
11*50e6b072SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*50e6b072SAndrew Rist  *
13*50e6b072SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*50e6b072SAndrew Rist  * software distributed under the License is distributed on an
15*50e6b072SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*50e6b072SAndrew Rist  * KIND, either express or implied.  See the License for the
17*50e6b072SAndrew Rist  * specific language governing permissions and limitations
18*50e6b072SAndrew Rist  * under the License.
19*50e6b072SAndrew Rist  *
20*50e6b072SAndrew Rist  *************************************************************/
21*50e6b072SAndrew Rist 
22*50e6b072SAndrew Rist 
23cdf0e10cSrcweir #ifndef _SVX_ZOOM_HXX
24cdf0e10cSrcweir #define _SVX_ZOOM_HXX
25cdf0e10cSrcweir 
26cdf0e10cSrcweir // include ---------------------------------------------------------------
27cdf0e10cSrcweir 
28cdf0e10cSrcweir #include <layout/layout.hxx>
29cdf0e10cSrcweir #include <sfx2/basedlgs.hxx>
30cdf0e10cSrcweir #ifndef _SV_BUTTON_HXX //autogen wg. Radio-/OK-/Cancel-/HelpButton
31cdf0e10cSrcweir #include <vcl/button.hxx>
32cdf0e10cSrcweir #endif
33cdf0e10cSrcweir #include <vcl/field.hxx>
34cdf0e10cSrcweir #include <vcl/fixed.hxx>
35cdf0e10cSrcweir 
36cdf0e10cSrcweir // define ----------------------------------------------------------------
37cdf0e10cSrcweir /* CHINA001
38cdf0e10cSrcweir #define	ZOOMBTN_OPTIMAL		((USHORT)0x0001)
39cdf0e10cSrcweir #define ZOOMBTN_PAGEWIDTH	((USHORT)0x0002)
40cdf0e10cSrcweir #define ZOOMBTN_WHOLEPAGE	((USHORT)0x0004)
41cdf0e10cSrcweir */
42cdf0e10cSrcweir #ifndef _SVX_ZOOM_HXX
43cdf0e10cSrcweir #include "zoom_def.hxx"
44cdf0e10cSrcweir #endif
45cdf0e10cSrcweir // class SvxZoomDialog ---------------------------------------------------
46cdf0e10cSrcweir /*
47cdf0e10cSrcweir 	{k:\svx\prototyp\dialog\zoom.bmp}
48cdf0e10cSrcweir 
49cdf0e10cSrcweir 	[Beschreibung]
50cdf0e10cSrcweir 	Mit diesem Dialog wird ein Zoom-Faktor eingestellt.
51cdf0e10cSrcweir 
52cdf0e10cSrcweir 	[Items]
53cdf0e10cSrcweir 	SvxZoomItem	<SID_ATTR_ZOOM>
54cdf0e10cSrcweir */
55cdf0e10cSrcweir 
56cdf0e10cSrcweir #include <layout/layout-pre.hxx>
57cdf0e10cSrcweir 
58cdf0e10cSrcweir class SvxZoomDialog : public SfxModalDialog
59cdf0e10cSrcweir {
60cdf0e10cSrcweir private:
61cdf0e10cSrcweir     FixedLine           aZoomFl;
62cdf0e10cSrcweir     RadioButton         aOptimalBtn;
63cdf0e10cSrcweir     RadioButton         aWholePageBtn;
64cdf0e10cSrcweir 	RadioButton 		aPageWidthBtn;
65cdf0e10cSrcweir     RadioButton         a100Btn;
66cdf0e10cSrcweir     RadioButton         aUserBtn;
67cdf0e10cSrcweir 	MetricField 		aUserEdit;
68cdf0e10cSrcweir 
69cdf0e10cSrcweir     FixedLine           aViewLayoutFl;
70cdf0e10cSrcweir     RadioButton         aAutomaticBtn;
71cdf0e10cSrcweir     RadioButton         aSingleBtn;
72cdf0e10cSrcweir     RadioButton         aColumnsBtn;
73cdf0e10cSrcweir     MetricField         aColumnsEdit;
74cdf0e10cSrcweir     CheckBox            aBookModeChk;
75cdf0e10cSrcweir 
76cdf0e10cSrcweir     FixedLine           aBottomFl;
77cdf0e10cSrcweir     OKButton            aOKBtn;
78cdf0e10cSrcweir 	CancelButton		aCancelBtn;
79cdf0e10cSrcweir 	HelpButton			aHelpBtn;
80cdf0e10cSrcweir 
81cdf0e10cSrcweir #if !TEST_LAYOUT
82cdf0e10cSrcweir 	const SfxItemSet&	rSet;
83cdf0e10cSrcweir #endif /* !TEST_LAYOUT */
84cdf0e10cSrcweir 	SfxItemSet*			pOutSet;
85cdf0e10cSrcweir 	BOOL				bModified;
86cdf0e10cSrcweir 
87cdf0e10cSrcweir #ifdef _SVX_ZOOM_CXX
88cdf0e10cSrcweir 	DECL_LINK( UserHdl, RadioButton* );
89cdf0e10cSrcweir 	DECL_LINK( SpinHdl, MetricField* );
90cdf0e10cSrcweir     DECL_LINK( ViewLayoutUserHdl, RadioButton* );
91cdf0e10cSrcweir     DECL_LINK( ViewLayoutSpinHdl, MetricField* );
92cdf0e10cSrcweir     DECL_LINK( ViewLayoutCheckHdl, CheckBox* );
93cdf0e10cSrcweir     DECL_LINK( OKHdl, Button* );
94cdf0e10cSrcweir #endif
95cdf0e10cSrcweir 
96cdf0e10cSrcweir public:
97cdf0e10cSrcweir #if TEST_LAYOUT
98cdf0e10cSrcweir     SvxZoomDialog( Window* pParent );
99cdf0e10cSrcweir #else /* !TEST_LAYOUT */
100cdf0e10cSrcweir 	SvxZoomDialog( Window* pParent, const SfxItemSet& rCoreSet );
101cdf0e10cSrcweir #endif /* !TEST_LAYOUT */
102cdf0e10cSrcweir 	~SvxZoomDialog();
103cdf0e10cSrcweir 
104cdf0e10cSrcweir 	static USHORT*		GetRanges();
GetOutputItemSet() const105cdf0e10cSrcweir 	const SfxItemSet*	GetOutputItemSet() const { return pOutSet; }
106cdf0e10cSrcweir 
107cdf0e10cSrcweir 	USHORT				GetFactor() const;
108cdf0e10cSrcweir 	void				SetFactor( USHORT nNewFactor, USHORT nBtnId = 0 );
109cdf0e10cSrcweir 
110cdf0e10cSrcweir 	void				SetButtonText( USHORT nBtnId, const String& aNewTxt );
111cdf0e10cSrcweir 	void				HideButton( USHORT nBtnId );
112cdf0e10cSrcweir 	void				SetLimits( USHORT nMin, USHORT nMax );
113cdf0e10cSrcweir 	void				SetSpinSize( USHORT nNewSpin );
114cdf0e10cSrcweir };
115cdf0e10cSrcweir 
116cdf0e10cSrcweir #include <layout/layout-post.hxx>
117cdf0e10cSrcweir 
118cdf0e10cSrcweir #endif
119cdf0e10cSrcweir 
120