a240679574
2004/08/05 15:26:03 cd 1.3.62.1: #i32219# New classes for framework based status bar
77 lines
2.8 KiB
C++
77 lines
2.8 KiB
C++
#ifndef __FRAMEWORK_CLASSES_STATUSBARCONFIGURATION_HXX_
|
|
#define __FRAMEWORK_CLASSES_STATUSBARCONFIGURATION_HXX_
|
|
|
|
#ifndef _SVARRAY_HXX
|
|
#include <svtools/svarray.hxx>
|
|
#endif
|
|
#ifndef _STRING_HXX
|
|
#include <tools/string.hxx>
|
|
#endif
|
|
#ifndef _STREAM_HXX
|
|
#include <tools/stream.hxx>
|
|
#endif
|
|
#ifndef _SV_STATUS_HXX
|
|
#include <vcl/status.hxx>
|
|
#endif
|
|
|
|
#ifndef _COM_SUN_STAR_LANG_XMULTISERVICEFACTORY_HPP_
|
|
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
|
|
#endif
|
|
#ifndef _COM_SUN_STAR_IO_XINPUTSTREAM_HPP_
|
|
#include <com/sun/star/io/XInputStream.hpp>
|
|
#endif
|
|
#ifndef _COM_SUN_STAR_IO_XOUTPUTSTREAM_HPP_
|
|
#include <com/sun/star/io/XOutputStream.hpp>
|
|
#endif
|
|
#ifndef _COM_SUN_STAR_CONTAINER_XINDEXACCESS_HPP_
|
|
#include <com/sun/star/container/XIndexAccess.hpp>
|
|
#endif
|
|
#ifndef _COM_SUN_STAR_CONTAINER_XINDEXCONTAINER_HPP_
|
|
#include <com/sun/star/container/XIndexContainer.hpp>
|
|
#endif
|
|
|
|
namespace framework
|
|
{
|
|
|
|
struct StatusBarItemDescriptor
|
|
{
|
|
String aURL; // URL command to dispatch
|
|
long nItemBits; // properties for this statusbar item (WinBits)
|
|
long nWidth; // width of a statusbar item
|
|
long nOffset; // offset
|
|
|
|
public:
|
|
|
|
StatusBarItemDescriptor() : nItemBits( SIB_CENTER | SIB_IN )
|
|
,nWidth( 0 )
|
|
,nOffset( STATUSBAR_OFFSET ) {}
|
|
};
|
|
|
|
typedef StatusBarItemDescriptor* StatusBarItemDescriptorPtr;
|
|
SV_DECL_PTRARR_DEL( StatusBarDescriptor, StatusBarItemDescriptorPtr, 10, 2)
|
|
|
|
class StatusBarConfiguration
|
|
{
|
|
public:
|
|
static sal_Bool LoadStatusBar(
|
|
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory,
|
|
SvStream& rInStream, StatusBarDescriptor& aItems );
|
|
|
|
static sal_Bool StoreStatusBar(
|
|
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory,
|
|
SvStream& rOutStream, const StatusBarDescriptor& aItems );
|
|
|
|
static sal_Bool LoadStatusBar(
|
|
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory,
|
|
const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& xInputStream,
|
|
const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer >& rStatusbarConfiguration );
|
|
|
|
static sal_Bool StoreStatusBar(
|
|
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory,
|
|
const ::com::sun::star::uno::Reference< ::com::sun::star::io::XOutputStream >& xOutputStream,
|
|
const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess >& rStatusbarConfiguration );
|
|
};
|
|
|
|
} // namespace framework
|
|
|
|
#endif // __FRAMEWORK_CLASSES_STATUSBARCONFIGURATION_HXX_
|