vtuis/videotelui/src/features/menu/cvtuimenucontext.cpp
branchRCL_3
changeset 35 779871d1e4f4
parent 0 ed9695c8bcbe
equal deleted inserted replaced
34:f15ac8e65a02 35:779871d1e4f4
       
     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 context class.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #include <cvtlogger.h>
       
    20 
       
    21 #include "cvtuimenucontext.h"
       
    22 
       
    23 /** Menu context reference priority */
       
    24 const TInt KVtUiMenuContextPriority = 100;
       
    25 
       
    26 // ---------------------------------------------------------------------------
       
    27 // CVtUiMenuContext::~CVtUiMenuContext
       
    28 // ---------------------------------------------------------------------------
       
    29 //
       
    30 CVtUiMenuContext::~CVtUiMenuContext()
       
    31     {
       
    32     __VTPRINTENTER( "MenuCtx.~" )
       
    33     UnregisterCommandContext();
       
    34     __VTPRINTEXIT( "MenuCtx.~" )
       
    35     }
       
    36 
       
    37 // ---------------------------------------------------------------------------
       
    38 // CVtUiMenuContext::NewL
       
    39 // ---------------------------------------------------------------------------
       
    40 //
       
    41 CVtUiMenuContext* CVtUiMenuContext::NewL(
       
    42     MVtUiCommandManager& aCommandManager )
       
    43     {
       
    44     __VTPRINTENTER( "MenuCtx.NewL" )
       
    45     CVtUiMenuContext* self = new ( ELeave ) CVtUiMenuContext( aCommandManager );
       
    46     CleanupStack::PushL( self );
       
    47     self->ConstructL();
       
    48     CleanupStack::Pop(); // self
       
    49     __VTPRINTEXIT( "MenuCtx.NewL" )
       
    50     return self;
       
    51     }
       
    52 
       
    53 // ---------------------------------------------------------------------------
       
    54 // CVtUiMenuContext::ValidateL
       
    55 // ---------------------------------------------------------------------------
       
    56 //
       
    57 void CVtUiMenuContext::ValidateL( CVtUiCmdValidationActionBase& aAction )
       
    58     {
       
    59     __VTPRINTENTER( "MenuCtx.ValidateL" )
       
    60     ValidateMenuItemsL( aAction );
       
    61     __VTPRINTEXIT( "MenuCtx.ValidateL" )
       
    62     }
       
    63 
       
    64 // ---------------------------------------------------------------------------
       
    65 // CVtUiMenuContext::CVtUiMenuContext
       
    66 // ---------------------------------------------------------------------------
       
    67 //
       
    68 CVtUiMenuContext::CVtUiMenuContext( MVtUiCommandManager& aCommandManager )
       
    69     : CVtUiCmdContext( aCommandManager, EVtUiCmdContextTypeMenu,
       
    70       KVtUiMenuContextPriority )
       
    71     {
       
    72     __VTPRINTENTER( "MenuCtx.ctor" )
       
    73     __VTPRINTEXIT( "MenuCtx.ctor" )
       
    74     }
       
    75 
       
    76 // ---------------------------------------------------------------------------
       
    77 // CVtUiMenuContext::ConstructL
       
    78 // ---------------------------------------------------------------------------
       
    79 //
       
    80 void CVtUiMenuContext::ConstructL()
       
    81     {
       
    82     __VTPRINTENTER( "MenuCtx.ConstructL" )
       
    83     RegisterCommandContextL();
       
    84     __VTPRINTEXIT( "MenuCtx.ConstructL" )
       
    85     }