csxhelp/HelpEngine/src/CSXHKywdTOC1.cpp
branchRCL_3
changeset 17 12f60d9a73b3
parent 16 0d1adf67ec1b
child 18 cbffe13eac63
equal deleted inserted replaced
16:0d1adf67ec1b 17:12f60d9a73b3
     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:  CCSXHKywdTOC1 class definition
       
    15 *
       
    16 */
       
    17 
       
    18 #include "CSXHKywdTOC1.h"
       
    19 #include "CSXHViewIDs.h"
       
    20 #include "CSXHHelpDataBase.h"
       
    21 
       
    22 // ---------------------------------------------------------
       
    23 // Items commented in header.
       
    24 // ---------------------------------------------------------
       
    25 CCSXHKywdTOC1* CCSXHKywdTOC1::NewL(const TDesC& aName)
       
    26     {
       
    27     CCSXHKywdTOC1* self = CCSXHKywdTOC1::NewLC(aName);
       
    28     CleanupStack::Pop(self);
       
    29     return self;
       
    30     }
       
    31 
       
    32 // ---------------------------------------------------------
       
    33 // Items commented in header.
       
    34 // ---------------------------------------------------------
       
    35 CCSXHKywdTOC1* CCSXHKywdTOC1::NewLC(const TDesC& aName)
       
    36     {
       
    37     CCSXHKywdTOC1* self = new(ELeave) CCSXHKywdTOC1(aName);
       
    38     CleanupStack::PushL(self);
       
    39     return self;
       
    40     }
       
    41 
       
    42 // ---------------------------------------------------------
       
    43 // Items commented in header.
       
    44 // ---------------------------------------------------------    
       
    45 CCSXHKywdTOC1::CCSXHKywdTOC1(const TDesC& aName):
       
    46                 CCSXHGenericTOC1(aName),iLegacyIndex(-1),iTOC1HtmlList(NULL)
       
    47     {
       
    48     }
       
    49 
       
    50 // ---------------------------------------------------------
       
    51 // Items commented in header.
       
    52 // ---------------------------------------------------------    
       
    53 CCSXHKywdTOC1::~CCSXHKywdTOC1()
       
    54     {
       
    55     if(iTOC1HtmlList)
       
    56         {
       
    57         iTOC1HtmlList->Close();
       
    58         delete iTOC1HtmlList;   
       
    59         }
       
    60     }
       
    61 
       
    62 // ---------------------------------------------------------
       
    63 // Items commented in header.
       
    64 // ---------------------------------------------------------    
       
    65 TUid CCSXHKywdTOC1::GetViewID() const
       
    66     {
       
    67     return KCSXHKywdToc2ViewID;
       
    68     }
       
    69 
       
    70 // ---------------------------------------------------------
       
    71 // Items commented in header.
       
    72 // ---------------------------------------------------------    
       
    73 TInt& CCSXHKywdTOC1::LegacyIndex()
       
    74     {
       
    75     return iLegacyIndex;    
       
    76     }
       
    77 
       
    78 // ---------------------------------------------------------
       
    79 // Items commented in header.
       
    80 // ---------------------------------------------------------    
       
    81 void CCSXHKywdTOC1::AppendHtmlTOC1L(CCSXHHtmlTOC1* aToc1)
       
    82     {
       
    83     if(NULL == iTOC1HtmlList)
       
    84         iTOC1HtmlList = new(ELeave) RPointerArray<CCSXHHtmlTOC1>;
       
    85     iTOC1HtmlList->Append(aToc1);
       
    86     }
       
    87     
       
    88 // ---------------------------------------------------------
       
    89 // Items commented in header.
       
    90 // ---------------------------------------------------------    
       
    91 RPointerArray<CCSXHHtmlTOC1>* CCSXHKywdTOC1::GetHtmlTOC1List()
       
    92     {
       
    93     return iTOC1HtmlList;
       
    94     }
       
    95 
       
    96 // ---------------------------------------------------------
       
    97 // Items commented in header.
       
    98 // ---------------------------------------------------------
       
    99 void CCSXHKywdTOC1::InitChildList()
       
   100     {
       
   101     if(iChildList != NULL)
       
   102         return;
       
   103     ConstructChildList();
       
   104     TRAP_IGNORE(CCSXHHelpDataBase::GetInstance()->GenerateKeywordTOC2ListL(this));
       
   105     }
       
   106