fep/aknfep/UiPlugins/AknFepUiInterface/AvkonImpl/src/AknFepUiAvkonCtrlJapaneseCandidateHeadingPane.cpp
changeset 36 a7632c26d895
parent 35 0f326f2e628e
child 42 b3eaa440ab06
equal deleted inserted replaced
35:0f326f2e628e 36:a7632c26d895
     1 /*
       
     2 * Copyright (c) 2002-2004 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:            Candidate list
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 
       
    23 
       
    24 
       
    25 
       
    26 
       
    27 
       
    28 
       
    29 // INCLUDE FILES
       
    30 #include <eikdef.h>
       
    31 
       
    32 #include <aknViewAppUi.h>
       
    33 #include <avkon.hrh>
       
    34 #include <aknPopup.h>
       
    35 #include <aknlists.h>
       
    36 #include <AknsDrawUtils.h>
       
    37 #include <AknLayout.lag>
       
    38 
       
    39 #include "AknFepUiInterfacePanic.h"
       
    40 #include "AknFepUIAvkonCtrlJapaneseCandidateHeadingPane.h"
       
    41 
       
    42 // ============================ MEMBER FUNCTIONS ===============================
       
    43 
       
    44 // -----------------------------------------------------------------------------
       
    45 // CAknFepUICtrlJapaneseCandidateHeadingPane::SetParentRect
       
    46 // Set rect of parent window
       
    47 // -----------------------------------------------------------------------------
       
    48 //
       
    49 void CAknFepUICtrlJapaneseCandidateHeadingPane::SetParentRect(
       
    50         const TRect& aParentRect)
       
    51     {
       
    52     iParentRect = aParentRect;
       
    53     }
       
    54 
       
    55 // -----------------------------------------------------------------------------
       
    56 // CAknFepUICtrlJapaneseCandidateHeadingPane::SizeChanged
       
    57 // This function is called when changing window size.
       
    58 // -----------------------------------------------------------------------------
       
    59 //
       
    60 void CAknFepUICtrlJapaneseCandidateHeadingPane::SizeChanged()
       
    61     {
       
    62     LayoutListHeadingPane();
       
    63     AknsUtils::RegisterControlPosition(this);
       
    64     }
       
    65 
       
    66 // -----------------------------------------------------------------------------
       
    67 // CAknFepUICtrlJapaneseCandidateHeadingPane::ActivateL
       
    68 // This function is called when doing active
       
    69 // -----------------------------------------------------------------------------
       
    70 //
       
    71 void CAknFepUICtrlJapaneseCandidateHeadingPane::ActivateL()
       
    72     {
       
    73     CCoeControl::ActivateL();
       
    74     }
       
    75 
       
    76 // -----------------------------------------------------------------------------
       
    77 // CAknFepUICtrlJapaneseCandidateHeadingPane::CountComponentControls
       
    78 // Return a number of control in Heading Pane
       
    79 // -----------------------------------------------------------------------------
       
    80 //
       
    81 TInt CAknFepUICtrlJapaneseCandidateHeadingPane::CountComponentControls() const
       
    82     {
       
    83     return 1;
       
    84     }
       
    85 
       
    86 // -----------------------------------------------------------------------------
       
    87 // CAknFepUICtrlJapaneseCandidateHeadingPane::ComponentControl
       
    88 // Return a control object
       
    89 // -----------------------------------------------------------------------------
       
    90 //
       
    91 CCoeControl* CAknFepUICtrlJapaneseCandidateHeadingPane::ComponentControl(
       
    92         TInt /*aIndex*/) const
       
    93     {
       
    94     return Prompt();
       
    95     }
       
    96 
       
    97 // -----------------------------------------------------------------------------
       
    98 // CAknFepUICtrlJapaneseCandidateHeadingPane::LayoutListHeadingPane
       
    99 // calculate layout from LAF information
       
   100 // -----------------------------------------------------------------------------
       
   101 //
       
   102 void CAknFepUICtrlJapaneseCandidateHeadingPane::LayoutListHeadingPane()
       
   103     {
       
   104     TAknTextLineLayout textLayout =
       
   105             AKN_LAYOUT_TEXT_Candidate_selection_list_texts_Line_1;
       
   106     textLayout.il = 0;
       
   107 
       
   108     TRect parentRect(0, 0, iParentRect.Width(), iParentRect.Height());
       
   109     AknLayoutUtils::LayoutLabel(Prompt(), parentRect, textLayout);
       
   110 
       
   111     MAknsSkinInstance* skin = AknsUtils::SkinInstance();
       
   112     TRgb color;
       
   113     TInt error = AknsUtils::GetCachedColor( skin,
       
   114                                             color,
       
   115                                             KAknsIIDQsnTextColors,
       
   116                                             EAknsCIQsnTextColorsCG7 );
       
   117     if (!error)
       
   118         {
       
   119         // Ignore error
       
   120         TRAP_IGNORE( AknLayoutUtils::OverrideControlColorL(
       
   121                             *Prompt(),
       
   122                             EColorLabelText, color ) );
       
   123         }
       
   124     }
       
   125 
       
   126 // End of File