vtuis/videotelui/src/features/toolbar/tvtuitoolbarcommanditerator.cpp
branchRCL_3
changeset 24 f15ac8e65a02
parent 23 890b5dd735f8
child 25 779871d1e4f4
equal deleted inserted replaced
23:890b5dd735f8 24:f15ac8e65a02
     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:  Toolbar command iterator implementation.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #include "cvtuitoolbarbase.h"
       
    20 #include "tvtuitoolbarcommanditerator.h"
       
    21 
       
    22 // ======== LOCAL FUNCTIONS ========
       
    23 
       
    24 // ======== MEMBER FUNCTIONS ========
       
    25 
       
    26 // ---------------------------------------------------------------------------
       
    27 // TVtUiToolbarCommandIterator::TVtUiToolbarCommandIterator
       
    28 // ---------------------------------------------------------------------------
       
    29 //
       
    30 TVtUiToolbarCommandIterator::TVtUiToolbarCommandIterator( CVtUiToolbarBase&
       
    31     aToolbar ) : iToolbar( &aToolbar ), iCurrent( 0 )
       
    32     {
       
    33     }
       
    34 
       
    35 // ---------------------------------------------------------------------------
       
    36 // TVtUiToolbarCommandIterator::HasNext
       
    37 // ---------------------------------------------------------------------------
       
    38 //
       
    39 TBool TVtUiToolbarCommandIterator::HasNext() const
       
    40     {
       
    41     return ( iCurrent < iToolbar->NumberOfToolbarControls() );
       
    42     }
       
    43 
       
    44 // ---------------------------------------------------------------------------
       
    45 // TVtUiToolbarCommandIterator::Next
       
    46 // ---------------------------------------------------------------------------
       
    47 //
       
    48 TInt TVtUiToolbarCommandIterator::Next()
       
    49     {
       
    50     return iToolbar->CommandIdByCmdIdsArrayIndex( iCurrent++ );
       
    51     }
       
    52     
       
    53 //  End of File