1*2e2212a7SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*2e2212a7SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*2e2212a7SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*2e2212a7SAndrew Rist * distributed with this work for additional information 6*2e2212a7SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*2e2212a7SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*2e2212a7SAndrew Rist * "License"); you may not use this file except in compliance 9*2e2212a7SAndrew Rist * with the License. You may obtain a copy of the License at 10cdf0e10cSrcweir * 11*2e2212a7SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12cdf0e10cSrcweir * 13*2e2212a7SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*2e2212a7SAndrew Rist * software distributed under the License is distributed on an 15*2e2212a7SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*2e2212a7SAndrew Rist * KIND, either express or implied. See the License for the 17*2e2212a7SAndrew Rist * specific language governing permissions and limitations 18*2e2212a7SAndrew Rist * under the License. 19cdf0e10cSrcweir * 20*2e2212a7SAndrew Rist *************************************************************/ 21*2e2212a7SAndrew Rist 22*2e2212a7SAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir #ifndef _DBACCESS_UI_CALLBACKS_HXX_ 25cdf0e10cSrcweir #define _DBACCESS_UI_CALLBACKS_HXX_ 26cdf0e10cSrcweir 27cdf0e10cSrcweir #ifndef _SOT_EXCHANGE_HXX 28cdf0e10cSrcweir #include <sot/exchange.hxx> 29cdf0e10cSrcweir #endif 30cdf0e10cSrcweir #ifndef _SOT_FORMATS_HXX 31cdf0e10cSrcweir #include <sot/formats.hxx> 32cdf0e10cSrcweir #endif 33cdf0e10cSrcweir #ifndef _COM_SUN_STAR_CONTAINER_XCONTAINER_HPP_ 34cdf0e10cSrcweir #include <com/sun/star/container/XContainer.hpp> 35cdf0e10cSrcweir #endif 36cdf0e10cSrcweir 37cdf0e10cSrcweir class CommandEvent; 38cdf0e10cSrcweir class SvLBoxEntry; 39cdf0e10cSrcweir class String; 40cdf0e10cSrcweir class Point; 41cdf0e10cSrcweir class PopupMenu; 42cdf0e10cSrcweir class Control; 43cdf0e10cSrcweir struct AcceptDropEvent; 44cdf0e10cSrcweir struct ExecuteDropEvent; 45cdf0e10cSrcweir 46cdf0e10cSrcweir namespace cppu { class OInterfaceContainerHelper; } 47cdf0e10cSrcweir 48cdf0e10cSrcweir //........................................................................ 49cdf0e10cSrcweir namespace dbaui 50cdf0e10cSrcweir { 51cdf0e10cSrcweir //........................................................................ 52cdf0e10cSrcweir 53cdf0e10cSrcweir class IController; 54cdf0e10cSrcweir //==================================================================== 55cdf0e10cSrcweir //= IControlActionListener 56cdf0e10cSrcweir //==================================================================== 57cdf0e10cSrcweir class SAL_NO_VTABLE IControlActionListener 58cdf0e10cSrcweir { 59cdf0e10cSrcweir public: 60cdf0e10cSrcweir /** requests a quick help text to display 61cdf0e10cSrcweir @return <FALSE/> if the default quick help text should be used 62cdf0e10cSrcweir */ 63cdf0e10cSrcweir virtual sal_Bool requestQuickHelp( const SvLBoxEntry* _pEntry, String& _rText ) const = 0; 64cdf0e10cSrcweir 65cdf0e10cSrcweir /** handler for StartDrag requests 66cdf0e10cSrcweir @return <TRUE/> if a drag operation was started 67cdf0e10cSrcweir */ 68cdf0e10cSrcweir virtual sal_Bool requestDrag( sal_Int8 _nAction, const Point& _rPosPixel ) = 0; 69cdf0e10cSrcweir 70cdf0e10cSrcweir /** check whether or not a drop request should be accepted 71cdf0e10cSrcweir */ 72cdf0e10cSrcweir virtual sal_Int8 queryDrop( const AcceptDropEvent& _rEvt, const DataFlavorExVector& _rFlavors ) = 0; 73cdf0e10cSrcweir 74cdf0e10cSrcweir /** execute a drop request 75cdf0e10cSrcweir */ 76cdf0e10cSrcweir virtual sal_Int8 executeDrop( const ExecuteDropEvent& _rEvt ) = 0; 77cdf0e10cSrcweir }; 78cdf0e10cSrcweir 79cdf0e10cSrcweir //==================================================================== 80cdf0e10cSrcweir //= IContextMenuProvider 81cdf0e10cSrcweir //==================================================================== 82cdf0e10cSrcweir class SAL_NO_VTABLE IContextMenuProvider 83cdf0e10cSrcweir { 84cdf0e10cSrcweir public: 85cdf0e10cSrcweir /** returns the context menu for the control 86cdf0e10cSrcweir 87cdf0e10cSrcweir Note that the menu does not need to care for the controls selection, or its 88cdf0e10cSrcweir state in general. 89cdf0e10cSrcweir The control itself will, using the controller provided by getCommandController, 90cdf0e10cSrcweir disable menu entries as needed. 91cdf0e10cSrcweir */ 92cdf0e10cSrcweir virtual PopupMenu* getContextMenu( Control& _rControl ) const = 0; 93cdf0e10cSrcweir 94cdf0e10cSrcweir /** returns the controller which is responsible for providing states of certain features, 95cdf0e10cSrcweir and executing them. 96cdf0e10cSrcweir */ 97cdf0e10cSrcweir virtual IController& getCommandController() = 0; 98cdf0e10cSrcweir 99cdf0e10cSrcweir /** returns the container of registered context menu interceptors, or NULL if the implementation 100cdf0e10cSrcweir does not support context menu interception 101cdf0e10cSrcweir */ 102cdf0e10cSrcweir virtual ::cppu::OInterfaceContainerHelper* 103cdf0e10cSrcweir getContextMenuInterceptors() = 0; 104cdf0e10cSrcweir 105cdf0e10cSrcweir /** returns the current selection in the given control 106cdf0e10cSrcweir 107cdf0e10cSrcweir This selection is used for filling a ContextMenuExecuteEvent event for the given 108cdf0e10cSrcweir control. 109cdf0e10cSrcweir */ 110cdf0e10cSrcweir virtual ::com::sun::star::uno::Any 111cdf0e10cSrcweir getCurrentSelection( Control& _rControl ) const = 0; 112cdf0e10cSrcweir }; 113cdf0e10cSrcweir 114cdf0e10cSrcweir //==================================================================== 115cdf0e10cSrcweir //= IDragTransferableListener 116cdf0e10cSrcweir //==================================================================== 117cdf0e10cSrcweir class SAL_NO_VTABLE IDragTransferableListener 118cdf0e10cSrcweir { 119cdf0e10cSrcweir public: 120cdf0e10cSrcweir /// called when a drag operation done with a Transferable has been finished 121cdf0e10cSrcweir virtual void dragFinished( ) = 0; 122cdf0e10cSrcweir }; 123cdf0e10cSrcweir 124cdf0e10cSrcweir //........................................................................ 125cdf0e10cSrcweir } // namespace dbaui 126cdf0e10cSrcweir //........................................................................ 127cdf0e10cSrcweir 128cdf0e10cSrcweir #endif // _DBACCESS_UI_CALLBACKS_HXX_ 129cdf0e10cSrcweir 130