1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: callbacks.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef _DBACCESS_UI_CALLBACKS_HXX_
32 #define _DBACCESS_UI_CALLBACKS_HXX_
34 #ifndef _SOT_EXCHANGE_HXX
35 #include <sot/exchange.hxx>
37 #ifndef _SOT_FORMATS_HXX
38 #include <sot/formats.hxx>
40 #ifndef _COM_SUN_STAR_CONTAINER_XCONTAINER_HPP_
41 #include <com/sun/star/container/XContainer.hpp>
50 struct AcceptDropEvent
;
51 struct ExecuteDropEvent
;
53 namespace cppu
{ class OInterfaceContainerHelper
; }
55 //........................................................................
58 //........................................................................
61 //====================================================================
62 //= IControlActionListener
63 //====================================================================
64 class SAL_NO_VTABLE IControlActionListener
67 /** requests a quick help text to display
68 @return <FALSE/> if the default quick help text should be used
70 virtual sal_Bool
requestQuickHelp( const SvLBoxEntry
* _pEntry
, String
& _rText
) const = 0;
72 /** handler for StartDrag requests
73 @return <TRUE/> if a drag operation was started
75 virtual sal_Bool
requestDrag( sal_Int8 _nAction
, const Point
& _rPosPixel
) = 0;
77 /** check whether or not a drop request should be accepted
79 virtual sal_Int8
queryDrop( const AcceptDropEvent
& _rEvt
, const DataFlavorExVector
& _rFlavors
) = 0;
81 /** execute a drop request
83 virtual sal_Int8
executeDrop( const ExecuteDropEvent
& _rEvt
) = 0;
86 //====================================================================
87 //= IContextMenuProvider
88 //====================================================================
89 class SAL_NO_VTABLE IContextMenuProvider
92 /** returns the context menu for the control
94 Note that the menu does not need to care for the controls selection, or its
96 The control itself will, using the controller provided by getCommandController,
97 disable menu entries as needed.
99 virtual PopupMenu
* getContextMenu( Control
& _rControl
) const = 0;
101 /** returns the controller which is responsible for providing states of certain features,
104 virtual IController
& getCommandController() = 0;
106 /** returns the container of registered context menu interceptors, or NULL if the implementation
107 does not support context menu interception
109 virtual ::cppu::OInterfaceContainerHelper
*
110 getContextMenuInterceptors() = 0;
112 /** returns the current selection in the given control
114 This selection is used for filling a ContextMenuExecuteEvent event for the given
117 virtual ::com::sun::star::uno::Any
118 getCurrentSelection( Control
& _rControl
) const = 0;
121 //====================================================================
122 //= IDragTransferableListener
123 //====================================================================
124 class SAL_NO_VTABLE IDragTransferableListener
127 /// called when a drag operation done with a Transferable has been finished
128 virtual void dragFinished( ) = 0;
131 //........................................................................
133 //........................................................................
135 #endif // _DBACCESS_UI_CALLBACKS_HXX_