uifw/AvKon/src/AknAdaptiveSearchGrid.cpp
branchRCL_3
changeset 18 0aa5fbdfbc30
parent 16 71dd06cfe933
child 23 3d340a0166ff
equal deleted inserted replaced
16:71dd06cfe933 18:0aa5fbdfbc30
   122 //
   122 //
   123 CAknAdaptiveSearchGrid::~CAknAdaptiveSearchGrid()
   123 CAknAdaptiveSearchGrid::~CAknAdaptiveSearchGrid()
   124     { 
   124     { 
   125     _AKNTRACE_FUNC_ENTER;
   125     _AKNTRACE_FUNC_ENTER;
   126     CEikonEnv::Static()->EikAppUi()->RemoveFromStack( this );
   126     CEikonEnv::Static()->EikAppUi()->RemoveFromStack( this );
   127     delete iBgContextOfControlPane;
   127     if ( iBgContextOfControlPane )
   128  
   128     	{
       
   129 		delete iBgContextOfControlPane;
       
   130 		iBgContextOfControlPane = NULL;
       
   131     	}
   129     // Clear current region of AS
   132     // Clear current region of AS
   130     iCurrentRegion.Clear();    
   133     iCurrentRegion.Clear();    
   131     iButtonArray.ResetAndDestroy();
   134     iButtonArray.ResetAndDestroy();
   132     
   135     
   133     if( iGridChars )
   136     if( iGridChars )
   159         {
   162         {
   160         delete iPageIndicator;
   163         delete iPageIndicator;
   161         iPageIndicator = NULL;
   164         iPageIndicator = NULL;
   162         }
   165         }
   163        
   166        
   164     CAknWsEventMonitor* eventMonitor = iAppUi->EventMonitor();    
   167     if ( iAppUi )
   165     eventMonitor->Enable( EFalse ); 
   168         {
   166     eventMonitor->RemoveObserver( this ); 
   169         CAknWsEventMonitor* eventMonitor = iAppUi->EventMonitor();  
       
   170         eventMonitor->Enable( EFalse ); 
       
   171         eventMonitor->RemoveObserver( this ); 
       
   172         }
   167     _AKNTRACE_FUNC_EXIT;
   173     _AKNTRACE_FUNC_EXIT;
   168     }
   174     }
   169 
   175 
   170 // -----------------------------------------------------------------------------
   176 // -----------------------------------------------------------------------------
   171 // CAknAdaptiveSearchGrid::ConstructL()
   177 // CAknAdaptiveSearchGrid::ConstructL()
   628 // CAknAdaptiveSearchGrid::SetAdaptiveSearchGridVisibility
   634 // CAknAdaptiveSearchGrid::SetAdaptiveSearchGridVisibility
   629 // Shows or hides grid.
   635 // Shows or hides grid.
   630 // The position of the top left corner should be set in advance.
   636 // The position of the top left corner should be set in advance.
   631 // -----------------------------------------------------------------------------
   637 // -----------------------------------------------------------------------------
   632 //
   638 //
   633 void CAknAdaptiveSearchGrid::SetVisibilityL( TBool aVisible, TBool aSelectAll )
   639 void CAknAdaptiveSearchGrid::SetVisibilityL( TBool aVisible, TBool /*aSelectAll*/ )
   634     {
   640     {
   635     _AKNTRACE( "[%s][%s] Visible : %d", "CAknAdaptiveSearchGrid", __FUNCTION__, aVisible );
   641     _AKNTRACE( "[%s][%s] Visible : %d", "CAknAdaptiveSearchGrid", __FUNCTION__, aVisible );
   636     if ( aVisible )
   642     if ( aVisible )
   637         {      
   643         {      
   638         SetFocus( ETrue);  
   644         SetFocus( ETrue);  
  1120 // -----------------------------------------------------------------------------
  1126 // -----------------------------------------------------------------------------
  1121 // CAknAdaptiveSearchGrid::FocusChanged
  1127 // CAknAdaptiveSearchGrid::FocusChanged
  1122 // This function is called whenever a control gains or loses focus.
  1128 // This function is called whenever a control gains or loses focus.
  1123 // -----------------------------------------------------------------------------
  1129 // -----------------------------------------------------------------------------
  1124 // 
  1130 // 
  1125 void CAknAdaptiveSearchGrid::FocusChanged( TDrawNow aDrawNow )
  1131 void CAknAdaptiveSearchGrid::FocusChanged( TDrawNow /*aDrawNow*/ )
  1126     {
  1132     {
  1127     if ( !iShown || IsNonFocusing() )
  1133     if ( !iShown || IsNonFocusing() )
  1128         {
  1134         {
  1129         return; // nothing should be done in this case 
  1135         return; // nothing should be done in this case 
  1130         }      
  1136         }      
  1641     return iAdaptiveSearchGridObserver;
  1647     return iAdaptiveSearchGridObserver;
  1642     }
  1648     }
  1643         
  1649         
  1644 
  1650 
  1645 // -----------------------------------------------------------------------------
  1651 // -----------------------------------------------------------------------------
  1646 // CCAknAdaptiveSearch::SaveFindPaneRect()
  1652 // CAknAdaptiveSearch::SaveFindPaneRect()
  1647 // When the rect of find pane is set, this functions will be notified
  1653 // When the rect of find pane is set, this functions will be notified
  1648 // to record the size of it.
  1654 // to record the size of it.
  1649 // -----------------------------------------------------------------------------
  1655 // -----------------------------------------------------------------------------
  1650 //
  1656 //
  1651 void CAknAdaptiveSearchGrid::SaveFindPaneRect( const TRect &aRect )
  1657 void CAknAdaptiveSearchGrid::SaveFindPaneRect( const TRect &aRect )
  1652     {
  1658     {
  1653     //When width is zero, no need to deal with.
  1659     //When width is zero, no need to deal with.
  1654     if ( 0 == aRect.Size().iWidth )
  1660     if ( 0 == aRect.Size().iWidth )
       
  1661         {
  1655         return;
  1662         return;
       
  1663         }
  1656     
  1664     
  1657     //The same size already is set. No need to do further process.
  1665     //The same size already is set. No need to do further process.
  1658     if ( aRect.Size().iWidth == iFindpaneRect.Size().iWidth )
  1666     if ( aRect == iFindpaneRect )
       
  1667         {
  1659         return;    
  1668         return;    
       
  1669         }
  1660 
  1670 
  1661     iFindpaneRect = aRect;
  1671     iFindpaneRect = aRect;
  1662     iFindPaneSizeChanged = ETrue;
  1672     iFindPaneSizeChanged = ETrue;
  1663     }
  1673     }
  1664 
  1674