Gtk-WARNING gtktreestore.c:1047: Invalid column number 1 added to iter
[LibreOffice.git] / dbaccess / source / ui / inc / callbacks.hxx
blobe380b2671d6c744a1c484f07439f51634d85b4f0
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 #pragma once
22 #include <sot/exchange.hxx>
24 class Point;
25 struct AcceptDropEvent;
26 struct ExecuteDropEvent;
28 namespace comphelper { class OInterfaceContainerHelper2; }
30 namespace vcl
32 class Window;
35 namespace weld
37 class TreeIter;
38 class TreeView;
41 namespace dbaui
44 class IController;
45 // IControlActionListener
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 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;
67 protected:
68 ~IControlActionListener() {}
71 // IContextMenuProvider
72 class SAL_NO_VTABLE IContextMenuProvider
74 public:
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,
82 and executing them.
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
95 control.
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;
106 protected:
107 ~IContextMenuProvider() {}
110 // IDragTransferableListener
111 class SAL_NO_VTABLE IDragTransferableListener
113 public:
114 /// called when a drag operation done with a Transferable has been finished
115 virtual void dragFinished( ) = 0;
117 protected:
118 ~IDragTransferableListener() {}
121 } // namespace dbaui
123 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */