diff options
author | Thomas Lange [tl] <tl@openoffice.org> | 2010-06-18 13:09:52 +0200 |
---|---|---|
committer | Thomas Lange [tl] <tl@openoffice.org> | 2010-06-18 13:09:52 +0200 |
commit | a3c52e955ec05284db925b9d7453d42cb958890c (patch) | |
tree | 763e34104542a7d45312d8f1c770ed5f06b197de /svtools/inc | |
parent | 8b11b2af1e090a3f8df4596eaa2522936f07c399 (diff) | |
parent | 7f0993d43019a0ccb7f89c11fc23704c063b902f (diff) |
cws tl79: merge with DEV300_m83
Diffstat (limited to 'svtools/inc')
24 files changed, 1817 insertions, 37 deletions
diff --git a/svtools/inc/svtools/accessiblefactory.hxx b/svtools/inc/svtools/accessiblefactory.hxx index b435d3da96a7..9606e93a2fa0 100644..100755 --- a/svtools/inc/svtools/accessiblefactory.hxx +++ b/svtools/inc/svtools/accessiblefactory.hxx @@ -61,6 +61,10 @@ namespace svt { //........................................................................ + class ToolPanelDeck; + class IToolPanelDeck; + class PanelTabBar; + /** a function which is able to create a factory for the standard Accessible/Context components needed for standard toolkit controls @@ -162,6 +166,18 @@ namespace svt sal_Int32 _nRowPos, sal_uInt16 _nColPos ) const = 0; + + virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext > + createAccessibleToolPanelDeck( + const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& i_rAccessibleParent, + ::svt::ToolPanelDeck& i_rPanelDeck + ) = 0; + virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext > + createAccessibleToolPanelTabBar( + const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& i_rAccessibleParent, + ::svt::IToolPanelDeck& i_rPanelDeck, + ::svt::PanelTabBar& i_rTabBar + ) = 0; }; //........................................................................ diff --git a/svtools/inc/svtools/accessibletable.hxx b/svtools/inc/svtools/accessibletable.hxx index 7098d2b0d4ef..198a24b8eb62 100755 --- a/svtools/inc/svtools/accessibletable.hxx +++ b/svtools/inc/svtools/accessibletable.hxx @@ -99,7 +99,7 @@ public: AccessibleTableControlObjType eObjType ) const= 0; // Window - virtual Rectangle GetWindowExtentsRelative( Window *pRelativeWindow ) = 0; + virtual Rectangle GetWindowExtentsRelative( Window *pRelativeWindow ) const = 0; virtual void GrabFocus()= 0; virtual XACC GetAccessible( BOOL bCreate = TRUE )= 0; virtual Window* GetAccessibleParentWindow() const= 0; diff --git a/svtools/inc/svtools/accessibletableprovider.hxx b/svtools/inc/svtools/accessibletableprovider.hxx index fd29c72f35be..d14aecce9f58 100644 --- a/svtools/inc/svtools/accessibletableprovider.hxx +++ b/svtools/inc/svtools/accessibletableprovider.hxx @@ -132,7 +132,7 @@ public: virtual BOOL GetGlyphBoundRects( const Point& rOrigin, const String& rStr, int nIndex, int nLen, int nBase, MetricVector& rVector ) = 0; // Window - virtual Rectangle GetWindowExtentsRelative( Window *pRelativeWindow ) = 0; + virtual Rectangle GetWindowExtentsRelative( Window *pRelativeWindow ) const = 0; virtual void GrabFocus() = 0; virtual XACC GetAccessible( BOOL bCreate = TRUE ) = 0; virtual Window* GetAccessibleParentWindow() const = 0; diff --git a/svtools/inc/svtools/brwbox.hxx b/svtools/inc/svtools/brwbox.hxx index 9adeaf7efd05..42fb4b4d36ac 100644 --- a/svtools/inc/svtools/brwbox.hxx +++ b/svtools/inc/svtools/brwbox.hxx @@ -96,8 +96,6 @@ typedef ULONG BrowserMode; #define BROWSER_HIGHLIGHT_NONE 0x0100 // == BROWSER_HIDESELECT #define BROWSER_HIGHLIGHT_TOGGLE 0x00000000 // old default => NULL, dont use! -#define BROWSER_HIGHLIGHT_AUTO 0x00010000 -#define BROWSER_HIGHLIGHT_MANU 0x00020000 #define BROWSER_HEADERBAR_NEW 0x00040000 #define BROWSER_AUTOSIZE_LASTCOL 0x00080000 @@ -848,7 +846,7 @@ public: virtual sal_Bool IsCellVisible( sal_Int32 _nRow, sal_uInt16 _nColumn ) const; virtual String GetAccessibleCellText(long _nRow, USHORT _nColPos) const; virtual BOOL GetGlyphBoundRects( const Point& rOrigin, const String& rStr, int nIndex, int nLen, int nBase, MetricVector& rVector ); - virtual Rectangle GetWindowExtentsRelative( Window *pRelativeWindow ); + virtual Rectangle GetWindowExtentsRelative( Window *pRelativeWindow ) const; virtual void GrabFocus(); virtual XACC GetAccessible( BOOL bCreate = TRUE ); virtual Window* GetAccessibleParentWindow() const; diff --git a/svtools/inc/svtools/filter.hxx b/svtools/inc/svtools/filter.hxx index 770e81b00551..49ec77adfea5 100644 --- a/svtools/inc/svtools/filter.hxx +++ b/svtools/inc/svtools/filter.hxx @@ -62,6 +62,8 @@ class Graphic; #define GRFILTER_ABORT 6 #define GRFILTER_TOOBIG 7 +#define GRFILTER_OUTHINT_GREY 1 + #define GRFILTER_FORMAT_NOTFOUND ((USHORT)0xFFFF) #define GRFILTER_FORMAT_DONTKNOW ((USHORT)0xFFFF) @@ -323,7 +325,7 @@ protected: sal_Bool bDummy2; sal_Bool bDummy3; sal_Bool bDummy4; - long nDummy1; + long nExpGraphHint; long nDummy2; void* pDummy1; void* pDummy2; @@ -374,6 +376,7 @@ public: USHORT ExportGraphic( const Graphic& rGraphic, const String& rPath, SvStream& rOStm, USHORT nFormat = GRFILTER_FORMAT_DONTKNOW, const com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >* pFilterData = NULL ); + long GetExportGraphicHint() const { return nExpGraphHint; } USHORT CanImportGraphic( const INetURLObject& rPath, USHORT nFormat = GRFILTER_FORMAT_DONTKNOW, diff --git a/svtools/inc/svtools/popupmenucontrollerbase.hxx b/svtools/inc/svtools/popupmenucontrollerbase.hxx new file mode 100644 index 000000000000..b062234a512e --- /dev/null +++ b/svtools/inc/svtools/popupmenucontrollerbase.hxx @@ -0,0 +1,141 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef __SVTOOLS_POPUPMENUCONTROLLERBASE_HXX_ +#define __SVTOOLS_POPUPMENUCONTROLLERBASE_HXX_ + +#include "svtools/svtdllapi.h" + +//_________________________________________________________________________________________________________________ +// interface includes +//_________________________________________________________________________________________________________________ +#include <com/sun/star/lang/XServiceInfo.hpp> +#include <com/sun/star/lang/XTypeProvider.hpp> +#include <com/sun/star/lang/XInitialization.hpp> +#include <com/sun/star/lang/XMultiServiceFactory.hpp> +#include <com/sun/star/frame/XFrame.hpp> +#include <com/sun/star/frame/XDispatchProvider.hpp> +#include <com/sun/star/frame/XDispatch.hpp> +#include <com/sun/star/frame/XStatusListener.hpp> +#include <com/sun/star/frame/XPopupMenuController.hpp> +#include <com/sun/star/uri/XUriReferenceFactory.hpp> +#include <com/sun/star/uri/XUriReference.hpp> +#include <com/sun/star/util/XURLTransformer.hpp> +//_________________________________________________________________________________________________________________ +// includes of other projects +//_________________________________________________________________________________________________________________ +#include <toolkit/awt/vclxmenu.hxx> +#include <cppuhelper/compbase7.hxx> +#include <comphelper/broadcasthelper.hxx> +#include <cppuhelper/weak.hxx> +#include <rtl/ustring.hxx> + +namespace svt +{ + struct PopupMenuControllerBaseDispatchInfo; + + typedef ::cppu::WeakComponentImplHelper7< + com::sun::star::lang::XServiceInfo , + com::sun::star::frame::XPopupMenuController , + com::sun::star::lang::XInitialization , + com::sun::star::frame::XStatusListener , + com::sun::star::awt::XMenuListener , + com::sun::star::frame::XDispatchProvider , + com::sun::star::frame::XDispatch > PopupMenuControllerBaseType; + + class SVT_DLLPUBLIC PopupMenuControllerBase : protected ::comphelper::OBaseMutex, // Struct for right initalization of mutex member! Must be first of baseclasses. + public PopupMenuControllerBaseType + { + public: + PopupMenuControllerBase( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager ); + virtual ~PopupMenuControllerBase(); + + // XServiceInfo + virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw (::com::sun::star::uno::RuntimeException) = 0; + virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw (::com::sun::star::uno::RuntimeException) = 0; + + // XPopupMenuController + virtual void SAL_CALL setPopupMenu( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPopupMenu >& PopupMenu ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL updatePopupMenu() throw (::com::sun::star::uno::RuntimeException); + + // XInitialization + virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException); + + // XStatusListener + virtual void SAL_CALL statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw ( ::com::sun::star::uno::RuntimeException ) = 0; + + // XMenuListener + virtual void SAL_CALL highlight( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL select( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL activate( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL deactivate( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException); + + // XDispatchProvider + virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > SAL_CALL queryDispatch( const ::com::sun::star::util::URL& aURL, const ::rtl::OUString& sTarget, sal_Int32 nFlags ) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > > SAL_CALL queryDispatches( const ::com::sun::star::uno::Sequence< ::com::sun::star::frame::DispatchDescriptor >& lDescriptor ) throw( ::com::sun::star::uno::RuntimeException ); + + // XDispatch + virtual void SAL_CALL dispatch( const ::com::sun::star::util::URL& aURL, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& seqProperties ) throw( ::com::sun::star::uno::RuntimeException ); + virtual void SAL_CALL addStatusListener( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener >& xControl, const ::com::sun::star::util::URL& aURL ) throw( ::com::sun::star::uno::RuntimeException ); + virtual void SAL_CALL removeStatusListener( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener >& xControl, const ::com::sun::star::util::URL& aURL ) throw( ::com::sun::star::uno::RuntimeException ); + + // XEventListener + virtual void SAL_CALL disposing( const com::sun::star::lang::EventObject& Source ) throw ( ::com::sun::star::uno::RuntimeException ); + + void dispatchCommand( const ::rtl::OUString& sCommandURL, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rArgs ); + + protected: + void throwIfDisposed() throw ( ::com::sun::star::uno::RuntimeException ); + + /** helper method to cause statusChanged is called once for the given command url */ + void SAL_CALL updateCommand( const rtl::OUString& rCommandURL ); + + /** this function is called upon disposing the component + */ + virtual void SAL_CALL disposing(); + + virtual void resetPopupMenu( com::sun::star::uno::Reference< com::sun::star::awt::XPopupMenu >& rPopupMenu ); + virtual void impl_setPopupMenu(); + virtual void impl_select(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch >& _xDispatch,const ::com::sun::star::util::URL& aURL); + ::rtl::OUString determineBaseURL( const ::rtl::OUString& aURL ); + + DECL_STATIC_LINK( PopupMenuControllerBase, ExecuteHdl_Impl, PopupMenuControllerBaseDispatchInfo* ); + + + bool m_bInitialized; + rtl::OUString m_aCommandURL; + rtl::OUString m_aBaseURL; + ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > m_xDispatch; + ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > m_xFrame; + ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xServiceManager; + ::com::sun::star::uno::Reference< ::com::sun::star::util::XURLTransformer > m_xURLTransformer; + ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPopupMenu > m_xPopupMenu; + }; +} + +#endif // __SVTOOLS_POPUPMENUCONTROLLERBASE_HXX_ diff --git a/svtools/inc/svtools/popupwindowcontroller.hxx b/svtools/inc/svtools/popupwindowcontroller.hxx new file mode 100644 index 000000000000..4877d0184318 --- /dev/null +++ b/svtools/inc/svtools/popupwindowcontroller.hxx @@ -0,0 +1,85 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef __SVTOOLS_POPUPWINDOWCONTROLLER_HXX_ +#define __SVTOOLS_POPUPWINDOWCONTROLLER_HXX_ + +#include "svtools/svtdllapi.h" + +#include <com/sun/star/lang/XServiceInfo.hpp> + +#include "svtools/toolboxcontroller.hxx" +#include "boost/scoped_ptr.hpp" + +class Window; + +namespace svt +{ +class PopupWindowControllerImpl; + +class SVT_DLLPUBLIC PopupWindowController : public svt::ToolboxController, public ::com::sun::star::lang::XServiceInfo +{ +public: + PopupWindowController( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rServiceManager, + const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& xFrame, + const rtl::OUString& aCommandURL ); + ~PopupWindowController(); + + virtual ::Window* createPopupWindow( ::Window* pParent ) = 0; + + // XInterface + virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL acquire() throw (); + virtual void SAL_CALL release() throw (); + + // XServiceInfo + virtual ::rtl::OUString SAL_CALL getImplementationName() throw( ::com::sun::star::uno::RuntimeException ) = 0; + virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw( ::com::sun::star::uno::RuntimeException ) = 0; + + // XInitialization + virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException); + + // XComponent + virtual void SAL_CALL dispose() throw (::com::sun::star::uno::RuntimeException); + + // XStatusListener + virtual void SAL_CALL statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw ( ::com::sun::star::uno::RuntimeException ); + + // XToolbarController + virtual void SAL_CALL execute( sal_Int16 KeyModifier ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL click() throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL doubleClick() throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > SAL_CALL createPopupWindow() throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > SAL_CALL createItemWindow( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow >& Parent ) throw (::com::sun::star::uno::RuntimeException); +private: + boost::scoped_ptr< PopupWindowControllerImpl > mpImpl; +}; + +} // namespace svt + +#endif // __SVTOOLS_POPUPWINDOWCONTROLLER_HXX_ diff --git a/svtools/inc/svtools/roadmapwizard.hxx b/svtools/inc/svtools/roadmapwizard.hxx index 49a0f441c49c..5d8e0d9b01bb 100644 --- a/svtools/inc/svtools/roadmapwizard.hxx +++ b/svtools/inc/svtools/roadmapwizard.hxx @@ -80,6 +80,11 @@ namespace svt const ResId& _rRes, sal_uInt32 _nButtonFlags = WZB_NEXT | WZB_PREVIOUS | WZB_FINISH | WZB_CANCEL | WZB_HELP ); + RoadmapWizard( + Window* _pParent, + const WinBits i_nStyle, + sal_uInt32 _nButtonFlags = WZB_NEXT | WZB_PREVIOUS | WZB_FINISH | WZB_CANCEL | WZB_HELP + ); ~RoadmapWizard( ); void SetRoadmapBitmap( const BitmapEx& _rBitmap ); @@ -137,7 +142,7 @@ protected: You can only activate paths which share the first <code>k</code> states with the path which is previously active (if any), where <code>k</code> is the index of the - current state within the current page. + current state within the current path. <example> Say you have paths, <code>(0,1,2,5)</code> and <code>(0,1,4,5)</code>. This means that after @@ -197,6 +202,10 @@ protected: */ void enableState( WizardState _nState, bool _bEnable = true ); + /** returns true if and only if the given state is known in at least one declared path + */ + bool knowsState( WizardState _nState ) const; + // OWizardMachine overriables virtual void enterState( WizardState _nState ); @@ -230,13 +239,15 @@ protected: private: SVT_DLLPRIVATE void ResizeFixedLine(); - private: DECL_DLLPRIVATE_LINK( OnRoadmapItemSelected, void* ); /** updates the roadmap control to show the given path, as far as possible (modulo conflicts with other paths) */ SVT_DLLPRIVATE void implUpdateRoadmap( ); + + private: + SVT_DLLPRIVATE void impl_construct(); }; //........................................................................ diff --git a/svtools/inc/svtools/svtabbx.hxx b/svtools/inc/svtools/svtabbx.hxx index 8b8092260e33..89fd92a4fc09 100644 --- a/svtools/inc/svtools/svtabbx.hxx +++ b/svtools/inc/svtools/svtabbx.hxx @@ -251,7 +251,7 @@ public: virtual BOOL GetGlyphBoundRects( const Point& rOrigin, const String& rStr, int nIndex, int nLen, int nBase, MetricVector& rVector ); // Window - virtual Rectangle GetWindowExtentsRelative( Window *pRelativeWindow ); + virtual Rectangle GetWindowExtentsRelative( Window *pRelativeWindow ) const; virtual void GrabFocus(); virtual XACC GetAccessible( BOOL bCreate = TRUE ); virtual Window* GetAccessibleParentWindow() const; diff --git a/svtools/inc/svtools/svtools.hrc b/svtools/inc/svtools/svtools.hrc new file mode 100644 index 000000000000..a57a0f5bb0fe --- /dev/null +++ b/svtools/inc/svtools/svtools.hrc @@ -0,0 +1,400 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: svtools.hrc,v $ + * $Revision: 1.7 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVTOOLS_HRC +#define _SVTOOLS_HRC "$Revision: 1.0" + +#include <svl/solar.hrc> + +#define RID_SVTOOLS_BITMAP_START (RID_SVTOOLS_START + 0) +#define RID_SVTOOLS_IMAGELIST_START (RID_SVTOOLS_START + 0) + +//............................................................................. +// various unsorted stuff + +#define DLG_EXPORT_PIX (RID_SVTOOLS_START+1) +#define DLG_EXPORT_VEC (RID_SVTOOLS_START+2) +#define DLG_TWAIN_SOURCE (RID_SVTOOLS_START+3) + +#define DLG_SVT_EXPLORERFILE (RID_SVTOOLS_START+4) +#define DLG_SVT_QUERYFOLDERNAME (RID_SVTOOLS_START+5) +#define DLG_SVT_QUERYDELETE (RID_SVTOOLS_START+6) + +#define EXPORT_DIALOG_TITLE (RID_SVTOOLS_START+4) +#define KEY_MODE (RID_SVTOOLS_START+5) +#define KEY_RES (RID_SVTOOLS_START+6) +#define KEY_SIZE (RID_SVTOOLS_START+7) + +#define KEY_COLORS (RID_SVTOOLS_START+9) +#define KEY_RLE_CODING (RID_SVTOOLS_START+10) + +#define STR_SVT_AUTOMATIC_COLOR (RID_SVTOOLS_START+16) + +#define STR_SVT_FILEVIEW_COLUMN_TITLE (RID_SVTOOLS_START + 20) +#define STR_SVT_FILEVIEW_COLUMN_SIZE (RID_SVTOOLS_START + 21) +#define STR_SVT_FILEVIEW_COLUMN_DATE (RID_SVTOOLS_START + 22) +#define STR_SVT_FOLDER (RID_SVTOOLS_START + 23) +#define STR_SVT_FILEVIEW_ERR_MAKEFOLDER (RID_SVTOOLS_START + 24) +#define STR_SVT_BYTES (RID_SVTOOLS_START + 25) +#define STR_SVT_KB (RID_SVTOOLS_START + 26) +#define STR_SVT_MB (RID_SVTOOLS_START + 27) +#define STR_SVT_GB (RID_SVTOOLS_START + 28) +#define STR_FILTERNAME_ALL (RID_SVTOOLS_START + 29) +#define STR_SVT_NEW_FOLDER (RID_SVTOOLS_START + 30) +#define STR_SVT_ALREADYEXISTOVERWRITE (RID_SVTOOLS_START + 31) +#define STR_SVT_FILEVIEW_COLUMN_TYPE (RID_SVTOOLS_START + 32) +#define RID_FILEVIEW_CONTEXTMENU (RID_SVTOOLS_START + 33) +#define RID_FILEOPEN_INVALIDFOLDER (RID_SVTOOLS_START + 34) +#define RID_FILEOPEN_NOTEXISTENTFILE (RID_SVTOOLS_START + 35) +#define STR_SVT_NOREMOVABLEDEVICE (RID_SVTOOLS_START + 36) + +// doc template dialog +#define DLG_DOCTEMPLATE (RID_SVTOOLS_START+50) +#define CTRL_FILEVIEW (RID_SVTOOLS_START+51) +#define STR_SVT_NEWDOC (RID_SVTOOLS_START+52) +#define STR_SVT_MYDOCS (RID_SVTOOLS_START+53) +#define STR_SVT_TEMPLATES (RID_SVTOOLS_START+54) +#define STR_SVT_SAMPLES (RID_SVTOOLS_START+55) +#define TB_SVT_FILEVIEW (RID_SVTOOLS_START+56) +#define TB_SVT_FRAMEWIN (RID_SVTOOLS_START+57) +#define STRARY_SVT_DOCINFO (RID_SVTOOLS_START+58) +#define STR_SVT_NEWDOC_HELP (RID_SVTOOLS_START+63) +#define STR_SVT_MYDOCS_HELP (RID_SVTOOLS_START+64) +#define STR_SVT_TEMPLATES_HELP (RID_SVTOOLS_START+65) +#define STR_SVT_SAMPLES_HELP (RID_SVTOOLS_START+66) + +#define STR_WARNING_ITEM (RID_SVTOOLS_START+90) + +#define CONFIG_BASIC_FORMAT_START (RID_SVTOOLS_START+102) +#define STR_BASICKEY_FORMAT_ON (RID_SVTOOLS_START+103) +#define STR_BASICKEY_FORMAT_OFF (RID_SVTOOLS_START+104) +#define STR_BASICKEY_FORMAT_YES (RID_SVTOOLS_START+105) +#define STR_BASICKEY_FORMAT_NO (RID_SVTOOLS_START+106) +#define STR_BASICKEY_FORMAT_TRUE (RID_SVTOOLS_START+107) +#define STR_BASICKEY_FORMAT_FALSE (RID_SVTOOLS_START+108) +#define CONFIG_BASIC_FORMAT_END (RID_SVTOOLS_START+109) + +#define STR_INVALIDTRYBUY (RID_SVTOOLS_START+120) +#define STR_OLDTRYBUY (RID_SVTOOLS_START+121) +#define STR_TRYBUY (RID_SVTOOLS_START+122) +#define STR_PVER_LANGUAGECODE (RID_SVTOOLS_START+124) +#define STR_PVER_LONG_LANGUAGECODE (RID_SVTOOLS_START+125) +#define STR_INVALIDPUFF (RID_SVTOOLS_START+126) +#define STR_LIMITEDPUFF (RID_SVTOOLS_START+127) +#define STR_OLDLIMITEDPUFF (RID_SVTOOLS_START+128) +#define RID_REGISTER_DIALOG (RID_SVTOOLS_START+129) +#define STR_BASICKEY_FORMAT_CURRENCY (RID_SVTOOLS_START+130) +#define STR_KEYERR_GENERAL_HELP (RID_SVTOOLS_START+131) +#define STR_KEYERR_INVALID_KEY (RID_SVTOOLS_START+132) +#define STR_KEYERR_INVALID_USERDATA (RID_SVTOOLS_START+133) +#define STR_KEYERR_INVALID_ADDRESSDATA (RID_SVTOOLS_START+134) +#define STR_KEYERR_INVALID_LICENSE (RID_SVTOOLS_START+135) +#define STR_KEYERR_INVALID_LANGUAGE (RID_SVTOOLS_START+136) +#define STR_KEYERR_INVALID_OS (RID_SVTOOLS_START+137) +#define STR_KEYERR_INVALID_NO_CNR (RID_SVTOOLS_START+138) +#define STR_KEYERR_INVALID_CNR (RID_SVTOOLS_START+139) +#define RID_LIMITED_DIALOG (RID_SVTOOLS_START+140) + +#define STR_SVT_PRNDLG_START (RID_SVTOOLS_START+141) +#define DLG_SVT_PRNDLG_PRNSETUPDLG (STR_SVT_PRNDLG_START+0) +#define DLG_SVT_PRNDLG_PRINTDLG (STR_SVT_PRNDLG_START+1) +#define STR_SVT_PRNDLG_READY (STR_SVT_PRNDLG_START+2) +#define STR_SVT_PRNDLG_PAUSED (STR_SVT_PRNDLG_START+3) +#define STR_SVT_PRNDLG_PENDING (STR_SVT_PRNDLG_START+4) +#define STR_SVT_PRNDLG_BUSY (STR_SVT_PRNDLG_START+5) +#define STR_SVT_PRNDLG_INITIALIZING (STR_SVT_PRNDLG_START+6) +#define STR_SVT_PRNDLG_WAITING (STR_SVT_PRNDLG_START+7) +#define STR_SVT_PRNDLG_WARMING_UP (STR_SVT_PRNDLG_START+8) +#define STR_SVT_PRNDLG_PROCESSING (STR_SVT_PRNDLG_START+9) +#define STR_SVT_PRNDLG_PRINTING (STR_SVT_PRNDLG_START+10) +#define STR_SVT_PRNDLG_OFFLINE (STR_SVT_PRNDLG_START+11) +#define STR_SVT_PRNDLG_ERROR (STR_SVT_PRNDLG_START+12) +#define STR_SVT_PRNDLG_SERVER_UNKNOWN (STR_SVT_PRNDLG_START+13) +#define STR_SVT_PRNDLG_PAPER_JAM (STR_SVT_PRNDLG_START+14) +#define STR_SVT_PRNDLG_PAPER_OUT (STR_SVT_PRNDLG_START+15) +#define STR_SVT_PRNDLG_MANUAL_FEED (STR_SVT_PRNDLG_START+16) +#define STR_SVT_PRNDLG_PAPER_PROBLEM (STR_SVT_PRNDLG_START+17) +#define STR_SVT_PRNDLG_IO_ACTIVE (STR_SVT_PRNDLG_START+18) +#define STR_SVT_PRNDLG_OUTPUT_BIN_FULL (STR_SVT_PRNDLG_START+19) +#define STR_SVT_PRNDLG_TONER_LOW (STR_SVT_PRNDLG_START+20) +#define STR_SVT_PRNDLG_NO_TONER (STR_SVT_PRNDLG_START+21) +#define STR_SVT_PRNDLG_PAGE_PUNT (STR_SVT_PRNDLG_START+22) +#define STR_SVT_PRNDLG_USER_INTERVENTION (STR_SVT_PRNDLG_START+23) +#define STR_SVT_PRNDLG_OUT_OF_MEMORY (STR_SVT_PRNDLG_START+24) +#define STR_SVT_PRNDLG_DOOR_OPEN (STR_SVT_PRNDLG_START+25) +#define STR_SVT_PRNDLG_POWER_SAVE (STR_SVT_PRNDLG_START+26) +#define STR_SVT_PRNDLG_DEFPRINTER (STR_SVT_PRNDLG_START+27) +#define STR_SVT_PRNDLG_JOBCOUNT (STR_SVT_PRNDLG_START+28) +#define STR_SVT_PRNDLG_END (RID_IMG_PRNDLG_NOCOLLATE_HC) + +#define STR_SVT_CALENDAR_START (STR_SVT_PRNDLG_END+1) +#define STR_SVT_CALENDAR_DAY (STR_SVT_CALENDAR_START+0) +#define STR_SVT_CALENDAR_WEEK (STR_SVT_CALENDAR_START+1) +#define STR_SVT_CALENDAR_TODAY (STR_SVT_CALENDAR_START+2) +#define STR_SVT_CALENDAR_NONE (STR_SVT_CALENDAR_START+3) +#define STR_SVT_CALENDAR_END (STR_SVT_CALENDAR_NONE) + +#define STR_SVT_PVER_START (STR_SVT_CALENDAR_END+1) +#define STR_SVT_PVER_INTERNAL (STR_SVT_PVER_START+0) +#define STR_SVT_PVER_PERSONAL_DELUXE (STR_SVT_PVER_START+1) +#define STR_SVT_PVER_PERSONAL (STR_SVT_PVER_START+2) +#define STR_SVT_PVER_PROFESSIONAL (STR_SVT_PVER_START+3) +#define STR_SVT_PVER_BUSINESS (STR_SVT_PVER_START+4) +#define STR_SVT_PVER_ENTERPRICE (STR_SVT_PVER_START+5) +#define STR_SVT_PVER_EDUCATION (STR_SVT_PVER_START+6) +#define STR_SVT_PVER_DEMO (STR_SVT_PVER_START+7) +#define STR_SVT_PVER_BETA (STR_SVT_PVER_START+8) +#define STR_SVT_PVER_OEM (STR_SVT_PVER_START+9) +#define STR_SVT_PVER_NOT_REGISTERED (STR_SVT_PVER_START+10) +#define STR_SVT_PVER_PILOT (STR_SVT_PVER_START+11) +#define STR_SVT_PVER_CAMPUS (STR_SVT_PVER_START+12) +#define STR_SVT_PVER_EVALUATION (STR_SVT_PVER_START+13) +#define STR_SVT_PVER_PARTNER (STR_SVT_PVER_START+14) +#define STR_SVT_PVER_SMALLBUSINESS (STR_SVT_PVER_START+15) +#define STR_SVT_PVER_OEM_PROFESSIONAL (STR_SVT_PVER_START+16) +#define STR_SVT_PVER_END (STR_SVT_PVER_OEM_PROFESSIONAL) + +#define STR_SVT_STYLE_START (STR_SVT_PVER_END+1) +#define STR_SVT_STYLE_LIGHT (STR_SVT_STYLE_START+0) +#define STR_SVT_STYLE_LIGHT_ITALIC (STR_SVT_STYLE_START+1) +#define STR_SVT_STYLE_NORMAL (STR_SVT_STYLE_START+2) +#define STR_SVT_STYLE_NORMAL_ITALIC (STR_SVT_STYLE_START+3) +#define STR_SVT_STYLE_BOLD (STR_SVT_STYLE_START+4) +#define STR_SVT_STYLE_BOLD_ITALIC (STR_SVT_STYLE_START+5) +#define STR_SVT_STYLE_BLACK (STR_SVT_STYLE_START+6) +#define STR_SVT_STYLE_BLACK_ITALIC (STR_SVT_STYLE_START+7) +#define STR_SVT_STYLE_END (STR_SVT_STYLE_BLACK_ITALIC) + +#define STR_SVT_FONTMAP_START (STR_SVT_STYLE_END+1) +#define STR_SVT_FONTMAP_BOTH (STR_SVT_FONTMAP_START+0) +#define STR_SVT_FONTMAP_PRINTERONLY (STR_SVT_FONTMAP_START+1) +#define STR_SVT_FONTMAP_SCREENONLY (STR_SVT_FONTMAP_START+2) +#define STR_SVT_FONTMAP_SIZENOTAVAILABLE (STR_SVT_FONTMAP_START+3) +#define STR_SVT_FONTMAP_STYLENOTAVAILABLE (STR_SVT_FONTMAP_START+4) +#define STR_SVT_FONTMAP_NOTAVAILABLE (STR_SVT_FONTMAP_START+5) +#define STR_SVT_FONTMAP_END (STR_SVT_FONTMAP_NOTAVAILABLE) + +#define STR_SVT_ERRORCONTEXT_START (STR_SVT_FONTMAP_END+1) +#define STR_ERR_HDLMESS (STR_SVT_ERRORCONTEXT_START+0) +#define RID_ERRHDL_CLASS (STR_SVT_ERRORCONTEXT_START+1) +#define RID_ERRCTX (STR_SVT_ERRORCONTEXT_START+2) +#define RID_ERRHDL (STR_SVT_ERRORCONTEXT_START+3) +#define STR_SVT_ERRORCONTEXT_END (RID_ERRHDL) + +#define STR_WIZARDDIALOG_START (STR_SVT_ERRORCONTEXT_END + 1) +#define STR_WIZDLG_FINISH (STR_WIZARDDIALOG_START + 0) +#define STR_WIZDLG_NEXT (STR_WIZARDDIALOG_START + 1) +#define STR_WIZDLG_PREVIOUS (STR_WIZARDDIALOG_START + 2) +#define STR_WIZDLG_ROADMAP_TITLE (STR_WIZARDDIALOG_START + 3) +#define STR_WIZARDDIALOG_END (STR_WIZDLG_ROADMAP_TITLE) + +#define STR_SVT_COLLATE_START (STR_WIZARDDIALOG_END+1) +#define STR_SVT_COLLATE_NORMAL (STR_SVT_COLLATE_START+0) +#define STR_SVT_COLLATE_DICTIONARY (STR_SVT_COLLATE_START+1) +#define STR_SVT_COLLATE_PINYIN (STR_SVT_COLLATE_START+2) +#define STR_SVT_COLLATE_STROKE (STR_SVT_COLLATE_START+3) +#define STR_SVT_COLLATE_RADICAL (STR_SVT_COLLATE_START+4) +#define STR_SVT_COLLATE_CHARSET (STR_SVT_COLLATE_START+5) +#define STR_SVT_COLLATE_ZHUYIN (STR_SVT_COLLATE_START+6) +#define STR_SVT_COLLATE_ALPHANUMERIC (STR_SVT_COLLATE_START+7) +#define STR_SVT_COLLATE_UNICODE (STR_SVT_COLLATE_START+8) +#define STR_SVT_COLLATE_PHONEBOOK (STR_SVT_COLLATE_START+9) +#define STR_SVT_COLLATE_PHONETIC_F (STR_SVT_COLLATE_START+10) +#define STR_SVT_COLLATE_PHONETIC_L (STR_SVT_COLLATE_START+11) +#define STR_SVT_COLLATE_END (STR_SVT_COLLATE_PHONETIC_L) + +#define STR_SVT_FILEPICKER_START (STR_SVT_COLLATE_END+1) +#define STR_SVT_FILEPICKER_AUTO_EXTENSION (STR_SVT_FILEPICKER_START+ 0) +#define STR_SVT_FILEPICKER_PASSWORD (STR_SVT_FILEPICKER_START+ 1) +#define STR_SVT_FILEPICKER_FILTER_OPTIONS (STR_SVT_FILEPICKER_START+ 2) +#define STR_SVT_FILEPICKER_READONLY (STR_SVT_FILEPICKER_START+ 3) +#define STR_SVT_FILEPICKER_INSERT_AS_LINK (STR_SVT_FILEPICKER_START+ 4) +#define STR_SVT_FILEPICKER_SHOW_PREVIEW (STR_SVT_FILEPICKER_START+ 5) +#define STR_SVT_FILEPICKER_PLAY (STR_SVT_FILEPICKER_START+ 6) +#define STR_SVT_FILEPICKER_VERSION (STR_SVT_FILEPICKER_START+ 7) +#define STR_SVT_FILEPICKER_TEMPLATES (STR_SVT_FILEPICKER_START+ 8) +#define STR_SVT_FILEPICKER_IMAGE_TEMPLATE (STR_SVT_FILEPICKER_START+ 9) +#define STR_SVT_FILEPICKER_SELECTION (STR_SVT_FILEPICKER_START+10) +#define STR_SVT_FILEPICKER_FILTER_TITLE (STR_SVT_FILEPICKER_START+11) +#define STR_SVT_FOLDERPICKER_DEFAULT_TITLE (STR_SVT_FILEPICKER_START+12) +#define STR_SVT_FOLDERPICKER_DEFAULT_DESCRIPTION (STR_SVT_FILEPICKER_START+13) +#define STR_SVT_FILEPICKER_END (STR_SVT_FOLDERPICKER_DEFAULT_DESCRIPTION) + +// String-Ids for accessibility +#define STR_SVT_ACC_BEGIN (STR_SVT_FILEPICKER_END+1) +#define STR_SVT_TOOL_PANEL_BUTTON_FWD (STR_SVT_ACC_BEGIN+0) +#define STR_SVT_TOOL_PANEL_BUTTON_BACK (STR_SVT_ACC_BEGIN+1) +#define STR_SVT_ACC_DESC_TABLISTBOX (STR_SVT_ACC_BEGIN+2) +#define STR_SVT_ACC_DESC_FILEVIEW (STR_SVT_ACC_BEGIN+3) +#define STR_SVT_ACC_DESC_FOLDER (STR_SVT_ACC_BEGIN+4) +#define STR_SVT_ACC_DESC_FILE (STR_SVT_ACC_BEGIN+5) +#define STR_SVT_ACC_EMPTY_FIELD (STR_SVT_ACC_BEGIN+6) +#define STR_SVT_ACC_END (STR_SVT_ACC_EMPTY_FIELD) + +#define STR_SVT_INDEXENTRY_START (STR_SVT_ACC_END + 1) +#define STR_SVT_INDEXENTRY_ALPHANUMERIC (STR_SVT_INDEXENTRY_START+0) +#define STR_SVT_INDEXENTRY_DICTIONARY (STR_SVT_INDEXENTRY_START+1) +#define STR_SVT_INDEXENTRY_PINYIN (STR_SVT_INDEXENTRY_START+2) +#define STR_SVT_INDEXENTRY_RADICAL (STR_SVT_INDEXENTRY_START+3) +#define STR_SVT_INDEXENTRY_STROKE (STR_SVT_INDEXENTRY_START+4) +#define STR_SVT_INDEXENTRY_ZHUYIN (STR_SVT_INDEXENTRY_START+5) +#define STR_SVT_INDEXENTRY_PHONETIC_FS (STR_SVT_INDEXENTRY_START+6) +#define STR_SVT_INDEXENTRY_PHONETIC_FC (STR_SVT_INDEXENTRY_START+7) +#define STR_SVT_INDEXENTRY_PHONETIC_LS (STR_SVT_INDEXENTRY_START+8) +#define STR_SVT_INDEXENTRY_PHONETIC_LC (STR_SVT_INDEXENTRY_START+9) +#define STR_SVT_INDEXENTRY_END (STR_SVT_INDEXENTRY_PHONETIC_LC) + +//String - Ids for Java errors, messages +//These strings come from project desktop +//There was no time for translation, therefore the defines needed to +//remain the same. +#define STR_SVT_JAVAERROR_START (STR_SVT_INDEXENTRY_END + 1) +#define STR_QUESTION_JAVADISABLED (STR_SVT_JAVAERROR_START+0) +#define STR_ERROR_JVMCREATIONFAILED (STR_SVT_JAVAERROR_START+1) +#define STR_WARNING_JAVANOTFOUND (STR_SVT_JAVAERROR_START+2) +#define STR_WARNING_INVALIDJAVASETTINGS (STR_SVT_JAVAERROR_START+3) +#define STR_ERROR_RESTARTREQUIRED (STR_SVT_JAVAERROR_START+4) +#define STR_SVT_JAVAERROR_END (STR_ERROR_RESTARTREQUIRED) + +// String array to match UI language names to LanguageType values and vice versa +#define STR_ARR_SVT_LANGUAGE_TABLE_START (STR_SVT_JAVAERROR_END + 1) +#define STR_ARR_SVT_LANGUAGE_TABLE (STR_ARR_SVT_LANGUAGE_TABLE_START + 0) +#define STR_ARR_SVT_LANGUAGE_TABLE_END (STR_ARR_SVT_LANGUAGE_TABLE) + +//............................................................................. +// dialogs + +#define DLG_EXPORT_JPG_START (RID_SVTOOLS_START+110) +#define DLG_EXPORT_JPG (RID_SVTOOLS_START+111) +#define DLG_EXPORT_JPG_END (RID_SVTOOLS_START+112) + +#define DLG_LOGIN (RID_SVTOOLS_START+113) +#define DLG_ADDRESSBOOKSOURCE (RID_SVTOOLS_START+114) + +#define DLG_REGISTRATION_REQUEST (RID_SVTOOLS_START+115) + +#define DLG_EXPORT_EPNG (RID_SVTOOLS_START+116) +//............................................................................. +// bitmaps + +#define BMP_DEMO_FINGER (RID_SVTOOLS_BITMAP_START + 0) +#define BMP_HELP_AGENT_IMAGE (RID_SVTOOLS_BITMAP_START + 1) +#define BMP_HELP_AGENT_CLOSER (RID_SVTOOLS_BITMAP_START + 2) +#define BMP_PLUGIN (RID_SVTOOLS_BITMAP_START + 3) + +//............................................................................. +// image lists + +#define RID_IMG_EXPANDER (RID_SVTOOLS_IMAGELIST_START + 0) +#define RID_SVTOOLS_IMAGELIST_BIG (RID_SVTOOLS_IMAGELIST_START + 1) +#define RID_SVTOOLS_IMAGELIST_SMALL (RID_SVTOOLS_IMAGELIST_START + 2) +#define RID_SVTOOLS_IMAGELIST_EDITBROWSEBOX (RID_SVTOOLS_IMAGELIST_START + 3) +#define RID_SVTOOLS_IMAGELIST_BIG_HIGHCONTRAST (RID_SVTOOLS_IMAGELIST_START + 4) +#define RID_SVTOOLS_IMAGELIST_SMALL_HIGHCONTRAST (RID_SVTOOLS_IMAGELIST_START + 5) +#define RID_SVTOOLS_IMAGELIST_EDITBWSEBOX_H (RID_SVTOOLS_IMAGELIST_START + 6) +#define RID_FILEPICKER_IMAGES (RID_SVTOOLS_IMAGELIST_START + 7) +#define RID_FILEPICKER_IMAGES_HC (RID_SVTOOLS_IMAGELIST_START + 8) + +//............................................................................. +// error boxes +#define ERRBOX_REG_NOSYSBROWSER ( RID_SVTOOLS_START + 0 ) +#define ERRBOX_CHECK_PLZ ( RID_SVTOOLS_START + 11 ) + +// Java message boxes +//These strings come from project desktop +//There was no time for translation, therefore the defines needed to +//remain the same. +#define QBX_JAVADISABLED (RID_SVTOOLS_START+20) +#define ERRORBOX_JVMCREATIONFAILED (RID_SVTOOLS_START+21) +#define WARNINGBOX_JAVANOTFOUND (RID_SVTOOLS_START+22) +#define WARNINGBOX_INVALIDJAVASETTINGS (RID_SVTOOLS_START+23) +#define ERRORBOX_RESTARTREQUIRED (RID_SVTOOLS_START+24) + +//............................................................................. +// images +#define RID_IMG_TREENODE_COLLAPSED (RID_SVTOOLS_START + 0) +#define RID_IMG_TREENODE_EXPANDED (RID_SVTOOLS_START + 1) +#define RID_IMG_TREENODE_COLLAPSED_HC (RID_SVTOOLS_START + 2) +#define RID_IMG_TREENODE_EXPANDED_HC (RID_SVTOOLS_START + 3) + +#define RID_IMG_PRINTERFONT (RID_SVTOOLS_START + 12) +#define RID_IMG_BITMAPFONT (RID_SVTOOLS_START + 13) +#define RID_IMG_SCALABLEFONT (RID_SVTOOLS_START + 14) +#define RID_IMG_PRINTERFONT_HC (RID_SVTOOLS_START + 15) +#define RID_IMG_BITMAPFONT_HC (RID_SVTOOLS_START + 16) +#define RID_IMG_SCALABLEFONT_HC (RID_SVTOOLS_START + 17) + +#define IMG_TRIANGLE_RIGHT (RID_SVTOOLS_START + 18) +#define IMG_TRIANGLE_RIGHT_HC (RID_SVTOOLS_START + 19) +#define IMG_TRIANGLE_DOWN (RID_SVTOOLS_START + 20) +#define IMG_TRIANGLE_DOWN_HC (RID_SVTOOLS_START + 21) + +#define IMG_SVT_FOLDER (RID_SVTOOLS_START + 40) + +#define IMG_SVT_NEWDOC (RID_SVTOOLS_START + 52) +#define IMG_SVT_MYDOCS (RID_SVTOOLS_START + 53) +#define IMG_SVT_TEMPLATES (RID_SVTOOLS_START + 54) +#define IMG_SVT_SAMPLES (RID_SVTOOLS_START + 55) + +#define IMG_SVT_NEWDOC_HC (RID_SVTOOLS_START + 59) +#define IMG_SVT_MYDOCS_HC (RID_SVTOOLS_START + 60) +#define IMG_SVT_TEMPLATES_HC (RID_SVTOOLS_START + 61) +#define IMG_SVT_SAMPLES_HC (RID_SVTOOLS_START + 62) + +#define IMG_SVT_DOCTEMPLATE_BACK_SMALL (RID_SVTOOLS_START + 70) +#define IMG_SVT_DOCTEMPLATE_BACK_LARGE (RID_SVTOOLS_START + 71) +#define IMG_SVT_DOCTEMPLATE_PREV_SMALL (RID_SVTOOLS_START + 72) +#define IMG_SVT_DOCTEMPLATE_PREV_LARGE (RID_SVTOOLS_START + 73) +#define IMG_SVT_DOCTEMPLATE_PRINT_SMALL (RID_SVTOOLS_START + 74) +#define IMG_SVT_DOCTEMPLATE_PRINT_LARGE (RID_SVTOOLS_START + 75) +#define IMG_SVT_DOCTEMPLATE_DOCINFO_SMALL (RID_SVTOOLS_START + 76) +#define IMG_SVT_DOCTEMPLATE_DOCINFO_LARGE (RID_SVTOOLS_START + 77) +#define IMG_SVT_DOCTEMPLATE_PREVIEW_SMALL (RID_SVTOOLS_START + 78) +#define IMG_SVT_DOCTEMPLATE_PREVIEW_LARGE (RID_SVTOOLS_START + 79) + +#define IMG_SVT_DOCTEMPL_HC_BACK_SMALL (RID_SVTOOLS_START + 80) +#define IMG_SVT_DOCTEMPL_HC_BACK_LARGE (RID_SVTOOLS_START + 81) +#define IMG_SVT_DOCTEMPL_HC_PREV_SMALL (RID_SVTOOLS_START + 82) +#define IMG_SVT_DOCTEMPL_HC_PREV_LARGE (RID_SVTOOLS_START + 83) +#define IMG_SVT_DOCTEMPL_HC_PRINT_SMALL (RID_SVTOOLS_START + 84) +#define IMG_SVT_DOCTEMPL_HC_PRINT_LARGE (RID_SVTOOLS_START + 85) +#define IMG_SVT_DOCTEMPL_HC_DOCINFO_SMALL (RID_SVTOOLS_START + 86) +#define IMG_SVT_DOCTEMPL_HC_DOCINFO_LARGE (RID_SVTOOLS_START + 87) +#define IMG_SVT_DOCTEMPL_HC_PREVIEW_SMALL (RID_SVTOOLS_START + 88) +#define IMG_SVT_DOCTEMPL_HC_PREVIEW_LARGE (RID_SVTOOLS_START + 89) + +#define RID_IMG_PRNDLG_COLLATE (STR_SVT_PRNDLG_START + 29) +#define RID_IMG_PRNDLG_NOCOLLATE (STR_SVT_PRNDLG_START + 30) +#define RID_IMG_PRNDLG_COLLATE_HC (STR_SVT_PRNDLG_START + 31) +#define RID_IMG_PRNDLG_NOCOLLATE_HC (STR_SVT_PRNDLG_START + 32) + +#endif // #ifndef _SVTOOLS_HRC + +// ******************************************************************* EOF + diff --git a/svtools/inc/svtools/table/tablecontrol.hxx b/svtools/inc/svtools/table/tablecontrol.hxx index 313b2b7b7735..6eb7f063f9fa 100644 --- a/svtools/inc/svtools/table/tablecontrol.hxx +++ b/svtools/inc/svtools/table/tablecontrol.hxx @@ -177,7 +177,7 @@ namespace svt { namespace table virtual void GetFocus(); virtual void LoseFocus(); virtual void KeyInput( const KeyEvent& rKEvt ); - //virtual long Notify(NotifyEvent& rNEvt); + virtual void StateChanged( StateChangedType i_nStateChange ); /** Creates and returns the accessible object of the whole GridControl. */ SVT_DLLPRIVATE virtual XACC CreateAccessible(); @@ -189,7 +189,7 @@ namespace svt { namespace table ::utl::AccessibleStateSetHelper& rStateSet, AccessibleTableControlObjType eObjType ) const; //// Window - virtual Rectangle GetWindowExtentsRelative( Window *pRelativeWindow ); + virtual Rectangle GetWindowExtentsRelative( Window *pRelativeWindow ) const; virtual void GrabFocus(); virtual XACC GetAccessible( BOOL bCreate = TRUE ); virtual Window* GetAccessibleParentWindow() const; @@ -221,9 +221,9 @@ namespace svt { namespace table ::com::sun::star::uno::Sequence< sal_Int32 >& getColumnsForTooltip(); ::com::sun::star::uno::Sequence< ::rtl::OUString >& getTextForTooltip(); void setTooltip(const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aText, const ::com::sun::star::uno::Sequence< sal_Int32 >& nCols); + void clearSelection(); void selectionChanged(bool _bChanged); - protected: /// retrieves the XAccessible implementation associated with the GridControl instance ::svt::IAccessibleFactory& getAccessibleFactory(); diff --git a/svtools/inc/svtools/toolbarmenu.hxx b/svtools/inc/svtools/toolbarmenu.hxx new file mode 100644 index 000000000000..92b873158a98 --- /dev/null +++ b/svtools/inc/svtools/toolbarmenu.hxx @@ -0,0 +1,155 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVTOOLS_TOOLBARMENU_HXX_ +#define _SVTOOLS_TOOLBARMENU_HXX_ + +#include "svtools/svtdllapi.h" + +#include <com/sun/star/frame/FeatureStateEvent.hpp> +#include <com/sun/star/lang/XMultiServiceFactory.hpp> +#include <com/sun/star/frame/XFrame.hpp> + +#include <vector> + +#include <rtl/ref.hxx> + +#include <vcl/ctrl.hxx> +#include <vcl/menu.hxx> +#include <vcl/dockwin.hxx> + +class ValueSet; + +namespace svtools { + +class ToolbarMenuEntry; +struct ToolbarMenu_Impl; + +class SVT_DLLPUBLIC ToolbarMenu : public DockingWindow +{ + friend class ToolbarMenuStatusListener; + friend struct ToolbarMenu_Impl; +public: + ToolbarMenu( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, + Window* pParentWindow, + WinBits nBits ); + + ToolbarMenu( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, + Window* pParentWindow, + const ResId& rResId ); + + ~ToolbarMenu(); + + virtual void MouseMove( const MouseEvent& rMEvt ); + virtual void MouseButtonDown( const MouseEvent& rMEvt ); + virtual void MouseButtonUp( const MouseEvent& rMEvt ); + virtual void KeyInput( const KeyEvent& rKEvent ); + virtual void Command( const CommandEvent& rCEvt ); + virtual void Paint( const Rectangle& rRect ); + virtual void RequestHelp( const HelpEvent& rHEvt ); + virtual void GetFocus(); + virtual void LoseFocus(); + + void appendEntry( int nEntryId, const String& rStr, MenuItemBits nItemBits = 0 ); + void appendEntry( int nEntryId, const Image& rImage, MenuItemBits nItemBits = 0 ); + void appendEntry( int nEntryId, const String& rStr, const Image& rImage, MenuItemBits nItemBits = 0 ); + void appendEntry( int nEntryId, Control* pControl, MenuItemBits nItemBits = 0 ); + void appendSeparator(); + + /** creates an empty ValueSet that is initialized and can be inserted with appendEntry. */ + ValueSet* createEmptyValueSetControl(); + + void checkEntry( int nEntryId, bool bCheck = true ); + bool isEntryChecked( int nEntryId ) const; + + void enableEntry( int nEntryId, bool bEnable = true ); + bool isEntryEnabled( int nEntryId ) const; + + void setEntryText( int nEntryId, const String& rStr ); + const String& getEntryText( int nEntryId ) const; + + void setEntryImage( int nEntryId, const Image& rImage ); + const Image& getEntryImage( int nEntryId ) const; + + const Size& getMenuSize() const; + + void SetSelectHdl( const Link& rLink ); + const Link& GetSelectHdl() const; + + int getSelectedEntryId() const; + int getHighlightedEntryId() const; + + void highlightFirstEntry(); + +protected: + virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible(); + + // todo: move to new base class that will replace SfxPopupWindow + void AddStatusListener( const rtl::OUString& rCommandURL ); + void RemoveStatusListener( const rtl::OUString& rCommandURL ); + void UpdateStatus( const rtl::OUString& rCommandURL ); + + bool IsInPopupMode(); + void EndPopupMode(); + + // XStatusListener (subclasses must override this one to get the status updates + virtual void SAL_CALL statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw ( ::com::sun::star::uno::RuntimeException ); + + void StateChanged( StateChangedType nType ); + void DataChanged( const DataChangedEvent& rDCEvt ); + + ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > GetFrame() const; +private: + DECL_LINK( HighlightHdl, Control * ); + + void initStatusListener(); + + void implInit( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame ); + void initWindow(); + + Size implCalcSize(); + + void appendEntry( ToolbarMenuEntry* pEntry ); + + void implPaint( ToolbarMenuEntry* pThisOnly = NULL, bool bHighlight = false ); + + void implHighlightEntry( int nHighlightEntry, bool bHighlight ); + void implHighlightEntry( const MouseEvent& rMEvt, bool bMBDown ); + + void implChangeHighlightEntry( int nEntry ); + void implSelectEntry( int nSelectedEntry ); + + ToolbarMenuEntry* implCursorUpDown( bool bUp, bool bHomeEnd ); + ToolbarMenuEntry* implGetEntry( int nEntry ) const; + ToolbarMenuEntry* implSearchEntry( int nEntryId ) const; + + ToolbarMenu_Impl* mpImpl; +}; + +} // namespace svtools + +#endif diff --git a/svtools/inc/svtools/toolboxcontroller.hxx b/svtools/inc/svtools/toolboxcontroller.hxx index 27ed315a3c04..7a49b294759c 100644 --- a/svtools/inc/svtools/toolboxcontroller.hxx +++ b/svtools/inc/svtools/toolboxcontroller.hxx @@ -42,12 +42,20 @@ #include <cppuhelper/interfacecontainer.hxx> #include <comphelper/broadcasthelper.hxx> #include <com/sun/star/util/XURLTransformer.hpp> - +//shizhoubo for ToolbarController Visiable +#include <comphelper/proparrhlp.hxx> +#include <comphelper/property.hxx> +#include <comphelper/propertycontainer.hxx> +#include <cppuhelper/propshlp.hxx> +#include <cppuhelper/interfacecontainer.hxx> +//end #ifndef INCLUDED_HASH_MAP #include <hash_map> #define INCLUDED_HASH_MAP #endif +class ToolBox; + namespace svt { struct ToolboxController_Impl; @@ -57,9 +65,13 @@ class SVT_DLLPUBLIC ToolboxController : public ::com::sun::star::frame::XStatusL public ::com::sun::star::lang::XInitialization, public ::com::sun::star::util::XUpdatable, public ::com::sun::star::lang::XComponent, - public ::comphelper::OBaseMutex, + public ::comphelper::OMutexAndBroadcastHelper,//shizhoubo + public ::comphelper::OPropertyContainer,//shizhoubo + public ::comphelper::OPropertyArrayUsageHelper< ToolboxController >,//shizhoubo public ::cppu::OWeakObject { + private: + sal_Bool m_bSupportVisiable; //shizhoubo public: ToolboxController( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rServiceManager, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& xFrame, @@ -91,6 +103,7 @@ class SVT_DLLPUBLIC ToolboxController : public ::com::sun::star::frame::XStatusL virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) throw (::com::sun::star::uno::RuntimeException); // XEventListener + using cppu::OPropertySetHelper::disposing; virtual void SAL_CALL disposing( const com::sun::star::lang::EventObject& Source ) throw ( ::com::sun::star::uno::RuntimeException ); // XStatusListener @@ -102,8 +115,26 @@ class SVT_DLLPUBLIC ToolboxController : public ::com::sun::star::frame::XStatusL virtual void SAL_CALL doubleClick() throw (::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > SAL_CALL createPopupWindow() throw (::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > SAL_CALL createItemWindow( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow >& Parent ) throw (::com::sun::star::uno::RuntimeException); + // OPropertySetHelper //shizhoubo + virtual void SAL_CALL setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const com::sun::star::uno::Any& rValue ) throw(com::sun::star::uno::Exception); + virtual sal_Bool SAL_CALL convertFastPropertyValue( com::sun::star::uno::Any& rConvertedValue, com::sun::star::uno::Any& rOldValue, sal_Int32 nHandle, const com::sun::star::uno::Any& rValue) throw(com::sun::star::lang::IllegalArgumentException); + // XPropertySet //shizhoubo + virtual ::com::sun::star::uno::Reference< com::sun::star::beans::XPropertySetInfo> SAL_CALL getPropertySetInfo() throw(::com::sun::star::uno::RuntimeException); + virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); + // OPropertyArrayUsageHelper //shizhoubo + virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const; + + + const rtl::OUString& getCommandURL() const { return m_aCommandURL; } + const rtl::OUString& getModuleName() const; + + void dispatchCommand( const ::rtl::OUString& sCommandURL, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rArgs ); + + void enable( bool bEnable ); protected: + bool getToolboxId( sal_uInt16& rItemId, ToolBox** ppToolBox ); + void setSupportVisiableProperty(sal_Bool bValue); //shizhoubo struct Listener { Listener( const ::com::sun::star::util::URL& rURL, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch >& rDispatch ) : diff --git a/svtools/inc/svtools/toolpanel/decklayouter.hxx b/svtools/inc/svtools/toolpanel/decklayouter.hxx new file mode 100755 index 000000000000..da03d7c6c3aa --- /dev/null +++ b/svtools/inc/svtools/toolpanel/decklayouter.hxx @@ -0,0 +1,104 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * +************************************************************************/ + +#ifndef SVT_DECKLAYOUTER_HXX +#define SVT_DECKLAYOUTER_HXX + +#include <com/sun/star/uno/Reference.hxx> + +#include <rtl/ref.hxx> + +#include <boost/optional.hpp> + +namespace com { namespace sun { namespace star { namespace accessibility { + class XAccessible; +} } } } +class Rectangle; +class Point; + +//........................................................................ +namespace svt +{ +//........................................................................ + + //==================================================================== + //= IDeckLayouter + //==================================================================== + class IDeckLayouter : public ::rtl::IReference + { + public: + /** re-arranges the elements of the tool deck, taking into account the + available space for the complete deck. + + @param i_rDeckPlayground + the playground for the complete tool panel deck + @return + the content area for a single tool panel + */ + virtual ::Rectangle Layout( const ::Rectangle& i_rDeckPlayground ) = 0; + + /** destroys the instance + + Since the layouter is ref-counted, but might keep references to non-ref-counted objects + (in particular, the ToolPanelDeck, which is a VCL-Window, and thus cannot be ref-counted), + Destroy is the definitive way to dispose the instance. Technically, it's still alive afterwards, + but non-functional. + */ + virtual void Destroy() = 0; + + /** assuming that a layouter neesds to provide some kind of panel selector control, this method + requests to set the focus to this control. + */ + virtual void SetFocusToPanelSelector() = 0; + + /** returns the number of components in the XAccessible hierarchy which are needed to represent all elements + the layouter is responsible form. + + Note that the implementation must guarantee that the count is fixed over the life time of the layouter. + */ + virtual size_t GetAccessibleChildCount() const = 0; + + /** retrieves the XAccessible implementation for the <code>i_nChildIndex</code>'th child in the XAccessible + hierarchy. + */ + virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > + GetAccessibleChild( + const size_t i_nChildIndex, + const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& i_rParentAccessible + ) = 0; + + virtual ~IDeckLayouter() + { + } + }; + + typedef ::rtl::Reference< IDeckLayouter > PDeckLayouter; + +//........................................................................ +} // namespace svt +//........................................................................ + +#endif // SVT_DECKLAYOUTER_HXX diff --git a/svtools/inc/svtools/toolpanel/drawerlayouter.hxx b/svtools/inc/svtools/toolpanel/drawerlayouter.hxx new file mode 100644 index 000000000000..0ecf493d0e98 --- /dev/null +++ b/svtools/inc/svtools/toolpanel/drawerlayouter.hxx @@ -0,0 +1,102 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * +************************************************************************/ + +#ifndef SVT_DRAWERLAYOUTER_HXX +#define SVT_DRAWERLAYOUTER_HXX + +#include "svtools/svtdllapi.h" +#include "svtools/toolpanel/refbase.hxx" +#include "svtools/toolpanel/toolpaneldeck.hxx" +#include "svtools/toolpanel/decklayouter.hxx" + +#include <boost/shared_ptr.hpp> + +//...................................................................................................................... +namespace svt +{ +//...................................................................................................................... + + class ToolPanelViewShell; + class ToolPanelDrawer; + typedef ::boost::shared_ptr< ToolPanelDrawer > PToolPanelDrawer; + + //================================================================================================================== + //= ToolPanelDrawer + //================================================================================================================== + /** a class which implements a tool panel selector in the form of the classical drawers + */ + class SVT_DLLPUBLIC DrawerDeckLayouter :public RefBase + ,public IDeckLayouter + ,public IToolPanelDeckListener + { + public: + DrawerDeckLayouter( + ::Window& i_rParentWindow, + IToolPanelDeck& i_rPanels + ); + ~DrawerDeckLayouter(); + + // IReference + DECLARE_IREFERENCE() + + // IDeckLayouter + virtual Rectangle Layout( const Rectangle& i_rDeckPlayground ); + virtual void Destroy(); + virtual void SetFocusToPanelSelector(); + virtual size_t GetAccessibleChildCount() const; + virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > + GetAccessibleChild( + const size_t i_nChildIndex, + const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& i_rParentAccessible + ); + + // IToolPanelDeckListener + virtual void PanelInserted( const PToolPanel& i_pPanel, const size_t i_nPosition ); + virtual void PanelRemoved( const size_t i_nPosition ); + virtual void ActivePanelChanged( const ::boost::optional< size_t >& i_rOldActive, const ::boost::optional< size_t >& i_rNewActive ); + virtual void LayouterChanged( const PDeckLayouter& i_rNewLayouter ); + virtual void Dying(); + + private: + // triggers a re-arrance of the panel deck elements + void impl_triggerRearrange() const; + size_t impl_getPanelPositionFromWindow( const Window* i_pDrawerWindow ) const; + void impl_removeDrawer( const size_t i_nPosition ); + + DECL_LINK( OnWindowEvent, VclSimpleEvent* ); + +private: + Window& m_rParentWindow; + IToolPanelDeck& m_rPanelDeck; + ::std::vector< PToolPanelDrawer > m_aDrawers; + ::boost::optional< size_t > m_aLastKnownActivePanel; + }; + +//...................................................................................................................... +} // namespace svt +//...................................................................................................................... + +#endif // SVT_DRAWERLAYOUTER_HXX diff --git a/svtools/inc/svtools/toolpanel/paneltabbar.hxx b/svtools/inc/svtools/toolpanel/paneltabbar.hxx new file mode 100644 index 000000000000..668935d8a739 --- /dev/null +++ b/svtools/inc/svtools/toolpanel/paneltabbar.hxx @@ -0,0 +1,102 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * +************************************************************************/ + +#ifndef SVT_PANELTABBAR_HXX +#define SVT_PANELTABBAR_HXX + +#include "svtools/svtdllapi.h" +#include "svtools/toolpanel/tabalignment.hxx" +#include "svtools/toolpanel/tabitemcontent.hxx" + +#include <vcl/ctrl.hxx> + +#include <memory> +#include <boost/optional.hpp> + +class PushButton; + +//........................................................................ +namespace svt +{ +//........................................................................ + + class PanelTabBar_Impl; + class IToolPanelDeck; + + //==================================================================== + //= PanelTabBar + //==================================================================== + /** a tab bar for selecting panels + + At the moment, this control aligns the tabs vertically, this might be extended to also support a horizontal + layout in the future. + */ + class SVT_DLLPUBLIC PanelTabBar : public Control + { + public: + PanelTabBar( Window& i_rParentWindow, IToolPanelDeck& i_rPanelDeck, const TabAlignment i_eAlignment, const TabItemContent i_eItemContent ); + ~PanelTabBar(); + + // attribute access + TabItemContent GetTabItemContent() const; + void SetTabItemContent( const TabItemContent& i_eItemContent ); + + ::boost::optional< size_t > GetFocusedPanelItem() const; + void FocusPanelItem( const size_t i_nItemPos ); + Rectangle GetItemScreenRect( const size_t i_nItemPos ) const; + bool IsVertical() const; + IToolPanelDeck& GetPanelDeck() const; + PushButton& GetScrollButton( const bool i_bForward ); + + // Window overridables + virtual Size GetOptimalSize( WindowSizeType i_eType ) const; + + protected: + // Window overridables + virtual void Paint( const Rectangle& i_rRect ); + virtual void Resize(); + virtual void MouseMove( const MouseEvent& i_rMouseEvent ); + virtual void MouseButtonDown( const MouseEvent& i_rMouseEvent ); + virtual void MouseButtonUp( const MouseEvent& i_rMouseEvent ); + virtual void RequestHelp( const HelpEvent& i_rHelpEvent ); + virtual void GetFocus(); + virtual void LoseFocus(); + virtual void KeyInput( const KeyEvent& i_rKeyEvent ); + virtual void DataChanged( const DataChangedEvent& i_rDataChanedEvent ); + + virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > + GetComponentInterface( BOOL i_bCreate ); + + private: + ::std::auto_ptr< PanelTabBar_Impl > m_pImpl; + }; + +//........................................................................ +} // namespace svt +//........................................................................ + +#endif // SVT_PANELTABBAR_HXX + diff --git a/svtools/inc/svtools/toolpanel/refbase.hxx b/svtools/inc/svtools/toolpanel/refbase.hxx new file mode 100644 index 000000000000..991d6e619090 --- /dev/null +++ b/svtools/inc/svtools/toolpanel/refbase.hxx @@ -0,0 +1,80 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * +************************************************************************/ + +#ifndef SVT_REFBASE_HXX +#define SVT_REFBASE_HXX + +#include "svtools/svtdllapi.h" + +#include <rtl/ref.hxx> + +//........................................................................ +namespace svt +{ +//........................................................................ + + //==================================================================== + //= RefBase + //==================================================================== + class SVT_DLLPUBLIC RefBase : public ::rtl::IReference + { + protected: + RefBase() + :m_refCount( 0 ) + { + } + + virtual ~RefBase() + { + } + + virtual oslInterlockedCount SAL_CALL acquire(); + virtual oslInterlockedCount SAL_CALL release(); + + private: + oslInterlockedCount m_refCount; + }; + +#define DECLARE_IREFERENCE() \ + virtual oslInterlockedCount SAL_CALL acquire(); \ + virtual oslInterlockedCount SAL_CALL release(); + + +#define IMPLEMENT_IREFERENCE( classname ) \ + oslInterlockedCount classname::acquire() \ + { \ + return RefBase::acquire(); \ + } \ + oslInterlockedCount classname::release() \ + { \ + return RefBase::release(); \ + } + +//........................................................................ +} // namespace svt +//........................................................................ + +#endif // SVT_REFBASE_HXX diff --git a/svtools/inc/svtools/toolpanel/tabalignment.hxx b/svtools/inc/svtools/toolpanel/tabalignment.hxx new file mode 100644 index 000000000000..cc3f17469ffe --- /dev/null +++ b/svtools/inc/svtools/toolpanel/tabalignment.hxx @@ -0,0 +1,47 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * +************************************************************************/ + +#ifndef SVT_TABALIGNMENT_HXX +#define SVT_TABALIGNMENT_HXX + +//........................................................................ +namespace svt +{ +//........................................................................ + + enum TabAlignment + { + TABS_LEFT, + TABS_RIGHT, + TABS_TOP, + TABS_BOTTOM + }; + +//........................................................................ +} // namespace svt +//........................................................................ + +#endif // SVT_TABALIGNMENT_HXX diff --git a/svtools/inc/svtools/toolpanel/tabitemcontent.hxx b/svtools/inc/svtools/toolpanel/tabitemcontent.hxx new file mode 100644 index 000000000000..a1cf9deae9f4 --- /dev/null +++ b/svtools/inc/svtools/toolpanel/tabitemcontent.hxx @@ -0,0 +1,48 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * +************************************************************************/ + +#ifndef SVT_TABITEMCONTENT_HXX +#define SVT_TABITEMCONTENT_HXX + +//........................................................................ +namespace svt +{ +//........................................................................ + + enum TabItemContent + { + TABITEM_IMAGE_AND_TEXT, + TABITEM_IMAGE_ONLY, + TABITEM_TEXT_ONLY, + + TABITEM_AUTO + }; + +//........................................................................ +} // namespace svt +//........................................................................ + +#endif // SVT_TABITEMCONTENT_HXX diff --git a/svtools/inc/svtools/toolpanel/tablayouter.hxx b/svtools/inc/svtools/toolpanel/tablayouter.hxx new file mode 100755 index 000000000000..92b36acf9114 --- /dev/null +++ b/svtools/inc/svtools/toolpanel/tablayouter.hxx @@ -0,0 +1,112 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * +************************************************************************/ + +#ifndef SVT_TABLAYOUTER_HXX +#define SVT_TABLAYOUTER_HXX + +#include "svtools/svtdllapi.h" +#include "svtools/toolpanel/decklayouter.hxx" +#include "svtools/toolpanel/tabalignment.hxx" +#include "svtools/toolpanel/tabitemcontent.hxx" +#include "svtools/toolpanel/refbase.hxx" + +#include <memory> + +#include <boost/noncopyable.hpp> + +class Window; + +//........................................................................ +namespace svt +{ +//........................................................................ + + class IToolPanelDeck; + + struct TabDeckLayouter_Data; + + //==================================================================== + //= TabDeckLayouter + //==================================================================== + class SVT_DLLPUBLIC TabDeckLayouter :public RefBase + ,public IDeckLayouter + ,public ::boost::noncopyable + { + public: + /** creates a new layouter + @param i_rParent + is the parent window for any VCL windows the layouter needs to create. + @param i_rPanels + is the panel deck which the layouter is responsible for. + @param i_eAlignment + specifies the alignment of the panel selector + @param TabItemContent + specifies the content to show on the tab items + */ + TabDeckLayouter( + Window& i_rParent, + IToolPanelDeck& i_rPanels, + const TabAlignment i_eAlignment, + const TabItemContent i_eItemContent + ); + ~TabDeckLayouter(); + + // attribute access + TabItemContent GetTabItemContent() const; + void SetTabItemContent( const TabItemContent& i_eItemContent ); + TabAlignment GetTabAlignment() const; + + // helpers for the A11Y implementation + ::boost::optional< size_t > + GetFocusedPanelItem() const; + void FocusPanelItem( const size_t i_nItemPos ); + bool IsPanelSelectorEnabled() const; + bool IsPanelSelectorVisible() const; + Rectangle GetItemScreenRect( const size_t i_nItemPos ) const; + + // IDeckLayouter + virtual Rectangle Layout( const Rectangle& i_rDeckPlayground ); + virtual void Destroy(); + virtual void SetFocusToPanelSelector(); + virtual size_t GetAccessibleChildCount() const; + virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > + GetAccessibleChild( + const size_t i_nChildIndex, + const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& i_rParentAccessible + ); + + // IReference + DECLARE_IREFERENCE() + + private: + ::std::auto_ptr< TabDeckLayouter_Data > m_pData; + }; + +//........................................................................ +} // namespace svt +//........................................................................ + +#endif // SVT_TABLAYOUTER_HXX diff --git a/svtools/inc/svtools/toolpanel/toolpanel.hxx b/svtools/inc/svtools/toolpanel/toolpanel.hxx new file mode 100644 index 000000000000..432dea64e8b5 --- /dev/null +++ b/svtools/inc/svtools/toolpanel/toolpanel.hxx @@ -0,0 +1,147 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * +************************************************************************/ + +#ifndef SVT_TOOLPANEL_HXX +#define SVT_TOOLPANEL_HXX + +#include "svtools/svtdllapi.h" +#include "svtools/toolpanel/refbase.hxx" + +#include <rtl/ustring.hxx> +#include <vcl/image.hxx> +#include <vcl/smartid.hxx> + +#include <boost/noncopyable.hpp> + +class Rectangle; +class Window; +namespace com { namespace sun { namespace star { namespace accessibility { + class XAccessible; +} } } } + +//........................................................................ +namespace svt +{ +//........................................................................ + + //==================================================================== + //= IToolPanel + //==================================================================== + /** abstract interface for a single tool panel + */ + class SVT_DLLPUBLIC IToolPanel : public ::rtl::IReference + { + public: + /// retrieves the display name of the panel + virtual ::rtl::OUString GetDisplayName() const = 0; + + /// retrieves the image associated with the panel, if any + virtual Image GetImage() const = 0; + + /// retrieves the help ID associated with the panel, if any. + virtual SmartId GetHelpID() const = 0; + + /** activates the panel + + Usually, this means the panel's Window is created (if not previosly done so) and shown. + + @param i_rParentWindow + the parent window to anchor the panel window at. Subsequent calls to the Activate + method will always get the same parent window. The complete area of this window is + available, and should be used, for the panel window. + */ + virtual void Activate( Window& i_rParentWindow ) = 0; + + /** deactivates the panel + + There are different ways how an implementation could deactivate a panel. The easiest way + would be to simply hide the associated Window. Alternatively, you could completely destroy it, + or decide to cache it by re-parenting it to another (temporary, invisible) window. + */ + virtual void Deactivate() = 0; + + /** sets a new size for the panel's Window + + The panel window is always expected to be positioned at (0,0), relative to the parent window + which was passed to the Activate member. Resizing the panel window is necessary when the size of + this parent window changes. Effectively, this method is a means of convenience, to relief panel + implementations from reacting on size changes of their parent window themselves. + */ + virtual void SetSizePixel( const Size& i_rPanelWindowSize ) = 0; + + /// sets the focus to the panel window + virtual void GrabFocus() = 0; + + /** release any resources associated with the panel. + + In particular, implementations should ultimately destroy the VCL window which implements the panel + window. No subsequent calls to any other method will happen after Destroy has been called. + */ + virtual void Dispose() = 0; + + /** creates an XAccessible for the tool panel + + Implementations are allowed to create a new instance each time this method is called, the caller + is responsible for caching the XAccessible implementation, if this is desired. + */ + virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > + CreatePanelAccessible( + const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& i_rParentAccessible + ) = 0; + + virtual ~IToolPanel() + { + } + }; + + typedef ::rtl::Reference< IToolPanel > PToolPanel; + + //==================================================================== + //= ToolPanelBase + //==================================================================== + /** base class for tool panel implementations, adding ref count implementation to the IToolPanel interface, + but still being abstract + */ + class SVT_DLLPUBLIC ToolPanelBase :public IToolPanel + ,public RefBase + ,public ::boost::noncopyable + { + protected: + ToolPanelBase(); + ~ToolPanelBase(); + + public: + DECLARE_IREFERENCE() + + private: + oslInterlockedCount m_refCount; + }; + +//........................................................................ +} // namespace svt +//........................................................................ + +#endif // SVT_TOOLPANEL_HXX diff --git a/svtools/inc/svtools/toolpanel/toolpaneldeck.hxx b/svtools/inc/svtools/toolpanel/toolpaneldeck.hxx new file mode 100755 index 000000000000..a1009591ffba --- /dev/null +++ b/svtools/inc/svtools/toolpanel/toolpaneldeck.hxx @@ -0,0 +1,193 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * +************************************************************************/ + +#ifndef SVT_TOOLPANELDECK_HXX +#define SVT_TOOLPANELDECK_HXX + +#include "svtools/svtdllapi.h" +#include "svtools/toolpanel/toolpanel.hxx" +#include "svtools/toolpanel/decklayouter.hxx" + +#include <vcl/ctrl.hxx> + +#include <boost/optional.hpp> +#include <memory> + +//........................................................................ +namespace svt +{ +//........................................................................ + + class ToolPanelCollection; + class ToolPanelDeck_Impl; + + //==================================================================== + //= IToolPanelDeckListener + //==================================================================== + class SAL_NO_VTABLE IToolPanelDeckListener + { + public: + /** called when a panel has been inserted into the deck + */ + virtual void PanelInserted( const PToolPanel& i_pPanel, const size_t i_nPosition ) = 0; + + /** called when a panel has been removed from the deck + */ + virtual void PanelRemoved( const size_t i_nPosition ) = 0; + + /** called when the active panel of the deck changed + */ + virtual void ActivePanelChanged( const ::boost::optional< size_t >& i_rOldActive, const ::boost::optional< size_t >& i_rNewActive ) = 0; + + /** called when a new layouter has been set at a tool panel deck. + + The method is called after the old layouter has been disposed (i.e. its Destroy method has been + invoked), and after the complete deck has been re-layouter. + */ + virtual void LayouterChanged( const PDeckLayouter& i_rNewLayouter ) = 0; + + /** called when the tool panel deck which the listener registered at is dying. The listener is required to + release all references to the deck then. + */ + virtual void Dying() = 0; + }; + + //==================================================================== + //= IToolPanelDeck + //==================================================================== + class SVT_DLLPUBLIC IToolPanelDeck + { + public: + /** returns the number of panels in the container + */ + virtual size_t GetPanelCount() const = 0; + + /** retrieves the panel with the given index. Invalid indexes will be reported via an assertion in the + non-product version, and silently ignored in the product version, with a NULL panel being returned. + */ + virtual PToolPanel GetPanel( const size_t i_nPos ) const = 0; + + /** returns the number of the currently active panel. + */ + virtual ::boost::optional< size_t > + GetActivePanel() const = 0; + + /** activates the panel with the given number. If the given number is larger or equal to the number of panels + in the deck, this will be reported via an assertion in non-product builds, and otherwise ignored. + @param i_rPanel + the number of the panel to activate. If this is not set, the currently active panel is de-activated, + and no new panel is activated at all. Whether or not this makes sense for your application is at + your own discretion. + */ + virtual void ActivatePanel( const ::boost::optional< size_t >& i_rPanel ) = 0; + + /** inserts a new panel into the container. NULL panels are not allowed, as are positions greater than the + current panel count. Violations of this will be reported via an assertion in the non-product version, and + silently ignored in the product version. + */ + virtual size_t InsertPanel( const PToolPanel& i_pPanel, const size_t i_nPosition ) = 0; + + /** removes a panel specified by its position. + + Note: It is the responsibility of the caller to ensure that the panel is destroyed appropriately. That is, + the tool panel deck will <em>not</em> invoke <member>IToolPanel::Dispose</member> on the removed panel. + The advantage is that the panel might be re-used later, with the disadvantage that the owner of the panel + deck must know whether Dispose must be invoked after removal, or whether the panel will properly + dispose itself when its ref count drops to 0. + */ + virtual PToolPanel RemovePanel( const size_t i_nPosition ) = 0; + + /** adds a new listener to be notified when the container content changes. The caller is responsible + for life time control, i.e. removing the listener before it actually dies. + */ + virtual void AddListener( IToolPanelDeckListener& i_rListener ) = 0; + + /** removes a container listener previously added via addListener. + */ + virtual void RemoveListener( IToolPanelDeckListener& i_rListener ) = 0; + }; + + //==================================================================== + //= ToolPanelDeck + //==================================================================== + class SVT_DLLPUBLIC ToolPanelDeck :public Control + ,public IToolPanelDeck + { + public: + ToolPanelDeck( Window& i_rParent, const WinBits i_nStyle = WB_DIALOGCONTROL ); + ~ToolPanelDeck(); + + // attributes + PDeckLayouter GetLayouter() const; + void SetLayouter( const PDeckLayouter& i_pNewLayouter ); + + /** returns the window which acts as anchor for the panel windows. + + This is a single dedicated window, which is passed to the IToolPanel::ActivatePanel method + whenever a panel is activated, to act as parent window for the panel's VCL-Window. + */ + ::Window& GetPanelWindowAnchor(); + const ::Window& GetPanelWindowAnchor() const; + + /** sets the window which should act as parent in the A11Y object hierarchy. + + Calling this method has no effect if CreateAccessible had always been called. + */ + void SetAccessibleParentWindow( ::Window* i_pAccessibleParent ); + ::Window* GetAccessibleParentWindow() const; + + // IToolPanelDeck + virtual size_t GetPanelCount() const; + virtual PToolPanel GetPanel( const size_t i_nPos ) const; + virtual ::boost::optional< size_t > + GetActivePanel() const; + virtual void ActivatePanel( const ::boost::optional< size_t >& i_rPanel ); + virtual size_t InsertPanel( const PToolPanel& i_pPanel, const size_t i_nPosition ); + virtual PToolPanel RemovePanel( const size_t i_nPosition ); + virtual void AddListener( IToolPanelDeckListener& i_rListener ); + virtual void RemoveListener( IToolPanelDeckListener& i_rListener ); + + protected: + // Window overridables + virtual void Resize(); + virtual long Notify( NotifyEvent& i_rNotifyEvent ); + virtual void GetFocus(); + + virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > + GetComponentInterface( BOOL i_bCreate ); + + private: + ::std::auto_ptr< ToolPanelDeck_Impl > m_pImpl; + + private: + using Window::GetAccessibleParentWindow; + }; + +//........................................................................ +} // namespace svt +//........................................................................ + +#endif // SVT_TOOLPANELDECK_HXX diff --git a/svtools/inc/svtools/valueset.hxx b/svtools/inc/svtools/valueset.hxx index 9d72751c5e20..0937d824daf0 100644 --- a/svtools/inc/svtools/valueset.hxx +++ b/svtools/inc/svtools/valueset.hxx @@ -426,6 +426,9 @@ public: void SetDoubleClickHdl( const Link& rLink ) { maDoubleClickHdl = rLink; } const Link& GetDoubleClickHdl() const { return maDoubleClickHdl; } + void SetHighlightHdl( const Link& rLink ); + const Link& GetHighlightHdl() const; + private: /** Determine whether RTL (right to left writing) is active. For this method to return <true/> two conditions have to be fullfilled: diff --git a/svtools/inc/svtools/wizardmachine.hxx b/svtools/inc/svtools/wizardmachine.hxx index f45087f78705..02562ac4bb63 100644 --- a/svtools/inc/svtools/wizardmachine.hxx +++ b/svtools/inc/svtools/wizardmachine.hxx @@ -42,6 +42,7 @@ namespace svt //......................................................................... // wizard buttons +#define WZB_NONE 0x0000 #define WZB_NEXT 0x0001 #define WZB_PREVIOUS 0x0002 #define WZB_FINISH 0x0004 @@ -62,12 +63,11 @@ namespace svt eTravelForward, // traveling forward (maybe with skipping pages) eTravelBackward, // traveling backward (maybe with skipping pages) eFinish, // the wizard is about to be finished - eValidate, // the data should be validated only, no traveling wll happen - eValidateNoUI // the data should be validated only, without displaying error messages and other UI + eValidate // the data should be validated only, no traveling wll happen }; }; - class SAL_NO_VTABLE IWizardPage : public WizardTypes + class SAL_NO_VTABLE IWizardPageController { public: //----------------------------------------------------------------- @@ -78,7 +78,16 @@ namespace svt // to be committed for this. // So initializePage and commitPage are designated to initialitzing/committing data on the page. virtual void initializePage() = 0; - virtual sal_Bool commitPage( CommitPageReason _eReason ) = 0; + virtual sal_Bool commitPage( WizardTypes::CommitPageReason _eReason ) = 0; + + /** determines whether or not it is allowed to advance to a next page + + You should make this dependent on the current state of the page only, not on + states on other pages of the whole dialog. + + The default implementation always returns <TRUE/>. + */ + virtual bool canAdvance() const = 0; }; //===================================================================== @@ -87,7 +96,7 @@ namespace svt class OWizardMachine; struct WizardPageImplData; - class SVT_DLLPUBLIC OWizardPage : public TabPage, public IWizardPage + class SVT_DLLPUBLIC OWizardPage : public TabPage, public IWizardPageController { private: WizardPageImplData* m_pImpl; @@ -101,23 +110,10 @@ namespace svt OWizardPage( Window* _pParent, const ResId& _rResId ); ~OWizardPage(); - // This methods behave somewhat different than ActivatePage/DeactivatePage - // The latter are handled by the base class itself whenever changing the pages is in the offing, - // i.e., when it's already decided which page is the next. - // We may have situations where the next page depends on the state of the current, which needs - // to be committed for this. - // So initializePage and commitPage are designated to initialitzing/committing data on the page. + // IWizardPageController overridables virtual void initializePage(); - virtual sal_Bool commitPage( CommitPageReason _eReason ); - - /** determines whether or not it is allowed to advance to a next page - - You should make this dependent on the current state of the page only, not on - states on other pages of the whole dialog. - - The default implementation always returns <TRUE/>. - */ - virtual bool canAdvance() const; + virtual sal_Bool commitPage( WizardTypes::CommitPageReason _eReason ); + virtual bool canAdvance() const; protected: // TabPage overridables @@ -189,6 +185,7 @@ namespace svt For the button flags, use any combination of the WZB_* flags. */ OWizardMachine(Window* _pParent, const ResId& _rRes, sal_uInt32 _nButtonFlags ); + OWizardMachine(Window* _pParent, const WinBits i_nStyle, sal_uInt32 _nButtonFlags ); ~OWizardMachine(); /// enable (or disable) buttons @@ -263,7 +260,7 @@ namespace svt /** called when the finish button is pressed <p>By default, only the base class' Finnish method (which is not virtual) is called</p> */ - virtual sal_Bool onFinish(sal_Int32 _nResult); + virtual sal_Bool onFinish(); /// travel to the next state sal_Bool travelNext(); @@ -342,7 +339,8 @@ namespace svt */ WizardState getCurrentState() const { return WizardDialog::GetCurLevel(); } - virtual IWizardPage* getWizardPage(TabPage* _pCurrentPage) const; + virtual IWizardPageController* + getPageController( TabPage* _pCurrentPage ) const; /** retrieves a copy of the state history, i.e. all states we already visited */ @@ -355,6 +353,9 @@ namespace svt void resumeTraveling( AccessGuard ); bool isTravelingSuspended() const; + protected: + TabPage* GetOrCreatePage( const WizardState i_nState ); + private: // long OnNextPage( PushButton* ); DECL_DLLPRIVATE_LINK(OnNextPage, PushButton*); @@ -363,6 +364,7 @@ namespace svt SVT_DLLPRIVATE void implResetDefault(Window* _pWindow); SVT_DLLPRIVATE void implUpdateTitle(); + SVT_DLLPRIVATE void implConstruct( const sal_uInt32 _nButtonFlags ); }; /// helper class to temporarily suspend any traveling in the wizard |