1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef INCLUDED_CUI_SOURCE_INC_ZOOM_HXX
20 #define INCLUDED_CUI_SOURCE_INC_ZOOM_HXX
23 #include <sfx2/basedlgs.hxx>
24 #include <svl/itemset.hxx>
25 #include <svx/zoom_def.hxx>
26 #include <vcl/weld.hxx>
28 class SvxZoomDialog
: public SfxDialogController
31 const SfxItemSet
& m_rSet
;
32 std::unique_ptr
<SfxItemSet
> m_pOutSet
;
35 std::unique_ptr
<weld::RadioButton
> m_xOptimalBtn
;
36 std::unique_ptr
<weld::RadioButton
> m_xWholePageBtn
;
37 std::unique_ptr
<weld::RadioButton
> m_xPageWidthBtn
;
38 std::unique_ptr
<weld::RadioButton
> m_x100Btn
;
39 std::unique_ptr
<weld::RadioButton
> m_xUserBtn
;
40 std::unique_ptr
<weld::MetricSpinButton
> m_xUserEdit
;
41 std::unique_ptr
<weld::Widget
> m_xViewFrame
;
42 std::unique_ptr
<weld::RadioButton
> m_xAutomaticBtn
;
43 std::unique_ptr
<weld::RadioButton
> m_xSingleBtn
;
44 std::unique_ptr
<weld::RadioButton
> m_xColumnsBtn
;
45 std::unique_ptr
<weld::SpinButton
> m_xColumnsEdit
;
46 std::unique_ptr
<weld::CheckButton
> m_xBookModeChk
;
47 std::unique_ptr
<weld::Button
> m_xOKBtn
;
49 DECL_LINK(UserHdl
, weld::ToggleButton
&, void);
50 DECL_LINK(SpinHdl
, weld::MetricSpinButton
&, void);
51 DECL_LINK(ViewLayoutUserHdl
, weld::ToggleButton
&, void);
52 DECL_LINK(ViewLayoutSpinHdl
, weld::SpinButton
&, void);
53 DECL_LINK(ViewLayoutCheckHdl
, weld::ToggleButton
&, void);
54 DECL_LINK(OKHdl
, weld::Button
&, void);
57 SvxZoomDialog(weld::Window
* pParent
, const SfxItemSet
& rCoreSet
);
59 const SfxItemSet
* GetOutputItemSet() const;
61 sal_uInt16
GetFactor() const;
62 void SetFactor(sal_uInt16 nNewFactor
, ZoomButtonId nButtonId
= ZoomButtonId::NONE
);
64 void HideButton(ZoomButtonId nButtonId
);
65 void SetLimits(sal_uInt16 nMin
, sal_uInt16 nMax
);
70 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */