xref: /trunk/main/sd/source/ui/inc/tpoption.hxx (revision cdf0e10c4e3984b49a9502b011690b615761d4a3)
1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 #ifndef _SD_TPOPTION_HXX
29 #define _SD_TPOPTION_HXX
30 
31 
32 #ifndef _LSTBOX_HXX //autogen
33 #include <vcl/lstbox.hxx>
34 #endif
35 #ifndef _GROUP_HXX //autogen
36 #include <vcl/group.hxx>
37 #endif
38 #ifndef _FIXED_HXX //autogen
39 #include <vcl/fixed.hxx>
40 #endif
41 #ifndef _FIELD_HXX //autogen
42 #include <vcl/field.hxx>
43 #endif
44 #ifndef _BUTTON_HXX //autogen
45 #include <vcl/button.hxx>
46 #endif
47 #include <svtools/stdctrl.hxx>
48 #include <sfx2/tabdlg.hxx>
49 #include <svx/optgrid.hxx>
50 
51 /*************************************************************************
52 |*
53 |* Optionen-Tab-Page: Snap
54 |*
55 \************************************************************************/
56 class SdTpOptionsSnap : public SvxGridTabPage
57 {
58 public:
59             SdTpOptionsSnap( Window* pParent, const SfxItemSet& rInAttrs  );
60             ~SdTpOptionsSnap();
61 
62     static  SfxTabPage* Create( Window*, const SfxItemSet& );
63     virtual sal_Bool FillItemSet( SfxItemSet& );
64     virtual void Reset( const SfxItemSet & );
65 
66 //    virtual void ActivatePage( const SfxItemSet& rSet );
67 //    virtual int  DeactivatePage( SfxItemSet* pSet );
68 };
69 /*************************************************************************
70 |*
71 |* Optionen-Tab-Page: Contents (Inhalte)
72 |*
73 \************************************************************************/
74 class SdTpOptionsContents : public SfxTabPage
75 {
76 private:
77     FixedLine    aGrpDisplay;
78     CheckBox    aCbxRuler;
79     CheckBox    aCbxDragStripes;
80     CheckBox    aCbxHandlesBezier;
81     CheckBox    aCbxMoveOutline;
82 
83 
84 public:
85             SdTpOptionsContents( Window* pParent, const SfxItemSet& rInAttrs  );
86             ~SdTpOptionsContents();
87 
88     static  SfxTabPage* Create( Window*, const SfxItemSet& );
89     virtual sal_Bool FillItemSet( SfxItemSet& );
90     virtual void Reset( const SfxItemSet & );
91 };
92 
93 /*************************************************************************
94 |*
95 |* Optionen-Tab-Page: View
96 |*
97 \************************************************************************/
98 class SdModule;
99 class SdTpOptionsMisc : public SfxTabPage
100 {
101  friend class SdOptionsDlg;
102  friend class SdModule;
103 
104 private:
105     FixedLine   aGrpText;
106     CheckBox    aCbxQuickEdit;
107     CheckBox    aCbxPickThrough;
108 
109     FixedLine   aGrpProgramStart;
110     CheckBox    aCbxStartWithTemplate;
111 
112     FixedLine   aGrpSettings;
113     CheckBox    aCbxMasterPageCache;
114     CheckBox    aCbxCopy;
115     CheckBox    aCbxMarkedHitMovesAlways;
116     CheckBox    aCbxCrookNoContortion;
117 
118     FixedText   aTxtMetric;
119     ListBox     aLbMetric;
120     FixedText   aTxtTabstop;
121     MetricField aMtrFldTabstop;
122 
123     CheckBox    aCbxStartWithActualPage;
124     FixedLine   aGrpStartWithActualPage;
125     FixedLine   aTxtCompatibility;
126     CheckBox    aCbxUsePrinterMetrics;
127     CheckBox    aCbxCompatibility;
128 
129     //Scale
130     FixedLine       aGrpScale;
131     FixedText       aFtScale;
132     ComboBox        aCbScale;
133 
134     FixedText       aFtOriginal;
135     FixedText       aFtEquivalent;
136 
137     FixedText       aFtPageWidth;
138     FixedInfo       aFiInfo1;
139     MetricField     aMtrFldOriginalWidth;
140 
141     FixedText       aFtPageHeight;
142     FixedInfo       aFiInfo2;
143     MetricField     aMtrFldOriginalHeight;
144 
145     MetricField     aMtrFldInfo1;
146     MetricField     aMtrFldInfo2;
147 
148     sal_uInt32          nWidth;
149     sal_uInt32          nHeight;
150     String          aInfo1;
151     String          aInfo2;
152 
153     SfxMapUnit          ePoolUnit;
154 
155     String          GetScale( sal_Int32 nX, sal_Int32 nY );
156     sal_Bool            SetScale( const String& aScale, sal_Int32& rX, sal_Int32& rY );
157 
158     DECL_LINK( ModifyScaleHdl, void * );
159     DECL_LINK( ModifyOriginalScaleHdl, void * );
160     DECL_LINK( SelectMetricHdl_Impl, ListBox * );
161 
162     /** Enable or disable the controls in the compatibility section of the
163         'general' tab page depending on whether there is at least one
164         document.
165     */
166     void UpdateCompatibilityControls (void);
167 
168 protected:
169     virtual void ActivatePage( const SfxItemSet& rSet );
170     virtual int DeactivatePage( SfxItemSet* pSet );
171 
172 public:
173             SdTpOptionsMisc( Window* pParent, const SfxItemSet& rInAttrs  );
174             ~SdTpOptionsMisc();
175 
176     static  SfxTabPage* Create( Window*, const SfxItemSet& );
177     virtual sal_Bool FillItemSet( SfxItemSet& );
178     virtual void Reset( const SfxItemSet & );
179 
180     /** Hide Impress specific controls, make Draw specific controls visible
181         and arrange the visible controls.  Do not call this method or the
182         <member>SetImpressMode()</member> method more than once.
183     */
184     void SetDrawMode (void);
185 
186     /** Hide Draw specific controls, make Impress specific controls visible
187         and arrange the visible controls.  Do not call this method or the
188         <member>SetDrawMode()</member> method more than once.
189     */
190     void SetImpressMode (void);
191     virtual void        PageCreated (SfxAllItemSet aSet);
192 
193     using TabPage::ActivatePage;
194     using TabPage::DeactivatePage;
195     using OutputDevice::SetDrawMode;
196 
197 };
198 
199 
200 #endif // _SD_TPOPTION_HXX
201 
202