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 .
22 #include <sot/exchange.hxx>
25 struct AcceptDropEvent
;
26 struct ExecuteDropEvent
;
28 namespace comphelper
{ class OInterfaceContainerHelper2
; }
45 // IControlActionListener
46 class SAL_NO_VTABLE IControlActionListener
49 /** requests a quick help text to display
50 @return <FALSE/> if the default quick help text should be used
52 virtual bool requestQuickHelp(const void* pUserData
, OUString
& rText
) const = 0;
54 /** handler for StartDrag requests
55 @return <TRUE/> if a drag operation was started
57 virtual bool requestDrag(const weld::TreeIter
& rEntry
) = 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;
68 ~IControlActionListener() {}
71 // IContextMenuProvider
72 class SAL_NO_VTABLE IContextMenuProvider
75 /** returns the context menu resource name for the control
77 Supposed to be a valid name from uiconfig/<module>/popupmenu folder.
79 virtual OUString
getContextMenuResourceName() const = 0;
81 /** returns the controller which is responsible for providing states of certain features,
84 virtual IController
& getCommandController() = 0;
86 /** returns the container of registered context menu interceptors, or NULL if the implementation
87 does not support context menu interception
89 virtual ::comphelper::OInterfaceContainerHelper2
*
90 getContextMenuInterceptors() = 0;
92 /** returns the current selection in the given control
94 This selection is used for filling a ContextMenuExecuteEvent event for the given
97 virtual css::uno::Any
getCurrentSelection(weld::TreeView
& rControl
) const = 0;
99 virtual vcl::Window
* getMenuParent() const = 0;
101 /** adjust rPos which is initially relative to rControl to be relative to
102 the window of getMenuParent
104 virtual void adjustMenuPosition(const weld::TreeView
& rControl
, ::Point
& rPos
) const = 0;
107 ~IContextMenuProvider() {}
110 // IDragTransferableListener
111 class SAL_NO_VTABLE IDragTransferableListener
114 /// called when a drag operation done with a Transferable has been finished
115 virtual void dragFinished( ) = 0;
118 ~IDragTransferableListener() {}
123 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */