xref: /trunk/main/toolkit/workben/layout/zoom.hxx (revision 50e6b072)
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 _SVX_ZOOM_HXX
24 #define _SVX_ZOOM_HXX
25 
26 // include ---------------------------------------------------------------
27 
28 #include <layout/layout.hxx>
29 #include <sfx2/basedlgs.hxx>
30 #ifndef _SV_BUTTON_HXX //autogen wg. Radio-/OK-/Cancel-/HelpButton
31 #include <vcl/button.hxx>
32 #endif
33 #include <vcl/field.hxx>
34 #include <vcl/fixed.hxx>
35 
36 // define ----------------------------------------------------------------
37 /* CHINA001
38 #define	ZOOMBTN_OPTIMAL		((USHORT)0x0001)
39 #define ZOOMBTN_PAGEWIDTH	((USHORT)0x0002)
40 #define ZOOMBTN_WHOLEPAGE	((USHORT)0x0004)
41 */
42 #ifndef _SVX_ZOOM_HXX
43 #include "zoom_def.hxx"
44 #endif
45 // class SvxZoomDialog ---------------------------------------------------
46 /*
47 	{k:\svx\prototyp\dialog\zoom.bmp}
48 
49 	[Beschreibung]
50 	Mit diesem Dialog wird ein Zoom-Faktor eingestellt.
51 
52 	[Items]
53 	SvxZoomItem	<SID_ATTR_ZOOM>
54 */
55 
56 #include <layout/layout-pre.hxx>
57 
58 class SvxZoomDialog : public SfxModalDialog
59 {
60 private:
61     FixedLine           aZoomFl;
62     RadioButton         aOptimalBtn;
63     RadioButton         aWholePageBtn;
64 	RadioButton 		aPageWidthBtn;
65     RadioButton         a100Btn;
66     RadioButton         aUserBtn;
67 	MetricField 		aUserEdit;
68 
69     FixedLine           aViewLayoutFl;
70     RadioButton         aAutomaticBtn;
71     RadioButton         aSingleBtn;
72     RadioButton         aColumnsBtn;
73     MetricField         aColumnsEdit;
74     CheckBox            aBookModeChk;
75 
76     FixedLine           aBottomFl;
77     OKButton            aOKBtn;
78 	CancelButton		aCancelBtn;
79 	HelpButton			aHelpBtn;
80 
81 #if !TEST_LAYOUT
82 	const SfxItemSet&	rSet;
83 #endif /* !TEST_LAYOUT */
84 	SfxItemSet*			pOutSet;
85 	BOOL				bModified;
86 
87 #ifdef _SVX_ZOOM_CXX
88 	DECL_LINK( UserHdl, RadioButton* );
89 	DECL_LINK( SpinHdl, MetricField* );
90     DECL_LINK( ViewLayoutUserHdl, RadioButton* );
91     DECL_LINK( ViewLayoutSpinHdl, MetricField* );
92     DECL_LINK( ViewLayoutCheckHdl, CheckBox* );
93     DECL_LINK( OKHdl, Button* );
94 #endif
95 
96 public:
97 #if TEST_LAYOUT
98     SvxZoomDialog( Window* pParent );
99 #else /* !TEST_LAYOUT */
100 	SvxZoomDialog( Window* pParent, const SfxItemSet& rCoreSet );
101 #endif /* !TEST_LAYOUT */
102 	~SvxZoomDialog();
103 
104 	static USHORT*		GetRanges();
GetOutputItemSet() const105 	const SfxItemSet*	GetOutputItemSet() const { return pOutSet; }
106 
107 	USHORT				GetFactor() const;
108 	void				SetFactor( USHORT nNewFactor, USHORT nBtnId = 0 );
109 
110 	void				SetButtonText( USHORT nBtnId, const String& aNewTxt );
111 	void				HideButton( USHORT nBtnId );
112 	void				SetLimits( USHORT nMin, USHORT nMax );
113 	void				SetSpinSize( USHORT nNewSpin );
114 };
115 
116 #include <layout/layout-post.hxx>
117 
118 #endif
119 
120