2001-06-11 10:37:57 +00:00
|
|
|
#ifndef __FRAMEWORK_CLASSES_TOOLBOXCONFIGURATION_HXX_
|
|
|
|
#define __FRAMEWORK_CLASSES_TOOLBOXCONFIGURATION_HXX_
|
|
|
|
|
|
|
|
#include <svtools/svarray.hxx>
|
|
|
|
#ifndef _SV_BITMAP_HXX
|
2004-05-21 11:36:03 +00:00
|
|
|
#include <vcl/bitmapex.hxx>
|
2001-06-11 10:37:57 +00:00
|
|
|
#endif
|
|
|
|
#include <tools/string.hxx>
|
|
|
|
#include <tools/stream.hxx>
|
2001-06-18 08:51:07 +00:00
|
|
|
#include <vcl/toolbox.hxx>
|
2001-06-11 10:37:57 +00:00
|
|
|
#include <vcl/toolbox.hxx>
|
|
|
|
|
2004-05-03 12:17:16 +00:00
|
|
|
// #110897#
|
|
|
|
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
|
2001-06-11 10:37:57 +00:00
|
|
|
|
|
|
|
namespace framework
|
|
|
|
{
|
|
|
|
|
|
|
|
struct ToolBoxItemDescriptor
|
|
|
|
{
|
2004-05-21 11:36:03 +00:00
|
|
|
BitmapEx* pBmpEx; // Bitmap ptr not used by xml configuration
|
|
|
|
String aBitmapName; // bitmap name => use to find correct bmp file
|
|
|
|
String aItemText; // label for this toolbox item
|
|
|
|
String aURL; // URL command to dispatch
|
|
|
|
USHORT nId; // internal id not used by xml configuration
|
|
|
|
USHORT nItemBits; // properties for this toolbox item (WinBits)
|
|
|
|
USHORT nItemType; // toolbox item type (BUTTON, SPACE, BREAK, SEPARATOR)
|
|
|
|
USHORT nVisible; // toolbox item visible?
|
|
|
|
USHORT nWidth; // width of a toolbox window (edit field, etc.)
|
|
|
|
USHORT nUserDef; // user defined toolbox item (1=yes/0=no)
|
|
|
|
String aHelpId; // A help id associated with this toolbox item
|
2001-06-11 10:37:57 +00:00
|
|
|
|
|
|
|
public:
|
|
|
|
|
2004-05-21 11:36:03 +00:00
|
|
|
ToolBoxItemDescriptor() : pBmpEx( 0 )
|
2001-06-11 10:37:57 +00:00
|
|
|
,nId( 0 )
|
|
|
|
,nItemBits( 0 )
|
|
|
|
,nItemType( (USHORT)TOOLBOXITEM_SPACE )
|
|
|
|
,nVisible( sal_True )
|
|
|
|
,nWidth( 0 )
|
|
|
|
,nUserDef( sal_False ) {}
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef ToolBoxItemDescriptor* ToolBoxItemDescriptorPtr;
|
|
|
|
SV_DECL_PTRARR_DEL( ToolBoxDescriptor, ToolBoxItemDescriptorPtr, 10, 2)
|
|
|
|
|
2001-06-18 08:51:07 +00:00
|
|
|
struct ToolBoxLayoutItemDescriptor
|
|
|
|
{
|
2002-07-11 13:58:04 +00:00
|
|
|
String aName; // Unique name of the toolbox ( Objectbar, Toolbar etc. )
|
|
|
|
String aUserName; // Userspecified name for this toolbar
|
|
|
|
Point aFloatingPos; // Position in floating mode
|
|
|
|
USHORT nFloatingLines; // Number of lines in floating mode
|
|
|
|
USHORT nLines; // Number of lines in docking mode
|
2004-01-06 15:58:20 +00:00
|
|
|
WindowAlign eAlign; // Aligned position in docking mode
|
2002-07-11 13:58:04 +00:00
|
|
|
BOOL bVisible; // Visible or not
|
|
|
|
BOOL bFloating; // Floating mode on/off
|
|
|
|
ButtonType eType; // text, symbol or text+symbol
|
2001-06-18 08:51:07 +00:00
|
|
|
|
|
|
|
ToolBoxLayoutItemDescriptor() : nFloatingLines( 0 )
|
2001-08-03 15:50:24 +00:00
|
|
|
,nLines( 1 )
|
2004-01-06 15:58:20 +00:00
|
|
|
,eAlign( WINDOWALIGN_LEFT )
|
2001-06-18 08:51:07 +00:00
|
|
|
,bVisible( sal_False )
|
2001-09-25 11:22:06 +00:00
|
|
|
,bFloating( sal_False )
|
|
|
|
,eType( BUTTON_SYMBOL ) {}
|
2001-06-18 08:51:07 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
typedef ToolBoxLayoutItemDescriptor* ToolBoxLayoutItemDescriptorPtr;
|
|
|
|
SV_DECL_PTRARR_DEL( ToolBoxLayoutDescriptor, ToolBoxLayoutItemDescriptorPtr, 10, 2)
|
|
|
|
|
2001-06-11 10:37:57 +00:00
|
|
|
class ToolBoxConfiguration
|
|
|
|
{
|
|
|
|
public:
|
2004-05-03 12:17:16 +00:00
|
|
|
// #110897#
|
|
|
|
static sal_Bool LoadToolBox(
|
|
|
|
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory,
|
|
|
|
SvStream& rInStream, ToolBoxDescriptor& aItems );
|
|
|
|
|
|
|
|
// #110897#
|
|
|
|
static sal_Bool StoreToolBox(
|
|
|
|
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory,
|
|
|
|
SvStream& rOutStream, const ToolBoxDescriptor& aItems );
|
|
|
|
|
|
|
|
// #110897#
|
|
|
|
static sal_Bool LoadToolBoxLayout(
|
|
|
|
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory,
|
|
|
|
SvStream& rInStream, ToolBoxLayoutDescriptor& aItems );
|
|
|
|
|
|
|
|
// #110897#
|
|
|
|
static sal_Bool StoreToolBoxLayout(
|
|
|
|
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory,
|
|
|
|
SvStream& rOutStream, ToolBoxLayoutDescriptor& aItems );
|
2001-06-11 10:37:57 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace framework
|
|
|
|
|
|
|
|
#endif // __FRAMEWORK_CLASSES_TOOLBOXCONFIGURATION_HXX_
|