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 .
20 #ifndef INCLUDED_SD_SOURCE_UI_INC_TPOPTION_HXX
21 #define INCLUDED_SD_SOURCE_UI_INC_TPOPTION_HXX
23 #include <vcl/lstbox.hxx>
24 #include <vcl/group.hxx>
25 #include <vcl/fixed.hxx>
26 #include <vcl/field.hxx>
27 #include <vcl/button.hxx>
28 #include <svtools/stdctrl.hxx>
29 #include <sfx2/tabdlg.hxx>
30 #include <svx/optgrid.hxx>
33 * Option-Tab-Page: Snap
35 class SdTpOptionsSnap
: public SvxGridTabPage
38 SdTpOptionsSnap( vcl::Window
* pParent
, const SfxItemSet
& rInAttrs
);
39 virtual ~SdTpOptionsSnap();
41 static VclPtr
<SfxTabPage
> Create( vcl::Window
*, const SfxItemSet
* );
42 virtual bool FillItemSet( SfxItemSet
* ) SAL_OVERRIDE
;
43 virtual void Reset( const SfxItemSet
* ) SAL_OVERRIDE
;
48 * Option-Tab-Page: Contents
50 class SdTpOptionsContents
: public SfxTabPage
53 VclPtr
<CheckBox
> m_pCbxRuler
;
54 VclPtr
<CheckBox
> m_pCbxDragStripes
;
55 VclPtr
<CheckBox
> m_pCbxHandlesBezier
;
56 VclPtr
<CheckBox
> m_pCbxMoveOutline
;
59 SdTpOptionsContents( vcl::Window
* pParent
, const SfxItemSet
& rInAttrs
);
60 virtual ~SdTpOptionsContents();
61 virtual void dispose() SAL_OVERRIDE
;
63 static VclPtr
<SfxTabPage
> Create( vcl::Window
*, const SfxItemSet
* );
64 virtual bool FillItemSet( SfxItemSet
* ) SAL_OVERRIDE
;
65 virtual void Reset( const SfxItemSet
* ) SAL_OVERRIDE
;
69 * Option-Tab-Page: View
72 class SdTpOptionsMisc
: public SfxTabPage
74 friend class SdModule
;
77 VclPtr
<CheckBox
> m_pCbxQuickEdit
;
78 VclPtr
<CheckBox
> m_pCbxPickThrough
;
80 VclPtr
<VclFrame
> m_pNewDocumentFrame
;
81 VclPtr
<CheckBox
> m_pCbxStartWithTemplate
;
83 VclPtr
<CheckBox
> m_pCbxMasterPageCache
;
84 VclPtr
<CheckBox
> m_pCbxCopy
;
85 VclPtr
<CheckBox
> m_pCbxMarkedHitMovesAlways
;
86 VclPtr
<VclFrame
> m_pPresentationFrame
;
88 VclPtr
<ListBox
> m_pLbMetric
;
89 VclPtr
<MetricField
> m_pMtrFldTabstop
;
91 VclPtr
<CheckBox
> m_pCbxEnableSdremote
;
92 VclPtr
<CheckBox
> m_pCbxEnablePresenterScreen
;
93 VclPtr
<CheckBox
> m_pCbxUsePrinterMetrics
;
94 VclPtr
<CheckBox
> m_pCbxCompatibility
;
97 VclPtr
<VclFrame
> m_pScaleFrame
;
98 VclPtr
<ComboBox
> m_pCbScale
;
99 VclPtr
<FixedText
> m_pNewDocLb
;
100 VclPtr
<FixedText
> m_pFiInfo1
;
101 VclPtr
<MetricField
> m_pMtrFldOriginalWidth
;
102 VclPtr
<FixedText
> m_pWidthLb
;
103 VclPtr
<FixedText
> m_pHeightLb
;
104 VclPtr
<FixedText
> m_pFiInfo2
;
105 VclPtr
<MetricField
> m_pMtrFldOriginalHeight
;
106 VclPtr
<CheckBox
> m_pCbxDistrot
;
107 VclPtr
<MetricField
> m_pMtrFldInfo1
;
108 VclPtr
<MetricField
> m_pMtrFldInfo2
;
115 SfxMapUnit ePoolUnit
;
117 static OUString
GetScale( sal_Int32 nX
, sal_Int32 nY
);
118 static bool SetScale( const OUString
& aScale
, sal_Int32
& rX
, sal_Int32
& rY
);
120 DECL_LINK( SelectMetricHdl_Impl
, void * );
122 /** Enable or disable the controls in the compatibility section of the
123 'general' tab page depending on whether there is at least one
126 void UpdateCompatibilityControls();
129 virtual void ActivatePage( const SfxItemSet
& rSet
) SAL_OVERRIDE
;
130 virtual sfxpg
DeactivatePage( SfxItemSet
* pSet
) SAL_OVERRIDE
;
133 SdTpOptionsMisc( vcl::Window
* pParent
, const SfxItemSet
& rInAttrs
);
134 virtual ~SdTpOptionsMisc();
135 virtual void dispose() SAL_OVERRIDE
;
137 static VclPtr
<SfxTabPage
> Create( vcl::Window
*, const SfxItemSet
* );
138 virtual bool FillItemSet( SfxItemSet
* ) SAL_OVERRIDE
;
139 virtual void Reset( const SfxItemSet
* ) SAL_OVERRIDE
;
141 /** Hide Impress specific controls, make Draw specific controls visible
142 and arrange the visible controls. Do not call this method or the
143 <member>SetImpressMode()</member> method more than once.
147 /** Hide Draw specific controls, make Impress specific controls visible
148 and arrange the visible controls. Do not call this method or the
149 <member>SetDrawMode()</member> method more than once.
151 void SetImpressMode();
152 virtual void PageCreated(const SfxAllItemSet
& aSet
) SAL_OVERRIDE
;
154 using TabPage::ActivatePage
;
155 using TabPage::DeactivatePage
;
156 using OutputDevice::SetDrawMode
;
160 #endif // INCLUDED_SD_SOURCE_UI_INC_TPOPTION_HXX
162 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */