1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
29 #ifndef _SD_TPOPTION_HXX
30 #define _SD_TPOPTION_HXX
33 #include <vcl/lstbox.hxx>
34 #include <vcl/group.hxx>
35 #include <vcl/fixed.hxx>
36 #include <vcl/field.hxx>
37 #include <vcl/button.hxx>
38 #include <svtools/stdctrl.hxx>
39 #include <sfx2/tabdlg.hxx>
40 #include <svx/optgrid.hxx>
42 /*************************************************************************
44 |* Optionen-Tab-Page: Snap
46 \************************************************************************/
47 class SdTpOptionsSnap
: public SvxGridTabPage
50 SdTpOptionsSnap( Window
* pParent
, const SfxItemSet
& rInAttrs
);
53 static SfxTabPage
* Create( Window
*, const SfxItemSet
& );
54 virtual BOOL
FillItemSet( SfxItemSet
& );
55 virtual void Reset( const SfxItemSet
& );
57 // virtual void ActivatePage( const SfxItemSet& rSet );
58 // virtual int DeactivatePage( SfxItemSet* pSet );
60 /*************************************************************************
62 |* Optionen-Tab-Page: Contents (Inhalte)
64 \************************************************************************/
65 class SdTpOptionsContents
: public SfxTabPage
68 FixedLine aGrpDisplay
;
70 CheckBox aCbxDragStripes
;
71 CheckBox aCbxHandlesBezier
;
72 CheckBox aCbxMoveOutline
;
76 SdTpOptionsContents( Window
* pParent
, const SfxItemSet
& rInAttrs
);
77 ~SdTpOptionsContents();
79 static SfxTabPage
* Create( Window
*, const SfxItemSet
& );
80 virtual BOOL
FillItemSet( SfxItemSet
& );
81 virtual void Reset( const SfxItemSet
& );
84 /*************************************************************************
86 |* Optionen-Tab-Page: View
88 \************************************************************************/
90 class SdTpOptionsMisc
: public SfxTabPage
92 friend class SdOptionsDlg
;
93 friend class SdModule
;
97 CheckBox aCbxQuickEdit
;
98 CheckBox aCbxPickThrough
;
100 FixedLine aGrpProgramStart
;
101 CheckBox aCbxStartWithTemplate
;
103 FixedLine aGrpSettings
;
104 CheckBox aCbxMasterPageCache
;
106 CheckBox aCbxMarkedHitMovesAlways
;
107 CheckBox aCbxCrookNoContortion
;
109 FixedText aTxtMetric
;
111 FixedText aTxtTabstop
;
112 MetricField aMtrFldTabstop
;
114 CheckBox aCbxStartWithActualPage
;
115 FixedLine aGrpStartWithActualPage
;
116 FixedLine aTxtCompatibility
;
117 CheckBox aCbxUsePrinterMetrics
;
118 CheckBox aCbxCompatibility
;
125 FixedText aFtOriginal
;
126 FixedText aFtEquivalent
;
128 FixedText aFtPageWidth
;
130 MetricField aMtrFldOriginalWidth
;
132 FixedText aFtPageHeight
;
134 MetricField aMtrFldOriginalHeight
;
136 MetricField aMtrFldInfo1
;
137 MetricField aMtrFldInfo2
;
144 SfxMapUnit ePoolUnit
;
146 String
GetScale( INT32 nX
, INT32 nY
);
147 BOOL
SetScale( const String
& aScale
, INT32
& rX
, INT32
& rY
);
149 DECL_LINK( ModifyScaleHdl
, void * );
150 DECL_LINK( ModifyOriginalScaleHdl
, void * );
151 DECL_LINK( SelectMetricHdl_Impl
, ListBox
* );
153 /** Enable or disable the controls in the compatibility section of the
154 'general' tab page depending on whether there is at least one
157 void UpdateCompatibilityControls (void);
160 virtual void ActivatePage( const SfxItemSet
& rSet
);
161 virtual int DeactivatePage( SfxItemSet
* pSet
);
164 SdTpOptionsMisc( Window
* pParent
, const SfxItemSet
& rInAttrs
);
167 static SfxTabPage
* Create( Window
*, const SfxItemSet
& );
168 virtual BOOL
FillItemSet( SfxItemSet
& );
169 virtual void Reset( const SfxItemSet
& );
171 /** Hide Impress specific controls, make Draw specific controls visible
172 and arrange the visible controls. Do not call this method or the
173 <member>SetImpressMode()</member> method more than once.
175 void SetDrawMode (void);
177 /** Hide Draw specific controls, make Impress specific controls visible
178 and arrange the visible controls. Do not call this method or the
179 <member>SetDrawMode()</member> method more than once.
181 void SetImpressMode (void);
182 virtual void PageCreated (SfxAllItemSet aSet
);
184 using TabPage::ActivatePage
;
185 using TabPage::DeactivatePage
;
186 using OutputDevice::SetDrawMode
;
191 #endif // _SD_TPOPTION_HXX
193 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */