Impress: Implement getPartName.
[LibreOffice.git] / include / svtools / apearcfg.hxx
blob973577d31a3c74a8dcdd06d4a4910a608ea3ed22
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 .
19 #ifndef INCLUDED_SVTOOLS_APEARCFG_HXX
20 #define INCLUDED_SVTOOLS_APEARCFG_HXX
22 #include <svtools/svtdllapi.h>
23 #include <unotools/configitem.hxx>
25 class Application;
27 typedef enum {
28 SnapToButton = 0,
29 SnapToMiddle,
30 NoSnap
31 } SnapType;
33 typedef enum { // MUST match the order chosen in ListBox LB_DRAG_MODE in optgdlg.src
34 DragFullWindow,
35 DragFrame,
36 DragSystemDep
37 } DragMode;
40 class SVT_DLLPUBLIC SvtTabAppearanceCfg : public utl::ConfigItem
42 short nDragMode ;
43 short nScaleFactor ;
44 short nSnapMode ;
45 short nMiddleMouse;
46 #if defined( UNX )
47 short nAAMinPixelHeight ;
48 #endif
50 bool bMenuMouseFollow ;
51 #if defined( UNX )
52 bool bFontAntialiasing ;
53 #endif
55 static bool bInitialized ;
57 SVT_DLLPRIVATE const com::sun::star::uno::Sequence<OUString>& GetPropertyNames();
59 public:
60 SvtTabAppearanceCfg( );
61 virtual ~SvtTabAppearanceCfg( );
63 virtual void Commit() SAL_OVERRIDE;
64 virtual void Notify( const com::sun::star::uno::Sequence< OUString >& _rPropertyNames) SAL_OVERRIDE;
66 sal_uInt16 GetDragMode () const { return nDragMode; }
68 sal_uInt16 GetScaleFactor () const { return nScaleFactor; }
69 void SetScaleFactor ( sal_uInt16 nSet );
71 sal_uInt16 GetSnapMode () const { return nSnapMode; }
72 void SetSnapMode ( sal_uInt16 nSet );
74 sal_uInt16 GetMiddleMouseButton () const { return nMiddleMouse; }
75 void SetMiddleMouseButton ( sal_uInt16 nSet );
77 void SetApplicationDefaults ( Application* pApp );
79 void SetMenuMouseFollow(bool bSet) {bMenuMouseFollow = bSet; SetModified();}
80 bool IsMenuMouseFollow() const{return bMenuMouseFollow;}
82 #if defined( UNX )
83 void SetFontAntiAliasing( bool bSet ) { bFontAntialiasing = bSet; SetModified(); }
84 bool IsFontAntiAliasing() const { return bFontAntialiasing; }
86 sal_uInt16 GetFontAntialiasingMinPixelHeight( ) const { return nAAMinPixelHeight; }
87 void SetFontAntialiasingMinPixelHeight( sal_uInt16 _nMinHeight ) { nAAMinPixelHeight = _nMinHeight; SetModified(); }
88 #endif
90 static bool IsInitialized() { return bInitialized; }
91 static void SetInitialized() { bInitialized = true; }
94 #endif // _OFA_APEARCFG_HXX
96 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */