xref: /AOO41X/main/svtools/inc/svtools/apearcfg.hxx (revision 01aa44aa134af97080e2cf8e8bf3a0a4cd1cffe0)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 #ifndef _SVT_APEARCFG_HXX
24 #define _SVT_APEARCFG_HXX
25 
26 #include "svtools/svtdllapi.h"
27 #include "tools/solar.h"
28 #include <unotools/configitem.hxx>
29 
30 class Application;
31 
32 /*--------------------------------------------------------------------
33      Beschreibung:
34  --------------------------------------------------------------------*/
35 typedef enum {
36     SnapToButton = 0,
37     SnapToMiddle,
38     NoSnap
39 } SnapType;
40 
41 typedef enum { // MUST match the order chosen in ListBox LB_DRAG_MODE in optgdlg.src
42     DragFullWindow,
43     DragFrame,
44     DragSystemDep
45 } DragMode;
46 
47 
48 class SVT_DLLPUBLIC SvtTabAppearanceCfg : public utl::ConfigItem
49 {
50     short           nDragMode           ;
51     short           nScaleFactor        ;
52     short           nSnapMode           ;
53     short           nMiddleMouse;
54 #if defined( UNX ) || defined ( FS_PRIV_DEBUG )
55     short           nAAMinPixelHeight   ;
56 #endif
57 
58     sal_Bool            bMenuMouseFollow        ;
59 #if defined( UNX ) || defined ( FS_PRIV_DEBUG )
60     sal_Bool            bFontAntialiasing       ;
61 #endif
62 
63     static sal_Bool  bInitialized ;
64 
65     SVT_DLLPRIVATE const com::sun::star::uno::Sequence<rtl::OUString>& GetPropertyNames();
66 
67 public:
68     SvtTabAppearanceCfg( );
69     ~SvtTabAppearanceCfg( );
70 
71     virtual void    Commit();
72     virtual void Notify( const com::sun::star::uno::Sequence< rtl::OUString >& _rPropertyNames);
73 
GetDragMode() const74     sal_uInt16  GetDragMode  () const { return nDragMode; }
75     void        SetDragMode  ( sal_uInt16 nSet );
76 
GetScaleFactor() const77     sal_uInt16      GetScaleFactor () const { return nScaleFactor; }
78     void        SetScaleFactor ( sal_uInt16 nSet );
79 
GetSnapMode() const80     sal_uInt16      GetSnapMode () const { return nSnapMode; }
81     void        SetSnapMode ( sal_uInt16 nSet );
82 
GetMiddleMouseButton() const83     sal_uInt16      GetMiddleMouseButton () const { return nMiddleMouse; }
84     void        SetMiddleMouseButton ( sal_uInt16 nSet );
85 
86     void        SetApplicationDefaults ( Application* pApp );
87 
SetMenuMouseFollow(sal_Bool bSet)88     void        SetMenuMouseFollow(sal_Bool bSet) {bMenuMouseFollow = bSet; SetModified();}
IsMenuMouseFollow() const89     sal_Bool        IsMenuMouseFollow() const{return bMenuMouseFollow;}
90 
91 #if defined( UNX ) || defined ( FS_PRIV_DEBUG )
SetFontAntiAliasing(sal_Bool bSet)92     void        SetFontAntiAliasing( sal_Bool bSet )    { bFontAntialiasing = bSet; SetModified(); }
IsFontAntiAliasing() const93     sal_Bool        IsFontAntiAliasing() const { return bFontAntialiasing; }
94 
GetFontAntialiasingMinPixelHeight() const95     sal_uInt16      GetFontAntialiasingMinPixelHeight( ) const { return nAAMinPixelHeight; }
SetFontAntialiasingMinPixelHeight(sal_uInt16 _nMinHeight)96     void        SetFontAntialiasingMinPixelHeight( sal_uInt16 _nMinHeight ) { nAAMinPixelHeight = _nMinHeight; SetModified(); }
97 #endif
98 
IsInitialized()99     static sal_Bool IsInitialized()  { return bInitialized; }
SetInitialized()100     static void    SetInitialized() { bInitialized = sal_True; }
101 };
102 
103 #endif //  _OFA_APEARCFG_HXX
104