merge the formfield patch from ooo-build
[ooovba.git] / svtools / inc / apearcfg.hxx
blob4a9e6aa93a83ddc4fa15575d20d3760199230d6e
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: apearcfg.hxx,v $
10 * $Revision: 1.5 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef _SVT_APEARCFG_HXX
31 #define _SVT_APEARCFG_HXX
33 #include "svtools/svtdllapi.h"
34 #include "tools/solar.h"
35 #include <unotools/configitem.hxx>
37 class Application;
39 /*--------------------------------------------------------------------
40 Beschreibung:
41 --------------------------------------------------------------------*/
42 typedef enum {
43 LookStardivision = 0,
44 LookMotif,
45 LookWindows,
46 LookOSTwo,
47 LookMacintosh
48 } SystemLook;
50 typedef enum {
51 SnapToButton = 0,
52 SnapToMiddle,
53 NoSnap
54 } SnapType;
56 typedef enum { // MUST match the order chosen in ListBox LB_DRAG_MODE in optgdlg.src
57 DragFullWindow,
58 DragFrame,
59 DragSystemDep
60 } DragMode;
63 class SVT_DLLPUBLIC SvtTabAppearanceCfg : public utl::ConfigItem
65 short nLookNFeel ;
66 short nDragMode ;
67 short nScaleFactor ;
68 short nSnapMode ;
69 short nMiddleMouse;
70 #if defined( UNX ) || defined ( FS_PRIV_DEBUG )
71 short nAAMinPixelHeight ;
72 #endif
74 BOOL bMenuMouseFollow ;
75 BOOL bSingleLineTabCtrl ;
76 BOOL bColoredTabCtrl ;
77 #if defined( UNX ) || defined ( FS_PRIV_DEBUG )
78 BOOL bFontAntialiasing ;
79 #endif
81 static sal_Bool bInitialized ;
83 SVT_DLLPRIVATE const com::sun::star::uno::Sequence<rtl::OUString>& GetPropertyNames();
85 public:
86 SvtTabAppearanceCfg( );
87 ~SvtTabAppearanceCfg( );
89 virtual void Commit();
91 USHORT GetLookNFeel () const { return nLookNFeel; }
92 void SetLookNFeel ( USHORT nSet );
94 USHORT GetDragMode () const { return nDragMode; }
95 void SetDragMode ( USHORT nSet );
97 USHORT GetScaleFactor () const { return nScaleFactor; }
98 void SetScaleFactor ( USHORT nSet );
100 USHORT GetSnapMode () const { return nSnapMode; }
101 void SetSnapMode ( USHORT nSet );
103 USHORT GetMiddleMouseButton () const { return nMiddleMouse; }
104 void SetMiddleMouseButton ( USHORT nSet );
106 void SetApplicationDefaults ( Application* pApp );
108 void SetMenuMouseFollow(BOOL bSet) {bMenuMouseFollow = bSet; SetModified();}
109 BOOL IsMenuMouseFollow() const{return bMenuMouseFollow;}
111 void SetSingleLineTabCtrl(BOOL bSet) {bSingleLineTabCtrl = bSet; SetModified();}
112 BOOL IsSingleLineTabCtrl()const {return bSingleLineTabCtrl;}
114 #if defined( UNX ) || defined ( FS_PRIV_DEBUG )
115 void SetFontAntiAliasing( BOOL bSet ) { bFontAntialiasing = bSet; SetModified(); }
116 BOOL IsFontAntiAliasing() const { return bFontAntialiasing; }
118 USHORT GetFontAntialiasingMinPixelHeight( ) const { return nAAMinPixelHeight; }
119 void SetFontAntialiasingMinPixelHeight( USHORT _nMinHeight ) { nAAMinPixelHeight = _nMinHeight; SetModified(); }
120 #endif
122 void SetColoredTabCtrl(BOOL bSet) {bColoredTabCtrl = bSet; SetModified();};
123 BOOL IsColoredTabCtrl()const {return bColoredTabCtrl;}
125 static sal_Bool IsInitialized() { return bInitialized; }
126 static void SetInitialized() { bInitialized = sal_True; }
129 #endif // _OFA_APEARCFG_HXX