notepad/notepad1/LibSrc/NpdTemplateListBox.cpp
changeset 0 f979ecb2b13e
equal deleted inserted replaced
-1:000000000000 0:f979ecb2b13e
       
     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:  Implementation of List of Templates.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 // INCLUDE FILES
       
    20 #include <barsread.h>
       
    21 #include <NpdLib.rsg>
       
    22 #include "NpdTemplateListBox.h"
       
    23 #include "NpdListDialog.h"
       
    24 
       
    25 // ============================ MEMBER FUNCTIONS ===============================
       
    26 
       
    27 // -----------------------------------------------------------------------------
       
    28 // CNotepadTemplateListBox::HandlePointerEventL
       
    29 // 
       
    30 // Handle the pointer events.
       
    31 // 
       
    32 // -----------------------------------------------------------------------------
       
    33 //
       
    34 void CNotepadTemplateListBox::HandlePointerEventL( const TPointerEvent& aPointerEvent )
       
    35     {
       
    36 	  if ( aPointerEvent.iType == TPointerEvent::EButton1Up )
       
    37 	    {
       
    38 	    if( aPointerEvent.iModifiers & EModifierShift )
       
    39 	        {
       
    40 	        STATIC_CAST( CNotepadListDialog*,&iParent )->MiddleSoftKeyL();
       
    41 	        }
       
    42         else if ( Model()->NumberOfItems() == 0 )
       
    43             {
       
    44             STATIC_CAST( CNotepadListDialog*,&iParent )->HandleListBoxPointerEventL( CNotepadListDialog::EOpenListBoxContextMenu );
       
    45             }
       
    46 	    }
       
    47 	 CAknSingleGraphicStyleListBox::HandlePointerEventL( aPointerEvent );
       
    48 
       
    49     }
       
    50 
       
    51 // -----------------------------------------------------------------------------
       
    52 // CNotepadTemplateListBox::CNotepadTemplateListBox
       
    53 // 
       
    54 // The constructor of CNotepadTemplateListBox.
       
    55 // 
       
    56 // -----------------------------------------------------------------------------
       
    57 //
       
    58 CNotepadTemplateListBox::CNotepadTemplateListBox( CNotepadDialogBase& aParent )
       
    59                          :CAknSingleGraphicStyleListBox(), iParent( aParent ), iPreviousIndex( 0 )
       
    60     {
       
    61     }
       
    62 // End of File