bump product version to 6.3.0.0.beta1
[LibreOffice.git] / sd / source / ui / inc / tpoption.hxx
blob6bfda966f217f7a22e55f9b6ecc757ce42f5251c
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 .
20 #ifndef INCLUDED_SD_SOURCE_UI_INC_TPOPTION_HXX
21 #define INCLUDED_SD_SOURCE_UI_INC_TPOPTION_HXX
23 #include <vcl/layout.hxx>
24 #include <vcl/lstbox.hxx>
25 #include <vcl/fixed.hxx>
26 #include <vcl/field.hxx>
27 #include <vcl/button.hxx>
28 #include <sfx2/tabdlg.hxx>
29 #include <svx/optgrid.hxx>
31 /**
32 * Option-Tab-Page: Snap
34 class SdTpOptionsSnap : public SvxGridTabPage
36 public:
37 SdTpOptionsSnap(TabPageParent pParent, const SfxItemSet& rInAttrs);
38 virtual ~SdTpOptionsSnap() override;
40 static VclPtr<SfxTabPage> Create( TabPageParent, const SfxItemSet* );
41 virtual bool FillItemSet( SfxItemSet* ) override;
42 virtual void Reset( const SfxItemSet * ) override;
45 /**
46 * Option-Tab-Page: Contents
48 class SdTpOptionsContents : public SfxTabPage
50 private:
51 VclPtr<CheckBox> m_pCbxRuler;
52 VclPtr<CheckBox> m_pCbxDragStripes;
53 VclPtr<CheckBox> m_pCbxHandlesBezier;
54 VclPtr<CheckBox> m_pCbxMoveOutline;
56 public:
57 SdTpOptionsContents( vcl::Window* pParent, const SfxItemSet& rInAttrs );
58 virtual ~SdTpOptionsContents() override;
59 virtual void dispose() override;
61 static VclPtr<SfxTabPage> Create( TabPageParent, const SfxItemSet* );
62 virtual bool FillItemSet( SfxItemSet* ) override;
63 virtual void Reset( const SfxItemSet * ) override;
66 /**
67 * Option-Tab-Page: View
70 class SdTpOptionsMisc : public SfxTabPage
72 friend class SdModule;
74 private:
75 VclPtr<CheckBox> m_pCbxQuickEdit;
76 VclPtr<CheckBox> m_pCbxPickThrough;
78 VclPtr<VclFrame> m_pNewDocumentFrame;
79 VclPtr<CheckBox> m_pCbxStartWithTemplate;
81 VclPtr<CheckBox> m_pCbxMasterPageCache;
82 VclPtr<CheckBox> m_pCbxCopy;
83 VclPtr<CheckBox> m_pCbxMarkedHitMovesAlways;
84 VclPtr<VclFrame> m_pPresentationFrame;
86 VclPtr<ListBox> m_pLbMetric;
87 VclPtr<MetricField> m_pMtrFldTabstop;
89 VclPtr<CheckBox> m_pCbxEnableSdremote;
90 VclPtr<CheckBox> m_pCbxEnablePresenterScreen;
91 VclPtr<CheckBox> m_pCbxUsePrinterMetrics;
92 VclPtr<CheckBox> m_pCbxCompatibility;
94 //Scale
95 VclPtr<VclFrame> m_pScaleFrame;
96 VclPtr<ComboBox> m_pCbScale;
97 VclPtr<FixedText> m_pNewDocLb;
98 VclPtr<FixedText> m_pFiInfo1;
99 VclPtr<MetricField> m_pMtrFldOriginalWidth;
100 VclPtr<FixedText> m_pWidthLb;
101 VclPtr<FixedText> m_pHeightLb;
102 VclPtr<FixedText> m_pFiInfo2;
103 VclPtr<MetricField> m_pMtrFldOriginalHeight;
104 VclPtr<CheckBox> m_pCbxDistrot;
105 VclPtr<MetricField> m_pMtrFldInfo1;
106 VclPtr<MetricField> m_pMtrFldInfo2;
108 sal_uInt32 nWidth;
109 sal_uInt32 nHeight;
110 OUString aInfo1;
111 OUString aInfo2;
113 MapUnit ePoolUnit;
115 static OUString GetScale( sal_Int32 nX, sal_Int32 nY );
116 static bool SetScale( const OUString& aScale, sal_Int32& rX, sal_Int32& rY );
118 DECL_LINK( SelectMetricHdl_Impl, ListBox&, void );
120 /** Enable or disable the controls in the compatibility section of the
121 'general' tab page depending on whether there is at least one
122 document.
124 void UpdateCompatibilityControls();
126 protected:
127 virtual void ActivatePage( const SfxItemSet& rSet ) override;
128 virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
130 public:
131 SdTpOptionsMisc( vcl::Window* pParent, const SfxItemSet& rInAttrs );
132 virtual ~SdTpOptionsMisc() override;
133 virtual void dispose() override;
135 static VclPtr<SfxTabPage> Create( TabPageParent, const SfxItemSet* );
136 virtual bool FillItemSet( SfxItemSet* ) override;
137 virtual void Reset( const SfxItemSet * ) override;
139 /** Hide Impress specific controls, make Draw specific controls visible
140 and arrange the visible controls. Do not call this method or the
141 <member>SetImpressMode()</member> method more than once.
143 void SetDrawMode();
145 /** Hide Draw specific controls, make Impress specific controls visible
146 and arrange the visible controls. Do not call this method or the
147 <member>SetDrawMode()</member> method more than once.
149 void SetImpressMode();
150 virtual void PageCreated(const SfxAllItemSet& aSet) override;
152 using TabPage::ActivatePage;
153 using TabPage::DeactivatePage;
154 using OutputDevice::SetDrawMode;
158 #endif // INCLUDED_SD_SOURCE_UI_INC_TPOPTION_HXX
160 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */