clock2/clockui/uilayer/clockmainview/src/clockmaincontainer.cpp
branchRCL_3
changeset 60 96907930389d
parent 36 9c5b1510919f
child 67 1539a383d7b6
equal deleted inserted replaced
59:aba12c885d83 60:96907930389d
   216                 }
   216                 }
   217             // button focused and listbox has items
   217             // button focused and listbox has items
   218             else if( iNewAlarmButton->IsFocused() && itemCount > 0 )
   218             else if( iNewAlarmButton->IsFocused() && itemCount > 0 )
   219                 {
   219                 {
   220                 iListBox->View()->ItemDrawer()->ClearFlags( CListItemDrawer::EDisableHighlight );
   220                 iListBox->View()->ItemDrawer()->ClearFlags( CListItemDrawer::EDisableHighlight );
       
   221                 
       
   222                 //clear ESingleClickDisabledHighlight flag only when navigation key is used
       
   223                 if(iClearSingleClickFlag)
       
   224                     {
       
   225                     iListBox->View()->ItemDrawer()->ClearFlags( CListItemDrawer::ESingleClickDisabledHighlight );
       
   226                     iClearSingleClickFlag = EFalse;
       
   227                     }
       
   228                 
   221                 iNewAlarmButton->SetFocus( EFalse );
   229                 iNewAlarmButton->SetFocus( EFalse );
   222                 iListBox->SetFocus( ETrue );
   230                 iListBox->SetFocus( ETrue );
   223                 if( EKeyDownArrow == aKeyEvent.iCode )
   231                 if( EKeyDownArrow == aKeyEvent.iCode )
   224                     {
   232                     {
   225                     iListBox->SetCurrentItemIndex( itemCount - 1 );
   233                     iListBox->SetCurrentItemIndex( itemCount - 1 );
   395     //( when new alarm button is focused)
   403     //( when new alarm button is focused)
   396     if( iListBox && iListBox->Rect().Contains( aPointerEvent.iPosition ) &&
   404     if( iListBox && iListBox->Rect().Contains( aPointerEvent.iPosition ) &&
   397             aPointerEvent.iType == TPointerEvent::EButton1Down &&
   405             aPointerEvent.iType == TPointerEvent::EButton1Down &&
   398             !iListBox->IsFocused() && iListBox->IsVisible() )
   406             !iListBox->IsFocused() && iListBox->IsVisible() )
   399         {
   407         {
       
   408         iNewAlarmButton->SetFocus(EFalse);
   400         iListBox->View()->ItemDrawer()->ClearFlags( CListItemDrawer::EDisableHighlight );
   409         iListBox->View()->ItemDrawer()->ClearFlags( CListItemDrawer::EDisableHighlight );
   401         }
   410         }
   402     
   411     
   403     // to get the vibes let's handle skinnable clock as a special case
   412     // to get the vibes let's handle skinnable clock as a special case
   404     // no need to to delegate pointer events to it
   413     // no need to to delegate pointer events to it
   468     // Update the listbox.
   477     // Update the listbox.
   469     iListBox->ScrollToMakeItemVisible( itemIndex );
   478     iListBox->ScrollToMakeItemVisible( itemIndex );
   470     iListBox->SetCurrentItemIndexAndDraw( itemIndex );
   479     iListBox->SetCurrentItemIndexAndDraw( itemIndex );
   471     SetCorrectRectForNewAlarmButton();
   480     SetCorrectRectForNewAlarmButton();
   472     iNewAlarmButton->DrawDeferred();
   481     iNewAlarmButton->DrawDeferred();
       
   482     iClearSingleClickFlag = ETrue;
   473 	__PRINTS( "CClockMainContainer::UpdateAlarmListL - Exit" );
   483 	__PRINTS( "CClockMainContainer::UpdateAlarmListL - Exit" );
   474     }
   484     }
   475 
   485 
   476 // ---------------------------------------------------------
   486 // ---------------------------------------------------------
   477 // CClockMainContainer::RemoveAlarmL
   487 // CClockMainContainer::RemoveAlarmL
  1158     {
  1168     {
  1159 	__PRINTS( "CClockMainContainer::ConstructL - Entry" );
  1169 	__PRINTS( "CClockMainContainer::ConstructL - Entry" );
  1160 	
  1170 	
  1161     iView = aView;
  1171     iView = aView;
  1162     iAlarmArray = aAlarmArray;
  1172     iAlarmArray = aAlarmArray;
  1163     
  1173     iClearSingleClickFlag = ETrue;
  1164 	CreateWindowL();
  1174 	CreateWindowL();
  1165     
  1175     
  1166 	// Construct the basic skin context.
  1176 	// Construct the basic skin context.
  1167 	iBgContext = CAknsBasicBackgroundControlContext::NewL( KAknsIIDQsnBgAreaMain,
  1177 	iBgContext = CAknsBasicBackgroundControlContext::NewL( KAknsIIDQsnBgAreaMain,
  1168 	                                                       aRect,
  1178 	                                                       aRect,
  1707     // Set the size of the clock.
  1717     // Set the size of the clock.
  1708     iSkinnableClock->SetExtent( skinClockRect.iTl, skinClockRect.Size() );
  1718     iSkinnableClock->SetExtent( skinClockRect.iTl, skinClockRect.Size() );
  1709     iSkinnableClock->ActivateL();
  1719     iSkinnableClock->ActivateL();
  1710     iSkinnableClock->DrawDeferred();
  1720     iSkinnableClock->DrawDeferred();
  1711     }
  1721     }
       
  1722 
       
  1723 TBool CClockMainContainer::IsNewAlaramButtonFocused()
       
  1724     {
       
  1725     __PRINTS( "CClockMainContainer::IsNewAlaramFocused - Entry" );
       
  1726     
       
  1727     return (iNewAlarmButton->IsFocused());
       
  1728     
       
  1729     __PRINTS( "CClockMainContainer::IsNewAlaramFocused - Exit" );
       
  1730     
       
  1731     }
  1712 // End of file
  1732 // End of file