xref: /trunk/main/framework/inc/framework/statusbarconfiguration.hxx (revision 537d918930a77db9c28916ebc25c79ea73c289a1)
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 #ifndef __FRAMEWORK_CLASSES_STATUSBARCONFIGURATION_HXX_
23 #define __FRAMEWORK_CLASSES_STATUSBARCONFIGURATION_HXX_
24 
25 #include <framework/fwedllapi.h>
26 #include <svl/svarray.hxx>
27 #include <tools/string.hxx>
28 #include <tools/stream.hxx>
29 #include <vcl/status.hxx>
30 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
31 #include <com/sun/star/io/XInputStream.hpp>
32 #include <com/sun/star/io/XOutputStream.hpp>
33 #include <com/sun/star/container/XIndexAccess.hpp>
34 #include <com/sun/star/container/XIndexContainer.hpp>
35 
36 namespace framework
37 {
38 
39 struct FWE_DLLPUBLIC StatusBarItemDescriptor
40 {
41     String  aURL;                       // URL command to dispatch
42     long    nItemBits;                  // properties for this statusbar item (WinBits)
43     long    nWidth;                     // width of a statusbar item
44     long    nOffset;                    // offset
45 
46     public:
47 
StatusBarItemDescriptorframework::StatusBarItemDescriptor48         StatusBarItemDescriptor() : nItemBits( SIB_CENTER | SIB_IN )
49                                     ,nWidth( 0 )
50                                     ,nOffset( STATUSBAR_OFFSET ) {}
51 };
52 
53 typedef StatusBarItemDescriptor* StatusBarItemDescriptorPtr;
54 SV_DECL_PTRARR_DEL( StatusBarDescriptor, StatusBarItemDescriptorPtr, 10, 2)
55 
56 class FWE_DLLPUBLIC StatusBarConfiguration
57 {
58     public:
59         static sal_Bool LoadStatusBar(
60             const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory,
61             SvStream& rInStream, StatusBarDescriptor& aItems );
62 
63         static sal_Bool StoreStatusBar(
64             const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory,
65             SvStream& rOutStream, const StatusBarDescriptor& aItems );
66 
67         static sal_Bool LoadStatusBar(
68             const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory,
69             const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& xInputStream,
70             const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer >& rStatusbarConfiguration );
71 
72         static sal_Bool StoreStatusBar(
73             const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory,
74             const ::com::sun::star::uno::Reference< ::com::sun::star::io::XOutputStream >& xOutputStream,
75             const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess >& rStatusbarConfiguration );
76 };
77 
78 } // namespace framework
79 
80 #endif // __FRAMEWORK_CLASSES_STATUSBARCONFIGURATION_HXX_
81 
82 /* vim: set noet sw=4 ts=4: */
83