User: kz Date: 2008-06-25 12:49:07+0000 Modified: dba/dbaccess/source/ui/inc/callbacks.hxx
Log: 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 File Changes: Directory: /dba/dbaccess/source/ui/inc/ ======================================= File [changed]: callbacks.hxx Url: http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/inc/callbacks.hxx?r1=1.9&r2=1.10 Delta lines: +43 -28 --------------------- --- callbacks.hxx 2008-04-10 15:26:12+0000 1.9 +++ callbacks.hxx 2008-06-25 12:49:05+0000 1.10 @@ -45,25 +45,25 @@ 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 @@ */ 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 @@ }; //==================================================================== - //= 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; }; //........................................................................ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
