merge the formfield patch from ooo-build
[ooovba.git] / toolkit / workben / layout / zoom.hxx
blob396258457b69cd4235387a07fef8f57ff812eb86
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: zoom.hxx,v $
10 * $Revision: 1.6 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef _SVX_ZOOM_HXX
31 #define _SVX_ZOOM_HXX
33 // include ---------------------------------------------------------------
35 #include <layout/layout.hxx>
36 #include <sfx2/basedlgs.hxx>
37 #ifndef _SV_BUTTON_HXX //autogen wg. Radio-/OK-/Cancel-/HelpButton
38 #include <vcl/button.hxx>
39 #endif
40 #include <vcl/field.hxx>
41 #include <vcl/fixed.hxx>
43 // define ----------------------------------------------------------------
44 /* CHINA001
45 #define ZOOMBTN_OPTIMAL ((USHORT)0x0001)
46 #define ZOOMBTN_PAGEWIDTH ((USHORT)0x0002)
47 #define ZOOMBTN_WHOLEPAGE ((USHORT)0x0004)
49 #ifndef _SVX_ZOOM_HXX
50 #include "zoom_def.hxx"
51 #endif
52 // class SvxZoomDialog ---------------------------------------------------
54 {k:\svx\prototyp\dialog\zoom.bmp}
56 [Beschreibung]
57 Mit diesem Dialog wird ein Zoom-Faktor eingestellt.
59 [Items]
60 SvxZoomItem <SID_ATTR_ZOOM>
63 #include <layout/layout-pre.hxx>
65 class SvxZoomDialog : public SfxModalDialog
67 private:
68 FixedLine aZoomFl;
69 RadioButton aOptimalBtn;
70 RadioButton aWholePageBtn;
71 RadioButton aPageWidthBtn;
72 RadioButton a100Btn;
73 RadioButton aUserBtn;
74 MetricField aUserEdit;
76 FixedLine aViewLayoutFl;
77 RadioButton aAutomaticBtn;
78 RadioButton aSingleBtn;
79 RadioButton aColumnsBtn;
80 MetricField aColumnsEdit;
81 CheckBox aBookModeChk;
83 FixedLine aBottomFl;
84 OKButton aOKBtn;
85 CancelButton aCancelBtn;
86 HelpButton aHelpBtn;
88 #if !TEST_LAYOUT
89 const SfxItemSet& rSet;
90 #endif /* !TEST_LAYOUT */
91 SfxItemSet* pOutSet;
92 BOOL bModified;
94 #ifdef _SVX_ZOOM_CXX
95 DECL_LINK( UserHdl, RadioButton* );
96 DECL_LINK( SpinHdl, MetricField* );
97 DECL_LINK( ViewLayoutUserHdl, RadioButton* );
98 DECL_LINK( ViewLayoutSpinHdl, MetricField* );
99 DECL_LINK( ViewLayoutCheckHdl, CheckBox* );
100 DECL_LINK( OKHdl, Button* );
101 #endif
103 public:
104 #if TEST_LAYOUT
105 SvxZoomDialog( Window* pParent );
106 #else /* !TEST_LAYOUT */
107 SvxZoomDialog( Window* pParent, const SfxItemSet& rCoreSet );
108 #endif /* !TEST_LAYOUT */
109 ~SvxZoomDialog();
111 static USHORT* GetRanges();
112 const SfxItemSet* GetOutputItemSet() const { return pOutSet; }
114 USHORT GetFactor() const;
115 void SetFactor( USHORT nNewFactor, USHORT nBtnId = 0 );
117 void SetButtonText( USHORT nBtnId, const String& aNewTxt );
118 void HideButton( USHORT nBtnId );
119 void SetLimits( USHORT nMin, USHORT nMax );
120 void SetSpinSize( USHORT nNewSpin );
123 #include <layout/layout-post.hxx>
125 #endif