menufw/menufwui/mmwidgets/inc/mmdraganddropobserver.h
changeset 0 f72a12da539e
child 38 79311d856354
equal deleted inserted replaced
-1:000000000000 0:f72a12da539e
       
     1 /*
       
     2 * Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  receives key pressed notifications
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef M_MMDRAGANDDROPOBSERVER_H
       
    20 #define M_MMDRAGANDDROPOBSERVER_H
       
    21 
       
    22 /**
       
    23  *  Used by Multimedia Menu widgets to notify about dragging events.
       
    24  *  Whenever a drag begins HandleDragStartL() is invoked.
       
    25  *  When the highlight changes during drag, HandleDragOverL() is invoked.
       
    26  *  When item is dropped, HandleDragStopL() is invoked.
       
    27  *  The set of the three methods fully notifies the observer about the state 
       
    28  *  of the drag.
       
    29  *
       
    30  *  @code
       
    31  *  @endcode
       
    32  *  @lib mmwidgets
       
    33  *  @since S60 v3.0
       
    34  *  @ingroup group_mmwidgets
       
    35  */
       
    36 class MMmDragAndDropObserver
       
    37     {
       
    38 public:
       
    39     /**
       
    40      * Method is invoked on the observer, when the dragging starts.
       
    41      *
       
    42      * @since S60 v5.0
       
    43      * @param aModelItemIndex Index of item that has started dragging.
       
    44      */
       
    45     virtual void HandleDragStartL( TInt aModelItemIndex ) = 0;
       
    46 
       
    47     /**
       
    48      * Method is invoked on the observer, when highlight changes
       
    49      * while dragging.
       
    50      *
       
    51      * @since S60 v5.0
       
    52      * @param aModelItemIndex Index of item that the dragged item hovers over.
       
    53      */
       
    54     virtual void HandleDragOverL( TInt aModelItemIndex ) = 0;
       
    55     
       
    56     /**
       
    57      * Method is invoked on the observer, when the item is dropped.
       
    58      *
       
    59      * @since S60 v5.0
       
    60      * @param aModelItemIndex Index of item on which the draging stops.
       
    61      */
       
    62     virtual void HandleDragStopL( TInt aModelItemIndex ) = 0;
       
    63     
       
    64     /**
       
    65      * Method is invoked on the observer, when the dragged item index changes.
       
    66      *
       
    67      * @since S60 v5.0
       
    68      * @param aModelItemIndex Index of item on which the draging stops.
       
    69      */
       
    70     virtual void HandleDraggedIndexUpdatedL( TInt aModelItemIndex ) = 0;
       
    71     
       
    72     };
       
    73     
       
    74 #endif // M_MMDRAGANDDROPOBSERVER_H