diff options
author | Kurt Zenker <kz@openoffice.org> | 2008-06-25 11:49:05 +0000 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2008-06-25 11:49:05 +0000 |
commit | 6b4faa1035b3749b558c818c5e6940fb00a3f837 (patch) | |
tree | 774b55c9305d495f8ffc18998e9b2351cebdbcab | |
parent | INTEGRATION: CWS dba30d (1.14.30); FILE MERGED (diff) | |
download | core-6b4faa1035b3749b558c818c5e6940fb00a3f837.tar.gz core-6b4faa1035b3749b558c818c5e6940fb00a3f837.zip |
INTEGRATION: CWS dba30d (1.9.30); FILE MERGED
2008/06/01 20:54:34 fs 1.9.30.2: #i80943# IContainerFoundListener and IViewChangeListener now superseded by IApplicationController / further development of the IContextMenuProvider
2008/05/29 11:24:19 fs 1.9.30.1: during #i80943#: refactoring: requestContextMenu superseded by IContextMenuProvider
-rw-r--r-- | dbaccess/source/ui/inc/callbacks.hxx | 65 |
1 files changed, 40 insertions, 25 deletions
diff --git a/dbaccess/source/ui/inc/callbacks.hxx b/dbaccess/source/ui/inc/callbacks.hxx index 723c9d276221..f5fcb1e79da5 100644 --- a/dbaccess/source/ui/inc/callbacks.hxx +++ b/dbaccess/source/ui/inc/callbacks.hxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: callbacks.hxx,v $ - * $Revision: 1.9 $ + * $Revision: 1.10 $ * * This file is part of OpenOffice.org. * @@ -45,25 +45,25 @@ class CommandEvent; class SvLBoxEntry; class String; class Point; +class PopupMenu; +class Control; struct AcceptDropEvent; struct ExecuteDropEvent; +namespace cppu { class OInterfaceContainerHelper; } + //........................................................................ namespace dbaui { //........................................................................ + class IController; //==================================================================== //= IControlActionListener //==================================================================== - class IControlActionListener + class SAL_NO_VTABLE IControlActionListener { public: - /** handler for context menu requests - @return <TRUE/> if the request was handled - */ - virtual sal_Bool requestContextMenu( const CommandEvent& _rEvent ) = 0; - /** requests a quick help text to display @return <FALSE/> if the default quick help text should be used */ @@ -74,7 +74,7 @@ namespace dbaui */ virtual sal_Bool requestDrag( sal_Int8 _nAction, const Point& _rPosPixel ) = 0; - /** check whether or no a drop request should be accepted + /** check whether or not a drop request should be accepted */ virtual sal_Int8 queryDrop( const AcceptDropEvent& _rEvt, const DataFlavorExVector& _rFlavors ) = 0; @@ -84,33 +84,48 @@ namespace dbaui }; //==================================================================== - //= IDragTransferableListener + //= IContextMenuProvider //==================================================================== - class IDragTransferableListener + class SAL_NO_VTABLE IContextMenuProvider { public: - /// called when a drag operation done with a Transferable has been finished - virtual void dragFinished( ) = 0; - }; + /** returns the context menu for the control - //==================================================================== - //= IContainerFoundListener - //==================================================================== - class SAL_NO_VTABLE IContainerFoundListener - { - public: - /// called when a container was found - virtual void containerFound( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainer >& _xContainer) = 0; + Note that the menu does not need to care for the controls selection, or its + state in general. + The control itself will, using the controller provided by getCommandController, + disable menu entries as needed. + */ + virtual PopupMenu* getContextMenu( Control& _rControl ) const = 0; + + /** returns the controller which is responsible for providing states of certain features, + and executing them. + */ + virtual IController& getCommandController() = 0; + + /** returns the container of registered context menu interceptors, or NULL if the implementation + does not support context menu interception + */ + virtual ::cppu::OInterfaceContainerHelper* + getContextMenuInterceptors() = 0; + + /** returns the current selection in the given control + + This selection is used for filling a ContextMenuExecuteEvent event for the given + control. + */ + virtual ::com::sun::star::uno::Any + getCurrentSelection( Control& _rControl ) const = 0; }; //==================================================================== - //= IViewChangeListener + //= IDragTransferableListener //==================================================================== - class SAL_NO_VTABLE IViewChangeListener + class SAL_NO_VTABLE IDragTransferableListener { public: - /// called when the preview mode was changed - virtual void previewChanged( sal_Int32 _nMode) = 0; + /// called when a drag operation done with a Transferable has been finished + virtual void dragFinished( ) = 0; }; //........................................................................ |