emailuis/uicomponents/inc/cuicaknscrollbaradapter.h
branchRCL_3
changeset 12 4ce476e64c59
equal deleted inserted replaced
11:0396474f30f5 12:4ce476e64c59
       
     1 /*
       
     2 * Copyright (c) 2007-2008 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: cuicaknscrollbaradapter.h
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef C_UICAKNSCROLLBARADAPTER_H
       
    19 #define C_UICAKNSCROLLBARADAPTER_H
       
    20 
       
    21 #include "muicscrollbar.h"
       
    22 #include <eikscrlb.h>
       
    23 
       
    24 /**
       
    25  * CUiCAknScrollBarAdapter
       
    26  *
       
    27  */
       
    28 NONSHARABLE_CLASS( CUiCAknScrollBarAdapter ) :
       
    29         private CBase,
       
    30         public MUiCScrollBar,
       
    31         public MEikScrollBarObserver
       
    32     {
       
    33 
       
    34 public:
       
    35 
       
    36     /**
       
    37      * Leave safe constructor
       
    38      */
       
    39     static MUiCScrollBar* NewL( MUiCScrollBar::MObserver& aObserver );
       
    40 
       
    41 public: // from MUiCScrollBar
       
    42 
       
    43     /**
       
    44      * @see MUiCScrollBar::Destroy
       
    45      */
       
    46     virtual void Destroy();
       
    47 
       
    48     /**
       
    49      * @see MUiCScrollBar::Show
       
    50      */
       
    51     virtual void Show( const TBool aShow );
       
    52 
       
    53     /**
       
    54      * @see MUiCScrollBar::UpdateModelL
       
    55      */
       
    56     virtual void UpdateModelL( const TUiCScrollBarModel& aModel );
       
    57 
       
    58     /**
       
    59      * @see MUiCScrollBar::ThumbPosition
       
    60      */
       
    61     virtual TInt ThumbPosition() const;
       
    62 
       
    63     /**
       
    64      * @see MUiCScrollBar::SetRect
       
    65      */
       
    66     virtual void SetRect( const TRect& aRect );
       
    67 
       
    68     /**
       
    69      * @see MUiCScrollBar::Redraw
       
    70      */
       
    71     virtual void Redraw();
       
    72 
       
    73     /**
       
    74      * @see MUiCScrollBar::NotifyThemeChanged
       
    75      */
       
    76     virtual void NotifyThemeChanged();
       
    77 
       
    78     /**
       
    79      * @see MUiCScrollBar::LayoutHints
       
    80      */
       
    81     virtual TInt LayoutHints() const;
       
    82 
       
    83 public: // from MEikScrollBarObserver
       
    84 
       
    85     virtual void HandleScrollEventL( CEikScrollBar* aScrollBar,
       
    86             TEikScrollEvent aEventType );
       
    87 
       
    88 private:
       
    89 
       
    90     /**
       
    91      * Constructor
       
    92      */
       
    93     CUiCAknScrollBarAdapter( MUiCScrollBar::MObserver& aObserver );
       
    94 
       
    95     /**
       
    96      * Destructor
       
    97      */
       
    98     ~CUiCAknScrollBarAdapter();
       
    99 
       
   100     /**
       
   101      * 2nd constructor
       
   102      */
       
   103     void ConstructL();
       
   104 
       
   105 private:
       
   106 
       
   107     // Scrollbar observer
       
   108     MUiCScrollBar::MObserver& iObserver;
       
   109 
       
   110     // Scrollbar instance
       
   111     CAknDoubleSpanScrollBar* iScrollBar;
       
   112 
       
   113     // Model for aknscrollbar
       
   114     TAknDoubleSpanScrollBarModel iModel;
       
   115 
       
   116     };
       
   117 
       
   118 #endif /* C_UICAKNSCROLLBARADAPTER_H */