idlehomescreen/xmluirendering/uiengine/inc/xnviewdata.inl
changeset 0 f72a12da539e
child 9 f966699dea19
equal deleted inserted replaced
-1:000000000000 0:f72a12da539e
       
     1 /*
       
     2 * Copyright (c) 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:  Data class to hold view info - inline functions
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef _XNVIEWDATA_INL_
       
    20 #define _XNVIEWDATA_INL_
       
    21 
       
    22 // ---------------------------------------------------------------------------
       
    23 // Returns if active or not
       
    24 // ---------------------------------------------------------------------------
       
    25 //
       
    26 inline TBool CXnViewData::Active() const
       
    27     {
       
    28     return ( iFlags.IsSet( EIsActive ) ? ETrue : EFalse );
       
    29     };
       
    30 
       
    31 // ---------------------------------------------------------------------------
       
    32 // Sets viewdata to be initial
       
    33 // ---------------------------------------------------------------------------
       
    34 //
       
    35 inline void CXnViewData::SetInitial() 
       
    36     {
       
    37     iFlags.Set( EIsInitial );
       
    38     };
       
    39 
       
    40 // ---------------------------------------------------------------------------
       
    41 // Returns if initial or not
       
    42 // ---------------------------------------------------------------------------
       
    43 //
       
    44 inline TBool CXnViewData::Initial() const 
       
    45     {
       
    46     return ( iFlags.IsSet( EIsInitial ) ? ETrue : EFalse );
       
    47     };
       
    48 
       
    49 // ---------------------------------------------------------------------------
       
    50 // Sets focused node
       
    51 // ---------------------------------------------------------------------------
       
    52 //
       
    53 inline void CXnViewData::SetFocusedNode( CXnNode* aNode )
       
    54     {
       
    55     iFocusedNode = aNode;
       
    56     };
       
    57 
       
    58 // ---------------------------------------------------------------------------
       
    59 // Returns focused node
       
    60 // ---------------------------------------------------------------------------
       
    61 //
       
    62 inline CXnNode* CXnViewData::FocusedNode() const
       
    63     {
       
    64     return iFocusedNode;
       
    65     };
       
    66 
       
    67 // ---------------------------------------------------------------------------
       
    68 // Sets to use empty widget
       
    69 // ---------------------------------------------------------------------------
       
    70 //
       
    71 inline void CXnViewData::SetUseEmptyWidget( TBool aUse )
       
    72     {
       
    73     if( aUse )
       
    74         {
       
    75         iFlags.Set( EUseEmpty );        
       
    76         }
       
    77     else
       
    78         {
       
    79         iFlags.Clear( EUseEmpty );        
       
    80         }    
       
    81     };
       
    82 
       
    83 // ---------------------------------------------------------------------------
       
    84 // Returns whether to use empty widget
       
    85 // ---------------------------------------------------------------------------
       
    86 //
       
    87 inline TBool CXnViewData::UseEmptyWidget() const
       
    88     {
       
    89     return ( iFlags.IsSet( EUseEmpty ) ? ETrue : EFalse );
       
    90     };
       
    91 
       
    92 #endif // _XNVIEWDATA_INL_