LibreOffice Module cui (master)  1
zoom.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
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/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
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 .
18  */
19 #ifndef INCLUDED_CUI_SOURCE_INC_ZOOM_HXX
20 #define INCLUDED_CUI_SOURCE_INC_ZOOM_HXX
21 
22 #include <memory>
23 #include <sfx2/basedlgs.hxx>
24 #include <svl/itemset.hxx>
25 #include <svx/zoom_def.hxx>
26 #include <vcl/weld.hxx>
27 
29 {
30 private:
32  std::unique_ptr<SfxItemSet> m_pOutSet;
34 
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;
48 
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);
55 
56 public:
57  SvxZoomDialog(weld::Window* pParent, const SfxItemSet& rCoreSet);
58 
59  const SfxItemSet* GetOutputItemSet() const;
60 
61  sal_uInt16 GetFactor() const;
62  void SetFactor(sal_uInt16 nNewFactor, ZoomButtonId nButtonId = ZoomButtonId::NONE);
63 
64  void HideButton(ZoomButtonId nButtonId);
65  void SetLimits(sal_uInt16 nMin, sal_uInt16 nMax);
66 };
67 
68 #endif
69 
70 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
std::unique_ptr< SfxItemSet > m_pOutSet
Definition: zoom.hxx:32
const SfxItemSet * GetOutputItemSet() const
Definition: zoom.cxx:121
DECL_LINK(UserHdl, weld::ToggleButton &, void)
std::unique_ptr< weld::RadioButton > m_xAutomaticBtn
Definition: zoom.hxx:42
void SetFactor(sal_uInt16 nNewFactor, ZoomButtonId nButtonId=ZoomButtonId::NONE)
Definition: zoom.cxx:46
std::unique_ptr< weld::Button > m_xOKBtn
Definition: zoom.hxx:47
std::unique_ptr< weld::RadioButton > m_xPageWidthBtn
Definition: zoom.hxx:37
std::unique_ptr< weld::MetricSpinButton > m_xUserEdit
Definition: zoom.hxx:40
std::unique_ptr< weld::RadioButton > m_xOptimalBtn
Definition: zoom.hxx:35
std::unique_ptr< weld::Widget > m_xViewFrame
Definition: zoom.hxx:41
std::unique_ptr< weld::RadioButton > m_x100Btn
Definition: zoom.hxx:38
std::unique_ptr< weld::RadioButton > m_xWholePageBtn
Definition: zoom.hxx:36
void SetLimits(sal_uInt16 nMin, sal_uInt16 nMax)
Definition: zoom.cxx:115
std::unique_ptr< weld::CheckButton > m_xBookModeChk
Definition: zoom.hxx:46
const SfxItemSet & m_rSet
Definition: zoom.hxx:31
std::unique_ptr< weld::RadioButton > m_xColumnsBtn
Definition: zoom.hxx:44
SvxZoomDialog(weld::Window *pParent, const SfxItemSet &rCoreSet)
Definition: zoom.cxx:123
ZoomButtonId
bool m_bModified
Definition: zoom.hxx:33
std::unique_ptr< weld::SpinButton > m_xColumnsEdit
Definition: zoom.hxx:45
void HideButton(ZoomButtonId nButtonId)
Definition: zoom.cxx:94
sal_uInt16 GetFactor() const
Definition: zoom.cxx:35
std::unique_ptr< weld::RadioButton > m_xUserBtn
Definition: zoom.hxx:39
std::unique_ptr< weld::RadioButton > m_xSingleBtn
Definition: zoom.hxx:43