mulwidgets/alfscrollbarwidget/inc/alfscrollbarlongtaptimer.h
changeset 17 3eca7e70b1b8
parent 3 4526337fb576
equal deleted inserted replaced
3:4526337fb576 17:3eca7e70b1b8
     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:    Timer for creating longtap event 
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef __ALF_SCROLLBARLLONGTAPTIMER_H__
       
    19 #define __ALF_SCROLLBARLLONGTAPTIMER_H__
       
    20 
       
    21 #include <e32std.h>
       
    22 #include <e32base.h>
       
    23 #include <alf/ialfscrollbardefaultbaseelement.h>
       
    24 
       
    25 namespace Alf
       
    26     {
       
    27 
       
    28 // Forward declarations
       
    29 class AlfScrollBarBaseElement;
       
    30         
       
    31 class AlfScrollBarLongTapTimer: public CActive
       
    32     {
       
    33 
       
    34     enum TState
       
    35         {
       
    36         //To indicate the event is in running state.
       
    37         ERunning,
       
    38         
       
    39         //To indicate the event is in stopped state.
       
    40         EStopped
       
    41         };        
       
    42 public:
       
    43 /**
       
    44   * Constructor
       
    45   * @param aBaseElement .     
       
    46   * @since S60 ?S60_version
       
    47   */
       
    48 	AlfScrollBarLongTapTimer(IAlfScrollBarDefaultBaseElement* aBaseElement);
       
    49 
       
    50 /**
       
    51   * Destructor 
       
    52   */      
       
    53    ~AlfScrollBarLongTapTimer();
       
    54 
       
    55 /**
       
    56   * Start the Timer. 
       
    57   */    
       
    58     void Start();
       
    59 
       
    60  /**
       
    61    * Stops the Timer. 
       
    62    */    
       
    63     void Stop();
       
    64    
       
    65  /**
       
    66    * user code runs under this active object. 
       
    67    */
       
    68     void RunL();
       
    69     
       
    70  /**
       
    71    * Implements cancellation of an outstanding request. 
       
    72    */
       
    73     void DoCancel();        
       
    74  
       
    75 private:
       
    76     RTimer iTimer; 
       
    77     TState iState;
       
    78     
       
    79     /**
       
    80     * Instance of IAlfScrollBarBaseElement.
       
    81     */
       
    82 	IAlfScrollBarDefaultBaseElement* iBaseElement;
       
    83 	
       
    84 	/**
       
    85     * Instance of TAlfEvent.
       
    86     */	
       
    87     TAlfEvent* mEvent;
       
    88     };
       
    89 
       
    90     }
       
    91 
       
    92 #endif // __ALF_SCROLLBARLLONGTAPTIMER_H__