phoneuis/Ussd/src/UssdLayout.cpp
changeset 0 5f000ab63145
equal deleted inserted replaced
-1:000000000000 0:5f000ab63145
       
     1 /*
       
     2 * Copyright (c) 2002-2005 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:  Layout definitions from Application LAF
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 // INCLUDE FILES
       
    21 #include    "UssdLayout.h"
       
    22 #include    <aknenv.h>
       
    23 #include    <bldvariant.hrh>
       
    24 #include    <featmgr.h>
       
    25 #include    <applayout.cdl.h>
       
    26 #include <aknlayoutscalable_apps.cdl.h>
       
    27 
       
    28 
       
    29 // CONSTANTS
       
    30 
       
    31 #ifdef _DEBUG
       
    32 // Panic types to be used in this file.
       
    33 enum TUssdPanicTypes
       
    34     {
       
    35     EUssdPanicNOEL = 0,
       
    36     EUssdPanicPBL,
       
    37     EUssdPanicMWLE6,
       
    38     EUssdPanicMWT3,
       
    39     //
       
    40     EPhCltPanicLast
       
    41     };
       
    42 
       
    43 #endif
       
    44 
       
    45 // ============================ MEMBER FUNCTIONS ===============================
       
    46 
       
    47 
       
    48 // -----------------------------------------------------------------------------
       
    49 // UssdLayout::CurrentLayout
       
    50 // -----------------------------------------------------------------------------
       
    51 //
       
    52 TAknLayoutId UssdLayout::CurrentLayout()
       
    53     {
       
    54     TAknLayoutId layoutId;
       
    55     CAknEnv::Static()->GetCurrentLayoutId( layoutId );
       
    56     return layoutId;
       
    57     }
       
    58 
       
    59 // -----------------------------------------------------------------------------
       
    60 // UssdLayout::LayoutColourWhite
       
    61 // -----------------------------------------------------------------------------
       
    62 //
       
    63 TInt UssdLayout::LayoutColourWhite()
       
    64     {
       
    65     return 0;  // White
       
    66     }
       
    67 
       
    68 // -----------------------------------------------------------------------------
       
    69 // UssdLayout::NumberOfEditorLines
       
    70 // -----------------------------------------------------------------------------
       
    71 //
       
    72 TInt UssdLayout::NumberOfEditorLines()
       
    73     {
       
    74     TInt retVal = KErrNotFound;
       
    75 	TAknLayoutScalableParameterLimits scalbleParamLimits;
       
    76 	scalbleParamLimits = AknLayoutScalable_Apps::list_single_mce_message_pane_ParamLimits();    
       
    77     
       
    78     retVal = scalbleParamLimits.LastRow();
       
    79     return retVal;
       
    80     }
       
    81 
       
    82 // -----------------------------------------------------------------------------
       
    83 // UssdLayout::MessageWritingLayoutElements6
       
    84 // -----------------------------------------------------------------------------
       
    85 //
       
    86 UssdLayout::TWindowLineLayoutType
       
    87     UssdLayout::MessageWritingLayoutElements6( TInt aLine )
       
    88     {
       
    89     __ASSERT_ALWAYS( 
       
    90         aLine >= 1 && aLine <= NumberOfEditorLines(), 
       
    91         User::Invariant() );
       
    92 
       
    93     TInt index_C = 0;
       
    94     TInt index_T = aLine - 1;
       
    95     return 
       
    96         AppLayout::Message_writing_layout_elements_Line_6( index_C, index_T );
       
    97     }
       
    98 
       
    99 // -----------------------------------------------------------------------------
       
   100 // UssdLayout::MessageWritingTexts3
       
   101 // -----------------------------------------------------------------------------
       
   102 //
       
   103 UssdLayout::TTextLineLayoutType UssdLayout::MessageWritingTexts3()
       
   104     {
       
   105     TInt numberOfLines = NumberOfEditorLines();
       
   106     return
       
   107         AppLayout::Multiline_Message_writing_texts_Line_3( numberOfLines ); 
       
   108     }
       
   109 
       
   110 
       
   111 //  End of File