vtuis/videotelui/src/features/menu/tvtuimenucommanditerator.cpp
branchRCL_3
changeset 24 f15ac8e65a02
parent 23 890b5dd735f8
child 25 779871d1e4f4
equal deleted inserted replaced
23:890b5dd735f8 24:f15ac8e65a02
     1 /*
       
     2 * Copyright (c) 2006 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:  Menu command iterator.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #include <eikmenup.h>
       
    20 
       
    21 #include "tvtuimenucommanditerator.h"
       
    22 
       
    23 // ======== LOCAL FUNCTIONS ========
       
    24 
       
    25 // ======== MEMBER FUNCTIONS ========
       
    26 
       
    27 // ---------------------------------------------------------------------------
       
    28 // TVtUiMenuCommandIterator::TVtUiMenuCommandIterator
       
    29 // ---------------------------------------------------------------------------
       
    30 //
       
    31 TVtUiMenuCommandIterator::TVtUiMenuCommandIterator( CEikMenuPane& aMenuPane )
       
    32 : iMenuPane( &aMenuPane ), iCurrent( 0 )
       
    33     {
       
    34     }
       
    35 
       
    36 // ---------------------------------------------------------------------------
       
    37 // TVtUiMenuCommandIterator::HasNext
       
    38 // ---------------------------------------------------------------------------
       
    39 //
       
    40 TBool TVtUiMenuCommandIterator::HasNext() const
       
    41     {
       
    42     return ( iCurrent < iMenuPane->NumberOfItemsInPane() );
       
    43     }
       
    44 
       
    45 // ---------------------------------------------------------------------------
       
    46 // TVtUiMenuCommandIterator::Next
       
    47 // ---------------------------------------------------------------------------
       
    48 //
       
    49 TInt TVtUiMenuCommandIterator::Next()
       
    50     {
       
    51     return iMenuPane->MenuItemCommandId( iCurrent++ );
       
    52     }
       
    53