update dev300-m57
[ooovba.git] / framework / inc / classes / toolboxconfiguration.hxx
blob0c0e1949be6d4722b9eac2fa778e1ea534eb86eb
1 #ifndef __FRAMEWORK_CLASSES_TOOLBOXCONFIGURATION_HXX_
2 #define __FRAMEWORK_CLASSES_TOOLBOXCONFIGURATION_HXX_
4 #include <svtools/svarray.hxx>
5 #ifndef _SV_BITMAP_HXX
6 #include <vcl/bitmapex.hxx>
7 #endif
8 #include <tools/string.hxx>
9 #include <tools/stream.hxx>
10 #include <vcl/toolbox.hxx>
11 #include <vcl/toolbox.hxx>
13 // #110897#
14 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
16 namespace framework
19 struct ToolBoxItemDescriptor
21 BitmapEx* pBmpEx; // Bitmap ptr not used by xml configuration
22 String aBitmapName; // bitmap name => use to find correct bmp file
23 String aItemText; // label for this toolbox item
24 String aURL; // URL command to dispatch
25 USHORT nId; // internal id not used by xml configuration
26 USHORT nItemBits; // properties for this toolbox item (WinBits)
27 USHORT nItemType; // toolbox item type (BUTTON, SPACE, BREAK, SEPARATOR)
28 USHORT nVisible; // toolbox item visible?
29 USHORT nWidth; // width of a toolbox window (edit field, etc.)
30 USHORT nUserDef; // user defined toolbox item (1=yes/0=no)
31 String aHelpId; // A help id associated with this toolbox item
33 public:
35 ToolBoxItemDescriptor() : pBmpEx( 0 )
36 ,nId( 0 )
37 ,nItemBits( 0 )
38 ,nItemType( (USHORT)TOOLBOXITEM_SPACE )
39 ,nVisible( sal_True )
40 ,nWidth( 0 )
41 ,nUserDef( sal_False ) {}
44 typedef ToolBoxItemDescriptor* ToolBoxItemDescriptorPtr;
45 SV_DECL_PTRARR_DEL( ToolBoxDescriptor, ToolBoxItemDescriptorPtr, 10, 2)
47 struct ToolBoxLayoutItemDescriptor
49 String aName; // Unique name of the toolbox ( Objectbar, Toolbar etc. )
50 String aUserName; // Userspecified name for this toolbar
51 Point aFloatingPos; // Position in floating mode
52 USHORT nFloatingLines; // Number of lines in floating mode
53 USHORT nLines; // Number of lines in docking mode
54 WindowAlign eAlign; // Aligned position in docking mode
55 BOOL bVisible; // Visible or not
56 BOOL bFloating; // Floating mode on/off
57 ButtonType eType; // text, symbol or text+symbol
59 ToolBoxLayoutItemDescriptor() : nFloatingLines( 0 )
60 ,nLines( 1 )
61 ,eAlign( WINDOWALIGN_LEFT )
62 ,bVisible( sal_False )
63 ,bFloating( sal_False )
64 ,eType( BUTTON_SYMBOL ) {}
67 typedef ToolBoxLayoutItemDescriptor* ToolBoxLayoutItemDescriptorPtr;
68 SV_DECL_PTRARR_DEL( ToolBoxLayoutDescriptor, ToolBoxLayoutItemDescriptorPtr, 10, 2)
70 class ToolBoxConfiguration
72 public:
73 // #110897#
74 static sal_Bool LoadToolBox(
75 const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory,
76 SvStream& rInStream, ToolBoxDescriptor& aItems );
78 // #110897#
79 static sal_Bool StoreToolBox(
80 const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory,
81 SvStream& rOutStream, const ToolBoxDescriptor& aItems );
83 // #110897#
84 static sal_Bool LoadToolBoxLayout(
85 const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory,
86 SvStream& rInStream, ToolBoxLayoutDescriptor& aItems );
88 // #110897#
89 static sal_Bool StoreToolBoxLayout(
90 const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory,
91 SvStream& rOutStream, ToolBoxLayoutDescriptor& aItems );
94 } // namespace framework
96 #endif // __FRAMEWORK_CLASSES_TOOLBOXCONFIGURATION_HXX_