bluetoothengine/bthid/mouse/PaintCursor/src/paintcursorappview.cpp
branchRCL_3
changeset 16 b23265fb36da
parent 13 b6f55cd40afd
child 39 5a89845f78e2
equal deleted inserted replaced
14:f7fbeaeb166a 16:b23265fb36da
   153         }
   153         }
   154 
   154 
   155     iMouseInitialized = ETrue;
   155     iMouseInitialized = ETrue;
   156     }
   156     }
   157 
   157 
       
   158 void CPaintCursorAppView::RedrawCursor()
       
   159     {
       
   160     TRect mainPaneRect;
       
   161     AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EMainPane, mainPaneRect );
       
   162     SetRect( mainPaneRect );
       
   163     DrawNow();
       
   164     iClientCommander.ImageCommand( KRedrawBTCursorAnim );
       
   165     iMouseInitialized = ETrue;
       
   166     }
       
   167  
       
   168  
       
   169 void CPaintCursorAppView::ResetCursor()
       
   170     {   
       
   171     TRect mainPaneRect;
       
   172     AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EMainPane, mainPaneRect );
       
   173     SetRect( mainPaneRect );
       
   174     DrawNow();
       
   175     iClientCommander.ImageCommand( KResetBTCursorAnim );
       
   176     iMouseInitialized = ETrue;
       
   177     }
       
   178 
   158 void CPaintCursorAppView::HandleResourceChange( TInt aType )
   179 void CPaintCursorAppView::HandleResourceChange( TInt aType )
   159     {
   180     {
   160     CCoeControl::HandleResourceChange( aType );
   181     CCoeControl::HandleResourceChange( aType );
   161     if ( aType == KEikDynamicLayoutVariantSwitch )
   182     if ( aType == KEikDynamicLayoutVariantSwitch )
   162         {
   183         {
   163         TRect mainPaneRect;
   184         ResetCursor();
   164         AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EMainPane, mainPaneRect );
       
   165         SetRect( mainPaneRect );
       
   166         DrawNow();
       
   167         if (iMouseInitialized)
       
   168             {
       
   169             iClientCommander.ImageCommand( KRedrawBTCursorAnim );
       
   170             }
       
   171         }
   185         }
   172     }
   186     }
   173 
   187 
   174 void CPaintCursorAppView::HandleControlEventL(
   188 void CPaintCursorAppView::HandleControlEventL(
   175     CCoeControl* /*aControl*/, TCoeEvent /*aEventType*/ )
   189     CCoeControl* /*aControl*/, TCoeEvent /*aEventType*/ )