LCOV - code coverage report
Current view: top level - dbaccess/source/ui/inc - callbacks.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 4 6 66.7 %
Date: 2012-08-25 Functions: 4 6 66.7 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 0 -

           Branch data     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 _DBACCESS_UI_CALLBACKS_HXX_
      21                 :            : #define _DBACCESS_UI_CALLBACKS_HXX_
      22                 :            : 
      23                 :            : #include <sot/exchange.hxx>
      24                 :            : #include <sot/formats.hxx>
      25                 :            : #include <com/sun/star/container/XContainer.hpp>
      26                 :            : 
      27                 :            : class SvLBoxEntry;
      28                 :            : class String;
      29                 :            : class Point;
      30                 :            : class PopupMenu;
      31                 :            : class Control;
      32                 :            : struct AcceptDropEvent;
      33                 :            : struct ExecuteDropEvent;
      34                 :            : 
      35                 :            : namespace cppu { class OInterfaceContainerHelper; }
      36                 :            : 
      37                 :            : //........................................................................
      38                 :            : namespace dbaui
      39                 :            : {
      40                 :            : //........................................................................
      41                 :            : 
      42                 :            :     class IController;
      43                 :            :     //====================================================================
      44                 :            :     //= IControlActionListener
      45                 :            :     //====================================================================
      46                 :          2 :     class SAL_NO_VTABLE IControlActionListener
      47                 :            :     {
      48                 :            :     public:
      49                 :            :         /** requests a quick help text to display
      50                 :            :             @return <FALSE/> if the default quick help text should be used
      51                 :            :         */
      52                 :            :         virtual sal_Bool    requestQuickHelp( const SvLBoxEntry* _pEntry, String& _rText ) const = 0;
      53                 :            : 
      54                 :            :         /** handler for StartDrag requests
      55                 :            :             @return <TRUE/> if a drag operation was started
      56                 :            :         */
      57                 :            :         virtual sal_Bool    requestDrag( sal_Int8 _nAction, const Point& _rPosPixel ) = 0;
      58                 :            : 
      59                 :            :         /** check whether or not a drop request should be accepted
      60                 :            :         */
      61                 :            :         virtual sal_Int8    queryDrop( const AcceptDropEvent& _rEvt, const DataFlavorExVector& _rFlavors ) = 0;
      62                 :            : 
      63                 :            :         /** execute a drop request
      64                 :            :         */
      65                 :            :         virtual sal_Int8    executeDrop( const ExecuteDropEvent& _rEvt ) = 0;
      66                 :            : 
      67                 :            :     protected:
      68                 :          2 :         ~IControlActionListener() {}
      69                 :            :     };
      70                 :            : 
      71                 :            :     //====================================================================
      72                 :            :     //= IContextMenuProvider
      73                 :            :     //====================================================================
      74                 :          2 :     class SAL_NO_VTABLE IContextMenuProvider
      75                 :            :     {
      76                 :            :     public:
      77                 :            :         /** returns the context menu for the control
      78                 :            : 
      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.
      83                 :            :         */
      84                 :            :         virtual PopupMenu*      getContextMenu( Control& _rControl ) const = 0;
      85                 :            : 
      86                 :            :         /** returns the controller which is responsible for providing states of certain features,
      87                 :            :             and executing them.
      88                 :            :         */
      89                 :            :         virtual IController&    getCommandController() = 0;
      90                 :            : 
      91                 :            :         /** returns the container of registered context menu interceptors, or NULL if the implementation
      92                 :            :             does not support context menu interception
      93                 :            :         */
      94                 :            :         virtual ::cppu::OInterfaceContainerHelper*
      95                 :            :                                 getContextMenuInterceptors() = 0;
      96                 :            : 
      97                 :            :         /** returns the current selection in the given control
      98                 :            : 
      99                 :            :             This selection is used for filling a ContextMenuExecuteEvent event for the given
     100                 :            :             control.
     101                 :            :         */
     102                 :            :         virtual ::com::sun::star::uno::Any
     103                 :            :                                 getCurrentSelection( Control& _rControl ) const = 0;
     104                 :            : 
     105                 :            :     protected:
     106                 :          2 :         ~IContextMenuProvider() {}
     107                 :            :     };
     108                 :            : 
     109                 :            :     //====================================================================
     110                 :            :     //= IDragTransferableListener
     111                 :            :     //====================================================================
     112                 :          0 :     class SAL_NO_VTABLE IDragTransferableListener
     113                 :            :     {
     114                 :            :     public:
     115                 :            :         /// called when a drag operation done with a Transferable has been finished
     116                 :            :         virtual void        dragFinished( ) = 0;
     117                 :            : 
     118                 :            :     protected:
     119                 :          0 :         ~IDragTransferableListener() {}
     120                 :            :     };
     121                 :            : 
     122                 :            : //........................................................................
     123                 :            : }   // namespace dbaui
     124                 :            : //........................................................................
     125                 :            : 
     126                 :            : #endif // _DBACCESS_UI_CALLBACKS_HXX_
     127                 :            : 
     128                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10