uiacceltk/hitchcock/Client/src/alflcttextvisual.cpp
changeset 0 15bf7259bb7c
equal deleted inserted replaced
-1:000000000000 0:15bf7259bb7c
       
     1 /*
       
     2 * Copyright (c) 2007 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:   LCT Text visual
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #include "alf/alflcttextvisual.h"
       
    21 #include "alf/alfcontrol.h"
       
    22 #include "alf/alfconstants.h"
       
    23 #include "alf/alfgencomponent.h"
       
    24 #include "alflogger.h"
       
    25 #include "alfuids.h"
       
    26 
       
    27 #include <uiacceltk/HuiUtil.h>
       
    28 
       
    29 #ifdef RD_ALF_IN_PLATFORM
       
    30 #include <aknlayout2hierarchy.h>
       
    31 #endif
       
    32 
       
    33 struct CAlfLCTTextVisual::TLCTTextVisualPrivateData
       
    34     {
       
    35     };
       
    36 
       
    37 
       
    38 // ======== MEMBER FUNCTIONS ========
       
    39 
       
    40 // ---------------------------------------------------------------------------
       
    41 // Constructor
       
    42 // ---------------------------------------------------------------------------
       
    43 //
       
    44 EXPORT_C CAlfLCTTextVisual::CAlfLCTTextVisual()
       
    45     :
       
    46     iLCTTextVisualData(NULL)
       
    47     {
       
    48     }
       
    49 
       
    50 
       
    51 // ---------------------------------------------------------------------------
       
    52 // ConstructL
       
    53 // ---------------------------------------------------------------------------
       
    54 //
       
    55 EXPORT_C void CAlfLCTTextVisual::ConstructL(CAlfControl& aOwner)
       
    56     {
       
    57     CAlfTextVisual::ConstructL(aOwner);
       
    58     }
       
    59 
       
    60 
       
    61 // ---------------------------------------------------------------------------
       
    62 // Destructor
       
    63 // ---------------------------------------------------------------------------
       
    64 //
       
    65 EXPORT_C CAlfLCTTextVisual::~CAlfLCTTextVisual()
       
    66     {
       
    67     delete iLCTTextVisualData;
       
    68     iLCTTextVisualData = NULL;
       
    69     }
       
    70 
       
    71 
       
    72 // ---------------------------------------------------------------------------
       
    73 // Creates new CAlfLCTTextVisual
       
    74 // ---------------------------------------------------------------------------
       
    75 //
       
    76 EXPORT_C CAlfLCTTextVisual* CAlfLCTTextVisual::AddNewL(
       
    77     CAlfControl& aOwnerControl,
       
    78     CAlfLayout* aParentLayout)
       
    79     {
       
    80     CAlfLCTTextVisual* text = STATIC_CAST(CAlfLCTTextVisual*,
       
    81         aOwnerControl.AppendVisualL(EAlfVisualTypeLCTText, aParentLayout));
       
    82     return text;
       
    83     }
       
    84     
       
    85 
       
    86 
       
    87 // ---------------------------------------------------------------------------
       
    88 // Sets the layout component handle for the text pane
       
    89 // ---------------------------------------------------------------------------
       
    90 //
       
    91 #ifdef RD_ALF_IN_PLATFORM            
       
    92 EXPORT_C void CAlfLCTTextVisual::SetTextPane(TAknLayoutHierarchyComponentHandle& aComponentHandle)
       
    93     {
       
    94     TAlfLCTTextVisualSetTextPaneParams params;
       
    95     
       
    96     params.iApiId = aComponentHandle.ApiId();
       
    97     params.iComponentId = aComponentHandle.ComponentId();
       
    98     params.iOptionIndex = 0; // not used yet
       
    99     params.iDrawingOrderIndex = 0;  // not used yet
       
   100     params.iVarietyIndex = aComponentHandle.VarietyIndex();
       
   101     params.iColumn = aComponentHandle.Column();
       
   102     params.iRow = aComponentHandle.Row();
       
   103     
       
   104     TPckg<TAlfLCTTextVisualSetTextPaneParams> paramsPckg(params);
       
   105 
       
   106     TInt err = Comms()->DoCmdNoReply(EAlfLCTTextVisualSetTextPane, paramsPckg );
       
   107     if ( err == KErrNone )
       
   108         {
       
   109         __ALFLOGSTRING( "LCTTextVisualSetTextPane ok" )
       
   110         }
       
   111     else
       
   112         {
       
   113         __ALFLOGSTRING1( "LCTTxtVisualSetTextPane return error %d", err )
       
   114         USER_INVARIANT(); 
       
   115         }
       
   116     }
       
   117 #else // RD_ALF_IN_PLATFORM            
       
   118 EXPORT_C void CAlfLCTTextVisual::SetTextPane(TAknLayoutHierarchyComponentHandle& /*aComponentHandle*/)
       
   119     {
       
   120     }
       
   121 #endif // RD_ALF_IN_PLATFORM            
       
   122     
       
   123 
       
   124 // ---------------------------------------------------------------------------
       
   125 // Place holder from CAlfVisual
       
   126 // ---------------------------------------------------------------------------
       
   127 //     
       
   128 EXPORT_C void CAlfLCTTextVisual::RemoveAndDestroyAllD()
       
   129     {
       
   130     CAlfTextVisual::RemoveAndDestroyAllD();
       
   131     }
       
   132   
       
   133 // ---------------------------------------------------------------------------
       
   134 // Place holder from CAlfVisual
       
   135 // ---------------------------------------------------------------------------
       
   136 //  
       
   137 EXPORT_C void CAlfLCTTextVisual::UpdateChildrenLayout(TInt aTransitionTime )
       
   138     {
       
   139     CAlfTextVisual::UpdateChildrenLayout( aTransitionTime );
       
   140     }
       
   141   
       
   142 // ---------------------------------------------------------------------------
       
   143 // Place holder from CAlfVisual
       
   144 // ---------------------------------------------------------------------------
       
   145 //  
       
   146 EXPORT_C CAlfVisual* CAlfLCTTextVisual::FindTag(const TDesC8& aTag)
       
   147     {
       
   148     return CAlfTextVisual::FindTag( aTag );
       
   149     }
       
   150 
       
   151 
       
   152 // ---------------------------------------------------------------------------
       
   153 // Place holder from CAlfVisual
       
   154 // ---------------------------------------------------------------------------
       
   155 //  
       
   156 EXPORT_C void CAlfLCTTextVisual::DoRemoveAndDestroyAllD()
       
   157     {
       
   158     CAlfTextVisual::DoRemoveAndDestroyAllD();
       
   159     }
       
   160     
       
   161 
       
   162 // ---------------------------------------------------------------------------
       
   163 //  future proofing  
       
   164 // ---------------------------------------------------------------------------
       
   165 //  
       
   166 EXPORT_C void CAlfLCTTextVisual::PropertyOwnerExtension(const TUid& aExtensionUid, TAny** aExtensionParams)
       
   167     {
       
   168     CAlfTextVisual::PropertyOwnerExtension(aExtensionUid,aExtensionParams);
       
   169     }
       
   170     
       
   171 // end of file