classicui_plat/ganes_api/inc/ganes/HgList.h
changeset 47 2f0c06423c72
parent 46 0e1e0022bd03
child 53 3c67ea82fafc
equal deleted inserted replaced
46:0e1e0022bd03 47:2f0c06423c72
     1 /*
       
     2 * Copyright (c) 2009 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:     
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef __HGLIST_H__
       
    20 #define __HGLIST_H__
       
    21 
       
    22 // INCLUDES
       
    23 #include <ganes/HgScroller.h>
       
    24 
       
    25 // Forward declarations
       
    26 class CAknsFrameBackgroundControlContext;
       
    27 class CFbsBitmap;
       
    28 class CGulIcon;
       
    29 class CHgListLayoutData;
       
    30 
       
    31 // CLASS DECLARATION
       
    32 class CHgList : public CHgScroller
       
    33     {
       
    34 public:
       
    35     
       
    36     /**
       
    37      * Destructor
       
    38      */
       
    39     IMPORT_C virtual ~CHgList( );
       
    40     
       
    41 protected: // CHgScroller
       
    42     virtual TInt GetSelected( TPoint aPosition ) const;
       
    43     virtual void HandleSizeChanged();
       
    44     virtual void DoDraw(const TRect& aRect ) const;
       
    45     void InitItemsL();
       
    46     virtual TSize TotalSize() const;
       
    47     void FitSelectionToView();
       
    48     virtual void FitTopItemToView( TInt aIndex );
       
    49     TInt CurrentIndex();
       
    50     TBool IsDisplayed( TInt aIndex );
       
    51     
       
    52 protected:
       
    53     void DrawHighlight( const TRect& aRect, TRgb& aTextColor ) const;
       
    54     virtual TBool DoHandleKeyEvent( const TKeyEvent& aKeyEvent );
       
    55     void ResetClippingRect( CWindowGc& aGc ) const;
       
    56     TRect ListRect() const;
       
    57 
       
    58 protected:
       
    59     virtual void DrawItem(TInt aIndex, const TRect& aRect) const = 0; 
       
    60     
       
    61 protected: // Constructors
       
    62     CHgList ( TInt aItemCount, 
       
    63             CGulIcon* aDefaultIcon );
       
    64 
       
    65     void ConstructL (const TRect& aRect, RWsSession* aSession );
       
    66 
       
    67     void HandleDownArrow();
       
    68     void HandleUpArrow();
       
    69     void SelectDefaultItem();
       
    70     
       
    71 protected: // DATA
       
    72     CHgListLayoutData* iLayoutData;
       
    73     
       
    74     TInt iRows; // Total number of rows to display
       
    75         
       
    76     TRgb iColor; // Normal item color
       
    77     TRgb iColorBack; // normal item background color
       
    78     TRgb iHighlightedColor; // color for highlighted item
       
    79     TRgb iHighlightedColorBack; // background color for highlighted item 
       
    80     
       
    81     TPoint iListOffset;
       
    82     };
       
    83 
       
    84 #endif // __HGLIST_H__
       
    85     
       
    86 // End of File