landmarksui/uicontrols/src/CLmkAppSelectorImplBase.cpp
branchRCL_3
changeset 17 1fc85118c3ae
parent 16 8173571d354e
child 18 870918037e16
equal deleted inserted replaced
16:8173571d354e 17:1fc85118c3ae
     1 /*
       
     2 * Copyright (c) 2002-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:  This is a base class for Selector implementation
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 // INCLUDE FILES
       
    21 #include <avkon.mbg>
       
    22 #include <AknsConstants.h>
       
    23 #include <aknlists.h>
       
    24 #include <eikclbd.h>
       
    25 #include <AknIconArray.h>
       
    26 #include <StringLoader.h>
       
    27 #include <landmarks.rsg>
       
    28 #include <aknsfld.h>
       
    29 #include <aknlayout.cdl.h>
       
    30 #include "LmkConsts.h"
       
    31 #include "CLmkSelectorIconMgr.h"
       
    32 #include "MLmkListMemento.h"
       
    33 #include "CLmkUiUtils.h"
       
    34 #include "CLmkSingleGraphicLBModel.h"
       
    35 #include "CLmkDoubleGraphicLBModel.h"
       
    36 #include "CLmkAppSelectorImplBase.h"
       
    37 #include "MLmkMskObserver.h"
       
    38 #include "CLmkLmItemListProvider.h"
       
    39 #include <lmkerrors.h>
       
    40 
       
    41 #include <lmkui.rsg>
       
    42 
       
    43 
       
    44 const TInt KTextLimit( 40 );
       
    45 _LIT(KFetchingData, " ");
       
    46 #if defined(_DEBUG)
       
    47 // CONSTANTS
       
    48 /// Unnamed namespace for local definitions
       
    49 namespace {
       
    50 
       
    51 _LIT( KPanicMsg, "CLmkAppSelectorImplBase" );
       
    52 
       
    53 void Panic( TPanicCode aReason )
       
    54     {
       
    55     User::Panic( KPanicMsg, aReason );
       
    56     }
       
    57 }  // namespace
       
    58 
       
    59 #endif
       
    60 // ============================ MEMBER FUNCTIONS ===============================
       
    61 
       
    62 // -----------------------------------------------------------------------------
       
    63 // CLmkAppSelectorImplBase::CLmkAppSelectorImplBase
       
    64 // C++ default constructor can NOT contain any code, that
       
    65 // might leave.
       
    66 // -----------------------------------------------------------------------------
       
    67 //
       
    68 CLmkAppSelectorImplBase::CLmkAppSelectorImplBase(
       
    69     CPosLandmarkDatabase& aDb,
       
    70     TBool aFindBox )
       
    71     : CLmkSelectorImplBase( aDb ),
       
    72       iFindBox( aFindBox )
       
    73     {
       
    74     }
       
    75 
       
    76 // -----------------------------------------------------------------------------
       
    77 // CLmkAppSelectorImplBase::BaseConstructL
       
    78 // Symbian 2nd phase constructor can leave.
       
    79 // -----------------------------------------------------------------------------
       
    80 //
       
    81 void CLmkAppSelectorImplBase::BaseConstructL()
       
    82     {
       
    83     CLmkSelectorImplBase::BaseConstructL();
       
    84     }
       
    85 
       
    86 // -----------------------------------------------------------------------------
       
    87 // CLmkAppSelectorImplBase::~CLmkAppSelectorImplBase
       
    88 // -----------------------------------------------------------------------------
       
    89 //
       
    90 CLmkAppSelectorImplBase::~CLmkAppSelectorImplBase()
       
    91     {
       
    92     delete iListBox;
       
    93     }
       
    94 
       
    95 // -----------------------------------------------------------------------------
       
    96 // CLmkAppSelectorImplBase::StoreMemento
       
    97 // -----------------------------------------------------------------------------
       
    98 //
       
    99 EXPORT_C void CLmkAppSelectorImplBase::StoreMemento()
       
   100     {
       
   101     __ASSERT_DEBUG( iListBox && iListProvider, Panic( KLmkPanicNullMember ) );
       
   102     Store( *iListBox, *iListProvider, iFindBox );
       
   103     }
       
   104 
       
   105 // -----------------------------------------------------------------------------
       
   106 // CLmkAppSelectorImplBase::RestoreMemento
       
   107 // -----------------------------------------------------------------------------
       
   108 //
       
   109 EXPORT_C void CLmkAppSelectorImplBase::RestoreMemento()
       
   110     {
       
   111     __ASSERT_DEBUG( iListBox && iListProvider, Panic( KLmkPanicNullMember ) );
       
   112     Restore( *iListBox, *iListProvider, iFindBox );
       
   113     }
       
   114 
       
   115 // -----------------------------------------------------------------------------
       
   116 // CLmkAppSelectorImplBase::ListVisibleItemCount
       
   117 // -----------------------------------------------------------------------------
       
   118 //
       
   119 TInt CLmkAppSelectorImplBase::ListVisibleItemCount()
       
   120     {
       
   121     __ASSERT_DEBUG( iListBox, Panic( KLmkPanicNullMember ) );
       
   122     return iListBox->Model()->NumberOfItems();
       
   123     }
       
   124 
       
   125 // -----------------------------------------------------------------------------
       
   126 // CLmkAppSelectorImplBase::ListMarkedItemCountL
       
   127 // -----------------------------------------------------------------------------
       
   128 //
       
   129 TInt CLmkAppSelectorImplBase::ListMarkedItemCountL()
       
   130     {
       
   131     __ASSERT_DEBUG( iListBox, Panic( KLmkPanicNullMember ) );
       
   132     const CArrayFix<TInt>* markedIndexes = NULL;
       
   133     if ( iFindBox )
       
   134         {
       
   135         CAknFilteredTextListBoxModel* model =
       
   136             static_cast<CAknFilteredTextListBoxModel*>( iListBox->Model() );
       
   137         model->Filter()->UpdateSelectionIndexesL();
       
   138         markedIndexes = model->Filter()->SelectionIndexes();
       
   139         }
       
   140     else
       
   141         {
       
   142         markedIndexes = iListBox->SelectionIndexes();
       
   143         }
       
   144     return markedIndexes->Count();
       
   145     }
       
   146 
       
   147 // -----------------------------------------------------------------------------
       
   148 // CLmkAppSelectorImplBase::CreateListBoxL
       
   149 // -----------------------------------------------------------------------------
       
   150 //
       
   151 CEikTextListBox& CLmkAppSelectorImplBase::CreateListBoxL(
       
   152     CCoeControl* aParent,
       
   153     TInt aControlType,
       
   154     TInt aFlags,
       
   155     TInt aEmptyLBPrimResource,TInt aEmptyLBSecResource )
       
   156     {
       
   157     if ( iListBox )
       
   158         {
       
   159         delete iListBox;
       
   160         iListBox = NULL;
       
   161         }
       
   162 
       
   163     // For maintaining empty listbox resource
       
   164     iEmptyLBPrimResource = aEmptyLBPrimResource;
       
   165     iEmptyLBSecResource = aEmptyLBSecResource;
       
   166 
       
   167     TBool isFormattedCellListBox = EFalse;
       
   168     switch ( aControlType )
       
   169         {
       
   170         case EAknCtSingleGraphicListBox:
       
   171             {
       
   172             iListBox = new( ELeave ) CAknSingleGraphicStyleListBox;
       
   173             break;
       
   174             }
       
   175         case EAknCtDoubleGraphicListBox:
       
   176             {
       
   177             iListBox = new( ELeave ) CAknDoubleGraphicStyleListBox;
       
   178             isFormattedCellListBox = ETrue;
       
   179             break;
       
   180             }
       
   181         default:
       
   182             {
       
   183             User::Leave( KErrNotSupported );
       
   184             break;
       
   185             }
       
   186         }
       
   187 
       
   188     iListBox->SetMopParent(aParent);
       
   189     iListBox->SetParent(aParent);
       
   190     iListBox->ConstructL( aParent, aFlags );
       
   191 
       
   192 	HBufC* textForFetchingData;
       
   193 	textForFetchingData = HBufC::NewL(20);
       
   194 	CleanupStack::PushL(textForFetchingData);  // textForFetchingData
       
   195 	*textForFetchingData = KFetchingData;
       
   196     iListBox->View()->SetListEmptyTextL( *textForFetchingData);
       
   197     CleanupStack::PopAndDestroy();  // textForFetchingData.
       
   198 
       
   199     // create icon array & icons
       
   200     CAknIconArray* icons = SetupIconMgrLC();
       
   201 	TFileName* iconFile = CLmkUiUtils::AvkonIconFileLC();
       
   202     iIconMgr->SetIconAtIndexZeroL( *iconFile,
       
   203                                    KAknsIIDQgnIndiMarkedAdd,
       
   204                                    EMbmAvkonQgn_indi_marked_add,
       
   205                                    EMbmAvkonQgn_indi_marked_add_mask );
       
   206 
       
   207     if ( isFormattedCellListBox )
       
   208 	    {
       
   209 	    ( static_cast<CEikFormattedCellListBox*>( iListBox ) )
       
   210             ->ItemDrawer()->FormattedCellData()->SetIconArray( icons );
       
   211          ((CEikFormattedCellListBox*)iListBox)->ItemDrawer()->FormattedCellData()
       
   212 		            ->EnableMarqueeL( ETrue );
       
   213 	    }
       
   214     else
       
   215 	    {
       
   216 	    ( static_cast<CEikColumnListBox*>( iListBox ) )
       
   217             ->ItemDrawer()->ColumnData()->SetIconArray( icons );
       
   218           ((CEikColumnListBox*)iListBox)->ItemDrawer()->ColumnData()->EnableMarqueeL( ETrue );
       
   219 	    }
       
   220 	CleanupStack::PopAndDestroy(); // iconFile
       
   221     CleanupStack::Pop( icons ); // ownership was transferred
       
   222 
       
   223     // create listbox model for listbox
       
   224     CreateListBoxModelL( *iListBox, aControlType, *iListProvider );
       
   225     return *iListBox;
       
   226     }
       
   227 
       
   228 // -----------------------------------------------------------------------------
       
   229 // CLmkAppSelectorImplBase::HandleListProviderEvent
       
   230 // -----------------------------------------------------------------------------
       
   231 //
       
   232 void CLmkAppSelectorImplBase::HandleListProviderEvent(
       
   233     TLmkListProviderEventType aEvent )
       
   234     {
       
   235     if( !iListBox )
       
   236         return;
       
   237     
       
   238     if ( aEvent == ELmkEventItemAdditionComplete )
       
   239     	{
       
   240         TRAPD( error, iListBox->HandleItemAdditionL() );
       
   241         if ( error != KErrNone )
       
   242             {
       
   243             iListBox->Reset();
       
   244             iListBox->DrawNow();
       
   245             }
       
   246     	return;
       
   247     	}
       
   248     if ( aEvent == ELmkEventListReady || aEvent == ELmkEventFindListReady )
       
   249         {
       
   250         TBool handled( EFalse );
       
   251         TRAPD( error, handled = HandleEventListReadyL() );
       
   252         if ( !handled || error != KErrNone )
       
   253             {
       
   254             //CLmkLmItemListProvider& lstpr = static_cast<CLmkLmItemListProvider&>( *iListProvider );
       
   255             //TInt currentItemIndex = lstpr.SelectedIndex(iNewLmkItemId);	    //iListBox->CurrentItemIndex();
       
   256             TInt currentItemIndex = iListBox->CurrentItemIndex();
       
   257             TRAP( error, iListBox->HandleItemAdditionL() );
       
   258 			if( currentItemIndex >= 0 && currentItemIndex < iListBox->Model()->NumberOfItems() )
       
   259 				iListBox->SetCurrentItemIndex(currentItemIndex);
       
   260             if ( error != KErrNone )
       
   261                 {
       
   262                 iListBox->DrawNow();
       
   263                 }
       
   264             }
       
   265         }
       
   266 
       
   267     TInt count = static_cast<CTextListBoxModel*>(iListBox->Model())->ItemTextArray()->MdcaCount();
       
   268     if( count == 0 )
       
   269         {
       
   270         TRAPD( error, MakeEmptyTextListBoxL( *iListBox, iEmptyLBPrimResource,iEmptyLBSecResource ));
       
   271         if( error != KErrNone )
       
   272             {
       
   273             return;
       
   274             }
       
   275         }
       
   276 
       
   277     //Enable Find box only if at least one item is there in the list box
       
   278 	if( count )
       
   279 		{
       
   280 		if( aEvent != ELmkEventFindListReady )
       
   281 			{
       
   282 			TRAP_IGNORE( ShowFindBoxL( ETrue ) );
       
   283 			}
       
   284 		CLmkSelectorImplBase::HandleListProviderEvent( aEvent );
       
   285 		}
       
   286     else
       
   287 	    {
       
   288 	    if ( aEvent == ELmkEventFindListReady )
       
   289 		    {
       
   290 		    TRAPD( error, MakeEmptyTextListBoxL( *iListBox, iEmptyLBPrimResource,iEmptyLBSecResource, ETrue ));
       
   291 		    if( error != KErrNone )
       
   292 		    	{
       
   293 		        return;
       
   294 		        }
       
   295 		    }
       
   296 		else
       
   297 			{
       
   298 	        TRAPD( error, MakeEmptyTextListBoxL( *iListBox, iEmptyLBPrimResource,iEmptyLBSecResource ));
       
   299 	        if( error != KErrNone )
       
   300 	            {
       
   301 	            return;
       
   302 	            }
       
   303 			TRAP_IGNORE( ShowFindBoxL( EFalse ) );
       
   304 			}
       
   305 	    }
       
   306 	if(iMskObserver)
       
   307 		{
       
   308 		TRAP_IGNORE(iMskObserver->UpdateMskContainerL());
       
   309 		}
       
   310     }
       
   311 
       
   312 // -----------------------------------------------------------------------------
       
   313 // CLmkAppSelectorImplBase::HandleListProviderError
       
   314 // -----------------------------------------------------------------------------
       
   315 //
       
   316 void CLmkAppSelectorImplBase::HandleListProviderError( TInt /*aError*/ )
       
   317     {
       
   318     if ( iListBox )
       
   319         {
       
   320         iListBox->Reset();
       
   321         TRAPD( error, iListBox->HandleItemAdditionL() );
       
   322         if ( error != KErrNone )
       
   323             {
       
   324             iListBox->DrawNow();
       
   325             }
       
   326         }
       
   327     }
       
   328 
       
   329 // ----------------------------------------------------
       
   330 // CLmkAppSelectorImplBase::MakeEmptyTextListBoxL
       
   331 // ----------------------------------------------------
       
   332 //
       
   333  void CLmkAppSelectorImplBase::MakeEmptyTextListBoxL(
       
   334     CEikTextListBox& aListBox,
       
   335     TInt aResourcePrimText ,TInt aResourceSecText, TBool aRequestFromFindBox ) const
       
   336     {
       
   337     _LIT( KNChar,"\n" );
       
   338 
       
   339     if (aRequestFromFindBox)
       
   340 	    {
       
   341 	    HBufC* text1 = StringLoader::LoadLC( R_LMK_EMPTY_NO_MATCH, const_cast<CEikonEnv *>( iEnv ));
       
   342 		TPtr ptr1 = text1->Des();
       
   343 		aListBox.View()->SetListEmptyTextL( ptr1 );
       
   344 		CleanupStack::PopAndDestroy(text1);
       
   345 	    }
       
   346     else
       
   347 	    {
       
   348 		HBufC* text1 = StringLoader::LoadLC( aResourcePrimText, const_cast<CEikonEnv *>( iEnv ));
       
   349 		HBufC* text2 = StringLoader::LoadLC( aResourceSecText, const_cast<CEikonEnv *>( iEnv ));
       
   350 
       
   351 		TPtr ptr1 = text1->Des();
       
   352 		TPtr ptr2 = text2->Des();
       
   353 
       
   354 		HBufC* buffer = HBufC::NewLC(text1->Length() + text2->Length() + 2);
       
   355 		TPtr textFromResourceFile = buffer->Des();
       
   356     	textFromResourceFile.Copy(ptr1);
       
   357     	textFromResourceFile.Append(KNChar);
       
   358     	textFromResourceFile.Append(ptr2);
       
   359 
       
   360  		aListBox.View()->SetListEmptyTextL( textFromResourceFile );
       
   361 		CleanupStack::PopAndDestroy(3);//buffer,text2,text1
       
   362 	    }
       
   363     }
       
   364 
       
   365 // ----------------------------------------------------
       
   366 // CLmkAppSelectorImplBase::CreateListBoxModelL
       
   367 // ----------------------------------------------------
       
   368 //
       
   369 void CLmkAppSelectorImplBase::CreateListBoxModelL(
       
   370     CEikTextListBox& aListBox,
       
   371     TInt aControlType,
       
   372     CLmkListProviderBase& aProvider ) const
       
   373     {
       
   374     CLmkSelectorLBModelBase* lbModel = NULL;
       
   375     // create listbox model, pass ownership
       
   376     switch( aControlType )
       
   377         {
       
   378         case EAknCtSingleGraphicListBox:
       
   379             {
       
   380             lbModel = CLmkSingleGraphicLBModel::NewL( aProvider );
       
   381             break;
       
   382             }
       
   383         case EAknCtDoubleGraphicListBox:
       
   384             {
       
   385             lbModel = CLmkDoubleGraphicLBModel::NewL( aProvider );
       
   386             break;
       
   387             }
       
   388         default:
       
   389             {
       
   390             User::Leave( KErrNotSupported );
       
   391             break;
       
   392             }
       
   393         }
       
   394     aListBox.Model()->SetItemTextArray( lbModel );
       
   395     aListBox.Model()->SetOwnershipType( ELbmOwnsItemArray );
       
   396     }
       
   397 
       
   398 // ----------------------------------------------------
       
   399 // CLmkAppSelectorImplBase::HandleEventListReadyL()
       
   400 // ----------------------------------------------------
       
   401 //
       
   402 TBool CLmkAppSelectorImplBase::HandleEventListReadyL()
       
   403     {
       
   404     // default implementation
       
   405     return EFalse;
       
   406     }
       
   407 
       
   408 // ----------------------------------------------------
       
   409 // CLmkAppSelectorImplBase::CreateFindBoxL()
       
   410 // ----------------------------------------------------
       
   411 //
       
   412 EXPORT_C CAknSearchField* CLmkAppSelectorImplBase::CreateFindBoxL(
       
   413                                             const CCoeControl &aParent)
       
   414 	{
       
   415 	CAknFilteredTextListBoxModel* model =
       
   416 	static_cast<CAknFilteredTextListBoxModel*> ( iListBox->Model() );
       
   417 	iSearchBox =
       
   418 	CAknSearchField::NewL( aParent, CAknSearchField::ESearch, NULL, KTextLimit );
       
   419 
       
   420 	// Creates CAknListBoxFilterItems object.
       
   421 	model->CreateFilterL( iListBox, iSearchBox );
       
   422 
       
   423 #ifdef RD_SCALABLE_UI_V2
       
   424 	iFilter = model->Filter();
       
   425 	iSearchBox->SetObserver(this);
       
   426 #endif// RD_SCALABLE_UI_V2
       
   427 	iSearchBox->SetFocus( EFalse );
       
   428 	iSearchBox->MakeVisible( EFalse );     //by defult disable the find box
       
   429 	return iSearchBox;
       
   430 	}
       
   431 
       
   432 // ----------------------------------------------------
       
   433 // CLmkAppSelectorImplBase::ShowFindBoxL()
       
   434 // ----------------------------------------------------
       
   435 //
       
   436 void CLmkAppSelectorImplBase::ShowFindBoxL( TBool aVisible )
       
   437 	{
       
   438 	const TRect rect(iListBox->Parent()->Rect());
       
   439 	if (iSearchBox)
       
   440 		{
       
   441 	//	iSearchBox->ResetL();
       
   442 		iSearchBox->SetFocus(aVisible);
       
   443 		iSearchBox->MakeVisible(aVisible);
       
   444 		static_cast<CAknColumnListBoxView*>
       
   445 		(iListBox->View())->SetFindEmptyListState(aVisible);
       
   446 
       
   447 		if (aVisible && iListBox && iSearchBox)
       
   448 			{
       
   449 			AknLayoutUtils::LayoutControl(iListBox, rect,
       
   450 			AKN_LAYOUT_WINDOW_list_gen_pane(1));
       
   451 			AknLayoutUtils::LayoutControl(iSearchBox, rect,
       
   452 			AKN_LAYOUT_WINDOW_find_pane);
       
   453 			if (iSearchBox->IsVisible() && iListBox->IsVisible())
       
   454 				{
       
   455 				// The correct line position to use is 2, which corresponds
       
   456 				// EABColumn in Avkon (not a public enumeration,
       
   457 				// hence hard-coding used here)
       
   458 				const TInt KSeparatorLinePos = 2;
       
   459 				iSearchBox->SetLinePos(KSeparatorLinePos);
       
   460 				}
       
   461 			}
       
   462 		else if (iListBox)
       
   463 			{
       
   464 			AknLayoutUtils::LayoutControl(iListBox, rect,
       
   465 			AKN_LAYOUT_WINDOW_list_gen_pane(0));
       
   466 			}
       
   467 		iSearchBox->DrawDeferred();
       
   468 		}
       
   469 
       
   470 	if ( !aVisible )
       
   471 		{
       
   472 		iListBox->SetRect(rect);
       
   473 		iListBox->DrawDeferred();
       
   474 		}
       
   475 	}
       
   476 // ----------------------------------------------------
       
   477 // CLmkAppSelectorImplBase::HandleScreenSizeChange()
       
   478 // ----------------------------------------------------
       
   479 //
       
   480 void CLmkAppSelectorImplBase::HandleScreenSizeChange()
       
   481     {
       
   482     // Dummy implementation in base class.
       
   483 	}
       
   484 
       
   485 // ----------------------------------------------------
       
   486 // CLmkAppLmSelectorImpl::AttachToAIWMenuL()
       
   487 // ----------------------------------------------------
       
   488 //
       
   489 void CLmkAppSelectorImplBase::AttachToAIWMenuL(
       
   490 		TInt /*aMenuResourceId*/,
       
   491 		TInt /*aInterestResourceId*/)
       
   492 	{
       
   493 	 // Dummy function
       
   494 	}
       
   495 
       
   496 // ----------------------------------------------------
       
   497 // CLmkAppSelectorImplBase::AttachInterestL()
       
   498 // ----------------------------------------------------
       
   499 //
       
   500 void CLmkAppSelectorImplBase::AttachInterestL (
       
   501 		TInt /*aInterestResourceId*/)
       
   502 	{
       
   503 	// Dummy function
       
   504 	}
       
   505 
       
   506 
       
   507 // ----------------------------------------------------
       
   508 // CLmkAppLmSelectorImpl::InitializeMenuPaneL()
       
   509 // ----------------------------------------------------
       
   510 //
       
   511 void CLmkAppSelectorImplBase::InitializeMenuPaneL(
       
   512 		CEikMenuPane& /*aMenuPane */,
       
   513 		TInt /* aMenuResourceId */)
       
   514 	{
       
   515 	// Dummy function
       
   516 	}
       
   517 
       
   518 // -----------------------------------------------------------------------------
       
   519 // CLmkAppLmSelectorImpl::ExecuteAIWCallCmdL()
       
   520 // -----------------------------------------------------------------------------
       
   521 //
       
   522 void CLmkAppSelectorImplBase::ExecuteAIWCallCmdL(
       
   523 		 TInt /*aCommandId*/ )
       
   524 	{
       
   525 	// Dummy function
       
   526 	}
       
   527 
       
   528 // -----------------------------------------------------------------------------
       
   529 // CLmkAppLmSelectorImpl::IsThisLandmarkFieldDefined
       
   530 // -----------------------------------------------------------------------------
       
   531 //
       
   532 TBool CLmkAppSelectorImplBase::IsLmWithThisFieldExistL ( TLmkAppCmdId  /*aFieldId*/)
       
   533     {
       
   534     // Dummy function
       
   535     return EFalse;
       
   536     }
       
   537 
       
   538 // -----------------------------------------------------------------------------
       
   539 // CLmkAppLmSelectorImpl::MarkedIndexes
       
   540 // -----------------------------------------------------------------------------
       
   541 //
       
   542 EXPORT_C const CArrayFix<TInt>* CLmkAppSelectorImplBase::MarkedIndexes()
       
   543     {
       
   544       const CArrayFix<TInt>* markedIndexes = NULL;
       
   545       markedIndexes = iListBox->SelectionIndexes();
       
   546       return markedIndexes;
       
   547     }
       
   548 // -----------------------------------------------------------------------------
       
   549 // CLmkAppLmSelectorImpl::CurrentItemIndex
       
   550 // -----------------------------------------------------------------------------
       
   551 //
       
   552 EXPORT_C TInt CLmkAppSelectorImplBase::CurrentItemIndex()
       
   553 	{
       
   554 	return iListBox->CurrentItemIndex();
       
   555 	}
       
   556 // -----------------------------------------------------------------------------
       
   557 // CLmkAppLmSelectorImpl::SetMskObserver
       
   558 // -----------------------------------------------------------------------------
       
   559 //
       
   560 EXPORT_C void CLmkAppSelectorImplBase::SetMskObserver(MLmkMskObserver* aMskObserver)
       
   561 	{
       
   562 	iMskObserver = aMskObserver;
       
   563 	}
       
   564 
       
   565 // -----------------------------------------------------------------------------
       
   566 // CLmkAppSelectorImplBase::ServiceCmdByMenuCmd
       
   567 // -----------------------------------------------------------------------------
       
   568 //
       
   569 TInt CLmkAppSelectorImplBase::ServiceCmdByMenuCmd( TInt /*aMenuCmd*/ )
       
   570 	{
       
   571 	//dummy function
       
   572 	return 0;
       
   573 	}
       
   574 
       
   575 CAknSearchField* CLmkAppSelectorImplBase::FindBox()
       
   576 	{
       
   577 	return iSearchBox;
       
   578 	}
       
   579 
       
   580 #ifdef RD_SCALABLE_UI_V2
       
   581 void CLmkAppSelectorImplBase::HandleControlEventL( CCoeControl* aControl,TCoeEvent aEventType )
       
   582 	{
       
   583 	//Update the listbox a sper the search criteria
       
   584 	if (iFilter)
       
   585 		{
       
   586 		iFilter->HandleControlEventL(aControl, aEventType);
       
   587 		}
       
   588 	}
       
   589 #endif //RD_SCALABLE_UI_V2
       
   590 //  End of File