textinput/peninputarc/src/peninputlayoutcontrol/peninputlayoutvkb.cpp
branchRCL_3
changeset 13 1bbdde98cc2d
parent 12 5e18d8c489d6
child 18 b1ea1642412e
equal deleted inserted replaced
12:5e18d8c489d6 13:1bbdde98cc2d
  1347     iLatched = aFlag;
  1347     iLatched = aFlag;
  1348     if(iKeyCtrl)
  1348     if(iKeyCtrl)
  1349         {
  1349         {
  1350         //find key        
  1350         //find key        
  1351         //iKeyboard->DrawKey(this);
  1351         //iKeyboard->DrawKey(this);
       
  1352         if ( !aFlag )
       
  1353             {
       
  1354             iKeyCtrl->UpdateChangedArea(EFalse);
       
  1355             }
  1352         iKeyCtrl->Draw();
  1356         iKeyCtrl->Draw();
  1353         }
  1357         }
  1354     }
  1358     }
  1355 
  1359 
  1356 // ---------------------------------------------------------------------------
  1360 // ---------------------------------------------------------------------------
  1501     User::LeaveIfError( iDimmedKeyBmp->Create( TSize(1,1), aMode) );    
  1505     User::LeaveIfError( iDimmedKeyBmp->Create( TSize(1,1), aMode) );    
  1502     iDimmedKeyDev = CFbsBitmapDevice::NewL(iDimmedKeyBmp);
  1506     iDimmedKeyDev = CFbsBitmapDevice::NewL(iDimmedKeyBmp);
  1503     
  1507     
  1504     iKeyGc = CFbsBitGc::NewL();
  1508     iKeyGc = CFbsBitGc::NewL();
  1505     iKeyGc->Reset();   
  1509     iKeyGc->Reset();   
       
  1510     
       
  1511     iHighlightKeyResourceChanged = ETrue;
       
  1512     iNormalKeyResourceChanged = ETrue;   
  1506     }
  1513     }
  1507 
  1514 
  1508 void CVirtualKeyboard::CreateBmpDevL()
  1515 void CVirtualKeyboard::CreateBmpDevL()
  1509     {
  1516     {
  1510     iExt->CreateBmpDevL(UiLayout()->LayoutOwner()->BitmapDevice()->DisplayMode());
  1517     iExt->CreateBmpDevL(UiLayout()->LayoutOwner()->BitmapDevice()->DisplayMode());
  1517         if(UiLayout()->NotDrawToLayoutDevice())
  1524         if(UiLayout()->NotDrawToLayoutDevice())
  1518             {
  1525             {
  1519             TRAP_IGNORE(CreateBmpDevL());
  1526             TRAP_IGNORE(CreateBmpDevL());
  1520             }
  1527             }
  1521         }
  1528         }
       
  1529     else if(aType == KPenInputOwnDeviceResourceChange)
       
  1530         {
       
  1531         iExt->iHighlightKeyResourceChanged = ETrue;
       
  1532         iExt->iNormalKeyResourceChanged = ETrue;
       
  1533         }    
  1522     else
  1534     else
       
  1535     	{
  1523         CControlGroup::HandleResourceChange(aType);
  1536         CControlGroup::HandleResourceChange(aType);
       
  1537         }
  1524     }
  1538     }
  1525     
  1539     
  1526 CFbsBitmap* CVirtualKeyboard::PrepareMaskBmpL(CFbsBitGc* aGc, const TDisplayMode& aMode, const TRect& aRect)
  1540 CFbsBitmap* CVirtualKeyboard::PrepareMaskBmpL(CFbsBitGc* aGc, const TDisplayMode& aMode, const TRect& aRect)
  1527     {
  1541     {
  1528     CFbsBitmap* mask = new(ELeave) CFbsBitmap();
  1542     CFbsBitmap* mask = new(ELeave) CFbsBitmap();
  1599     iExt->iKeyGc->BitBlt(TPoint(0,0), keyBmp,r);      
  1613     iExt->iKeyGc->BitBlt(TPoint(0,0), keyBmp,r);      
  1600 
  1614 
  1601     delete keyBmp;        
  1615     delete keyBmp;        
  1602     return ETrue;
  1616     return ETrue;
  1603     }
  1617     }
       
  1618 
       
  1619 TBool CVirtualKeyboard::PrepareHighlightKeyBmp(const TRect& aRect, const TRect& aInnerRect, const TRect& aKeyRect)
       
  1620     {
       
  1621     if(HighightKeyBmp()->SizeInPixels() != aRect.Size() || iExt->iHighlightKeyResourceChanged)
       
  1622         {
       
  1623         iExt->iHighlightKeyResourceChanged = EFalse;
       
  1624         return PrepareKeyBmp(HighightKeyBmp(),HighlightKeyDev(),aRect,aInnerRect
       
  1625                                 ,KeySkinId(EKeyBmpHighlight),KAknsIIDDefault,aKeyRect);
       
  1626         
       
  1627         }
       
  1628     
       
  1629     return ETrue;
       
  1630     }
       
  1631     
       
  1632 TBool CVirtualKeyboard::PrepareNormalKeyBmp(const TRect& aRect, const TRect& aInnerRect, const TRect& aKeyRect)
       
  1633     {
       
  1634     if(NormalKeyBmp()->SizeInPixels() != aRect.Size() || iExt->iNormalKeyResourceChanged)
       
  1635         {
       
  1636         iExt->iNormalKeyResourceChanged = EFalse; 
       
  1637         return PrepareKeyBmp(NormalKeyBmp(),NormalKeyDev(),aRect,aInnerRect
       
  1638                             ,KeySkinId(EKeyBmpNormal),KAknsIIDDefault,aKeyRect);
       
  1639                            
       
  1640         }
       
  1641         
       
  1642     return ETrue;
       
  1643     }
       
  1644         
  1604 //end of implementation of Class CVirtualKey    
  1645 //end of implementation of Class CVirtualKey