bump product version to 4.1.6.2
[LibreOffice.git] / dbaccess / source / ui / inc / callbacks.hxx
blobe914505474a31c10282a98ee652fc167be5434ce
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 _DBACCESS_UI_CALLBACKS_HXX_
21 #define _DBACCESS_UI_CALLBACKS_HXX_
23 #include <sot/exchange.hxx>
24 #include <sot/formats.hxx>
25 #include <com/sun/star/container/XContainer.hpp>
27 class SvTreeListEntry;
28 class String;
29 class Point;
30 class PopupMenu;
31 class Control;
32 struct AcceptDropEvent;
33 struct ExecuteDropEvent;
35 namespace cppu { class OInterfaceContainerHelper; }
37 //........................................................................
38 namespace dbaui
40 //........................................................................
42 class IController;
43 //====================================================================
44 //= IControlActionListener
45 //====================================================================
46 class SAL_NO_VTABLE IControlActionListener
48 public:
49 /** requests a quick help text to display
50 @return <FALSE/> if the default quick help text should be used
52 virtual sal_Bool requestQuickHelp( const SvTreeListEntry* _pEntry, OUString& _rText ) const = 0;
54 /** handler for StartDrag requests
55 @return <TRUE/> if a drag operation was started
57 virtual sal_Bool requestDrag( sal_Int8 _nAction, const Point& _rPosPixel ) = 0;
59 /** check whether or not a drop request should be accepted
61 virtual sal_Int8 queryDrop( const AcceptDropEvent& _rEvt, const DataFlavorExVector& _rFlavors ) = 0;
63 /** execute a drop request
65 virtual sal_Int8 executeDrop( const ExecuteDropEvent& _rEvt ) = 0;
67 protected:
68 ~IControlActionListener() {}
71 //====================================================================
72 //= IContextMenuProvider
73 //====================================================================
74 class SAL_NO_VTABLE IContextMenuProvider
76 public:
77 /** returns the context menu for the control
79 Note that the menu does not need to care for the controls selection, or its
80 state in general.
81 The control itself will, using the controller provided by getCommandController,
82 disable menu entries as needed.
84 virtual PopupMenu* getContextMenu( Control& _rControl ) const = 0;
86 /** returns the controller which is responsible for providing states of certain features,
87 and executing them.
89 virtual IController& getCommandController() = 0;
91 /** returns the container of registered context menu interceptors, or NULL if the implementation
92 does not support context menu interception
94 virtual ::cppu::OInterfaceContainerHelper*
95 getContextMenuInterceptors() = 0;
97 /** returns the current selection in the given control
99 This selection is used for filling a ContextMenuExecuteEvent event for the given
100 control.
102 virtual ::com::sun::star::uno::Any
103 getCurrentSelection( Control& _rControl ) const = 0;
105 protected:
106 ~IContextMenuProvider() {}
109 //====================================================================
110 //= IDragTransferableListener
111 //====================================================================
112 class SAL_NO_VTABLE IDragTransferableListener
114 public:
115 /// called when a drag operation done with a Transferable has been finished
116 virtual void dragFinished( ) = 0;
118 protected:
119 ~IDragTransferableListener() {}
122 //........................................................................
123 } // namespace dbaui
124 //........................................................................
126 #endif // _DBACCESS_UI_CALLBACKS_HXX_
128 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */