update dev300-m58
[ooovba.git] / dbaccess / source / ui / inc / callbacks.hxx
blob88231c63d70c8aecf972284f702f73d859eeb04f
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: callbacks.hxx,v $
10 * $Revision: 1.10 $
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>
36 #endif
37 #ifndef _SOT_FORMATS_HXX
38 #include <sot/formats.hxx>
39 #endif
40 #ifndef _COM_SUN_STAR_CONTAINER_XCONTAINER_HPP_
41 #include <com/sun/star/container/XContainer.hpp>
42 #endif
44 class CommandEvent;
45 class SvLBoxEntry;
46 class String;
47 class Point;
48 class PopupMenu;
49 class Control;
50 struct AcceptDropEvent;
51 struct ExecuteDropEvent;
53 namespace cppu { class OInterfaceContainerHelper; }
55 //........................................................................
56 namespace dbaui
58 //........................................................................
60 class IController;
61 //====================================================================
62 //= IControlActionListener
63 //====================================================================
64 class SAL_NO_VTABLE IControlActionListener
66 public:
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
91 public:
92 /** returns the context menu for the control
94 Note that the menu does not need to care for the controls selection, or its
95 state in general.
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,
102 and executing them.
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
115 control.
117 virtual ::com::sun::star::uno::Any
118 getCurrentSelection( Control& _rControl ) const = 0;
121 //====================================================================
122 //= IDragTransferableListener
123 //====================================================================
124 class SAL_NO_VTABLE IDragTransferableListener
126 public:
127 /// called when a drag operation done with a Transferable has been finished
128 virtual void dragFinished( ) = 0;
131 //........................................................................
132 } // namespace dbaui
133 //........................................................................
135 #endif // _DBACCESS_UI_CALLBACKS_HXX_