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 
24 #ifndef __FRAMEWORK_UICONFIGURATION_GLOBALSETTINGS_HXX_
25 #define __FRAMEWORK_UICONFIGURATION_GLOBALSETTINGS_HXX_
26 
27 /** Attention: stl headers must(!) be included at first. Otherwise it can make trouble
28                with solaris headers ...
29 */
30 #include <vector>
31 #include <list>
32 #include <hash_map>
33 
34 //_________________________________________________________________________________________________________________
35 //	my own includes
36 //_________________________________________________________________________________________________________________
37 #include <threadhelp/threadhelpbase.hxx>
38 #include <macros/generic.hxx>
39 #include <macros/xinterface.hxx>
40 #include <macros/xtypeprovider.hxx>
41 #include <macros/xserviceinfo.hxx>
42 #include <stdtypes.h>
43 
44 //_________________________________________________________________________________________________________________
45 //	interface includes
46 //_________________________________________________________________________________________________________________
47 #include <com/sun/star/lang/XServiceInfo.hpp>
48 #include <com/sun/star/lang/XTypeProvider.hpp>
49 #include <com/sun/star/container/XNameAccess.hpp>
50 
51 //_________________________________________________________________________________________________________________
52 //	other includes
53 //_________________________________________________________________________________________________________________
54 #include <cppuhelper/weak.hxx>
55 #include <rtl/ustring.hxx>
56 
57 namespace framework
58 {
59 
60 class GlobalSettings
61 {
62     public:
63         GlobalSettings( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& rSrvMgr );
64         ~GlobalSettings();
65 
66         enum UIElementType
67         {
68             UIELEMENT_TYPE_TOOLBAR,
69             UIELEMENT_TYPE_DOCKWINDOW,
70             UIELEMENT_TYPE_STATUSBAR
71         };
72 
73         enum StateInfo
74         {
75             STATEINFO_LOCKED,
76             STATEINFO_DOCKED
77         };
78 
79         // settings access
80         sal_Bool HasStatesInfo( UIElementType eElementType );
81         sal_Bool GetStateInfo( UIElementType eElementType, StateInfo eStateInfo, ::com::sun::star::uno::Any& aValue );
82 
83     private:
84         GlobalSettings();
85         GlobalSettings(const GlobalSettings&);
86         GlobalSettings& operator=(const GlobalSettings& );
87 
88         ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xSrvMgr;
89 };
90 
91 } // namespace framework
92 
93 #endif // __FRAMEWORK_UIELEMENT_WINDOWSTATECONFIGURATION_HXX_
94