1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_DBACCESS_SOURCE_UI_INC_CALLBACKS_HXX
21 #define INCLUDED_DBACCESS_SOURCE_UI_INC_CALLBACKS_HXX
23 #include <sot/exchange.hxx>
24 #include <sot/formats.hxx>
25 #include <com/sun/star/container/XContainer.hpp>
27 class SvTreeListEntry
;
31 struct AcceptDropEvent
;
32 struct ExecuteDropEvent
;
34 namespace cppu
{ class OInterfaceContainerHelper
; }
40 // IControlActionListener
41 class SAL_NO_VTABLE IControlActionListener
44 /** requests a quick help text to display
45 @return <FALSE/> if the default quick help text should be used
47 virtual bool requestQuickHelp( const SvTreeListEntry
* _pEntry
, OUString
& _rText
) const = 0;
49 /** handler for StartDrag requests
50 @return <TRUE/> if a drag operation was started
52 virtual bool requestDrag( sal_Int8 _nAction
, const Point
& _rPosPixel
) = 0;
54 /** check whether or not a drop request should be accepted
56 virtual sal_Int8
queryDrop( const AcceptDropEvent
& _rEvt
, const DataFlavorExVector
& _rFlavors
) = 0;
58 /** execute a drop request
60 virtual sal_Int8
executeDrop( const ExecuteDropEvent
& _rEvt
) = 0;
63 ~IControlActionListener() {}
66 // IContextMenuProvider
67 class SAL_NO_VTABLE IContextMenuProvider
70 /** returns the context menu for the control
72 Note that the menu does not need to care for the controls selection, or its
74 The control itself will, using the controller provided by getCommandController,
75 disable menu entries as needed.
77 virtual PopupMenu
* getContextMenu( Control
& _rControl
) const = 0;
79 /** returns the controller which is responsible for providing states of certain features,
82 virtual IController
& getCommandController() = 0;
84 /** returns the container of registered context menu interceptors, or NULL if the implementation
85 does not support context menu interception
87 virtual ::cppu::OInterfaceContainerHelper
*
88 getContextMenuInterceptors() = 0;
90 /** returns the current selection in the given control
92 This selection is used for filling a ContextMenuExecuteEvent event for the given
95 virtual ::com::sun::star::uno::Any
96 getCurrentSelection( Control
& _rControl
) const = 0;
99 ~IContextMenuProvider() {}
102 // IDragTransferableListener
103 class SAL_NO_VTABLE IDragTransferableListener
106 /// called when a drag operation done with a Transferable has been finished
107 virtual void dragFinished( ) = 0;
110 ~IDragTransferableListener() {}
115 #endif // INCLUDED_DBACCESS_SOURCE_UI_INC_CALLBACKS_HXX
117 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */