xref: /aoo41x/main/cui/source/inc/zoom.hxx (revision c4eee24d)
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		((sal_uInt16)0x0001)
39 #define ZOOMBTN_PAGEWIDTH	((sal_uInt16)0x0002)
40 #define ZOOMBTN_WHOLEPAGE	((sal_uInt16)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 	const SfxItemSet&	rSet;
82 	SfxItemSet*			pOutSet;
83 	sal_Bool				bModified;
84 
85 #ifdef _SVX_ZOOM_CXX
86 	DECL_LINK( UserHdl, RadioButton* );
87 	DECL_LINK( SpinHdl, MetricField* );
88     DECL_LINK( ViewLayoutUserHdl, RadioButton* );
89     DECL_LINK( ViewLayoutSpinHdl, MetricField* );
90     DECL_LINK( ViewLayoutCheckHdl, CheckBox* );
91     DECL_LINK( OKHdl, Button* );
92 #endif
93 
94 public:
95 	SvxZoomDialog( Window* pParent, const SfxItemSet& rCoreSet );
96 	~SvxZoomDialog();
97 
GetOutputItemSet() const98 	const SfxItemSet*	GetOutputItemSet() const { return pOutSet; }
99 
100 	sal_uInt16				GetFactor() const;
101 	void				SetFactor( sal_uInt16 nNewFactor, sal_uInt16 nBtnId = 0 );
102 
103 	void				HideButton( sal_uInt16 nBtnId );
104 	void				SetLimits( sal_uInt16 nMin, sal_uInt16 nMax );
105 };
106 
107 #include <layout/layout-post.hxx>
108 
109 #endif
110 
111