LCOV - code coverage report
Current view: top level - dbaccess/source/ui/inc - callbacks.hxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 4 6 66.7 %
Date: 2015-06-13 12:38:46 Functions: 4 6 66.7 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       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/.
       8             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      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 .
      18             :  */
      19             : 
      20             : #ifndef INCLUDED_DBACCESS_SOURCE_UI_INC_CALLBACKS_HXX
      21             : #define INCLUDED_DBACCESS_SOURCE_UI_INC_CALLBACKS_HXX
      22             : 
      23             : #include <sot/exchange.hxx>
      24             : #include <sot/formats.hxx>
      25             : #include <com/sun/star/container/XContainer.hpp>
      26             : 
      27             : class SvTreeListEntry;
      28             : class Point;
      29             : class PopupMenu;
      30             : class Control;
      31             : struct AcceptDropEvent;
      32             : struct ExecuteDropEvent;
      33             : 
      34             : namespace cppu { class OInterfaceContainerHelper; }
      35             : 
      36             : namespace dbaui
      37             : {
      38             : 
      39             :     class IController;
      40             :     // IControlActionListener
      41          10 :     class SAL_NO_VTABLE IControlActionListener
      42             :     {
      43             :     public:
      44             :         /** requests a quick help text to display
      45             :             @return <FALSE/> if the default quick help text should be used
      46             :         */
      47             :         virtual bool    requestQuickHelp( const SvTreeListEntry* _pEntry, OUString& _rText ) const = 0;
      48             : 
      49             :         /** handler for StartDrag requests
      50             :             @return <TRUE/> if a drag operation was started
      51             :         */
      52             :         virtual bool    requestDrag( sal_Int8 _nAction, const Point& _rPosPixel ) = 0;
      53             : 
      54             :         /** check whether or not a drop request should be accepted
      55             :         */
      56             :         virtual sal_Int8    queryDrop( const AcceptDropEvent& _rEvt, const DataFlavorExVector& _rFlavors ) = 0;
      57             : 
      58             :         /** execute a drop request
      59             :         */
      60             :         virtual sal_Int8    executeDrop( const ExecuteDropEvent& _rEvt ) = 0;
      61             : 
      62             :     protected:
      63           8 :         ~IControlActionListener() {}
      64             :     };
      65             : 
      66             :     // IContextMenuProvider
      67          10 :     class SAL_NO_VTABLE IContextMenuProvider
      68             :     {
      69             :     public:
      70             :         /** returns the context menu for the control
      71             : 
      72             :             Note that the menu does not need to care for the controls selection, or its
      73             :             state in general.
      74             :             The control itself will, using the controller provided by getCommandController,
      75             :             disable menu entries as needed.
      76             :         */
      77             :         virtual PopupMenu*      getContextMenu( Control& _rControl ) const = 0;
      78             : 
      79             :         /** returns the controller which is responsible for providing states of certain features,
      80             :             and executing them.
      81             :         */
      82             :         virtual IController&    getCommandController() = 0;
      83             : 
      84             :         /** returns the container of registered context menu interceptors, or NULL if the implementation
      85             :             does not support context menu interception
      86             :         */
      87             :         virtual ::cppu::OInterfaceContainerHelper*
      88             :                                 getContextMenuInterceptors() = 0;
      89             : 
      90             :         /** returns the current selection in the given control
      91             : 
      92             :             This selection is used for filling a ContextMenuExecuteEvent event for the given
      93             :             control.
      94             :         */
      95             :         virtual ::com::sun::star::uno::Any
      96             :                                 getCurrentSelection( Control& _rControl ) const = 0;
      97             : 
      98             :     protected:
      99           8 :         ~IContextMenuProvider() {}
     100             :     };
     101             : 
     102             :     // IDragTransferableListener
     103           0 :     class SAL_NO_VTABLE IDragTransferableListener
     104             :     {
     105             :     public:
     106             :         /// called when a drag operation done with a Transferable has been finished
     107             :         virtual void        dragFinished( ) = 0;
     108             : 
     109             :     protected:
     110           0 :         ~IDragTransferableListener() {}
     111             :     };
     112             : 
     113             : }   // namespace dbaui
     114             : 
     115             : #endif // INCLUDED_DBACCESS_SOURCE_UI_INC_CALLBACKS_HXX
     116             : 
     117             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11