textinput/peninputarc/src/peninputlayoutcontrol/peninputlayoutbubblectrl.cpp
branchRCL_3
changeset 20 ebd48d2de13c
parent 19 ac7e4d1d9209
child 21 ecbabf52600f
equal deleted inserted replaced
19:ac7e4d1d9209 20:ebd48d2de13c
    18 
    18 
    19 #include <AknIconUtils.h>
    19 #include <AknIconUtils.h>
    20 #include <AknsUtils.h>
    20 #include <AknsUtils.h>
    21 #include <AknUtils.h>
    21 #include <AknUtils.h>
    22 #include <AknsDrawUtils.h> 
    22 #include <AknsDrawUtils.h> 
    23 #include <AknBidiTextUtils.h>
       
    24 
    23 
    25 #include "peninputlayoutbubblectrl.h"
    24 #include "peninputlayoutbubblectrl.h"
    26 #include "peninputlayout.h"
    25 #include "peninputlayout.h"
    27 #include <peninputpluginutils.h>
    26 #include <peninputpluginutils.h>
    28 #include <imageconversion.h> 
       
    29 #include "peninputcmd.h"
       
    30 
    27 
    31 const TInt KShrinkSize = 10;
    28 const TInt KShrinkSize = 10;
    32 const TInt KDefaultTextColorIndex = EAknsCIQsnTextColorsCG60;
    29 const TInt KDefaultTextColorIndex = EAknsCIQsnTextColorsCG60;
    33 // ======== MEMBER FUNCTIONS ========
    30 // ======== MEMBER FUNCTIONS ========
    34 
    31 
    64     SetHidenFlag(ETrue);
    61     SetHidenFlag(ETrue);
    65     }
    62     }
    66         
    63         
    67 EXPORT_C CBubbleCtrl::~CBubbleCtrl()
    64 EXPORT_C CBubbleCtrl::~CBubbleCtrl()
    68     {
    65     {
    69 	Close();
       
    70 	
       
    71     if ( iText )
    66     if ( iText )
    72         delete iText;
    67         delete iText;
    73     
    68     
    74     if( iForgroundBmp )
    69     if( iForgroundBmp )
    75 		{
    70 		{
    78 		}
    73 		}
    79 	if( iForgroundBmpMask )
    74 	if( iForgroundBmpMask )
    80 		{
    75 		{
    81 		delete iForgroundBmpMask;
    76 		delete iForgroundBmpMask;
    82 		iForgroundBmpMask = NULL;
    77 		iForgroundBmpMask = NULL;
    83 		}   
    78 		}    
    84 	delete iBitmap;
       
    85 	delete iMaskBitmap; 
       
    86     }
    79     }
    87 
    80 
    88 EXPORT_C void CBubbleCtrl::SetBitmapParam(CFbsBitmap* aBmpId,
    81 EXPORT_C void CBubbleCtrl::SetBitmapParam(CFbsBitmap* aBmpId,
    89                                  CFbsBitmap* aMaskBmpId,
    82                                  CFbsBitmap* aMaskBmpId,
    90                                  TAknsItemID aBgSkinId)
    83                                  TAknsItemID aBgSkinId)
   105     iBgSkinId = aBgSkinId;    
    98     iBgSkinId = aBgSkinId;    
   106     }
    99     }
   107 
   100 
   108 EXPORT_C void CBubbleCtrl::Popup(const TRect& aRect)
   101 EXPORT_C void CBubbleCtrl::Popup(const TRect& aRect)
   109     {
   102     {
   110     //SetRect(aRect);
   103     SetRect(aRect);
   111 
   104 
   112     if(iFreeze)
   105     if(iFreeze)
   113         {
   106         {
   114         iShowing = ETrue; 
   107         iShowing = ETrue;              
       
   108         SetHidenFlag(EFalse);        
       
   109         return;
       
   110         }
       
   111     if(!iShowing || aRect != Rect() || iNeedRedraw)
       
   112         {
       
   113         iShowing = ETrue;  
       
   114         TRect rect = Rect();
   115         SetRect(aRect);
   115         SetRect(aRect);
   116         
       
   117         SetHidenFlag(EFalse);   
       
   118         /*
       
   119         if(UiLayout()->NotDrawToLayoutDevice())
       
   120             {
       
   121             struct SData
       
   122                 {
       
   123                 TRect rr;
       
   124                 TBool flag;
       
   125                 } data;
       
   126             data.rr = aRect;
       
   127             data.flag = ETrue;
       
   128             TPtrC ptr;
       
   129             ptr.Set(reinterpret_cast<const TUint16*>(&data),sizeof(data)/sizeof(TUint16));
       
   130         
       
   131             UiLayout()->SignalOwner(ESignalPopupArea,ptr);
       
   132             }  
       
   133         */
       
   134         return;
       
   135         }
       
   136     if( !iShowing || iNeedRedraw )
       
   137         {
       
   138         iShowing = ETrue;
       
   139         SetRect(aRect);
       
   140         
       
   141         TRect rect = Rect();
       
   142         //SetRect(aRect);
       
   143         SetHidenFlag(EFalse);        
   116         SetHidenFlag(EFalse);        
   144         BringToTop();
   117         BringToTop();
   145         
       
   146         /*
       
   147         //redraw the control under bubble control
   118         //redraw the control under bubble control
   148         if(aRect != rect)        
   119         if(aRect != rect)        
   149             {
   120             RootControl()->ReDrawRect(rect);    
   150             // signal the server to remove the pop area added before since the rect 
       
   151 			// has been changed
       
   152 		    if(UiLayout()->NotDrawToLayoutDevice())
       
   153 		        {
       
   154 		        struct SData
       
   155 		            {
       
   156 		            TRect rr;
       
   157 		            TBool flag;
       
   158 		            } data;
       
   159             
       
   160 		        data.rr = rect;
       
   161 		        data.flag = EFalse;
       
   162 		        TPtrC ptr;
       
   163         
       
   164 		        ptr.Set(reinterpret_cast<const TUint16*>(&data),sizeof(data)/sizeof(TUint16));
       
   165 		        UiLayout()->SignalOwner(ESignalPopupArea,ptr);
       
   166 		        }
       
   167 		    else
       
   168 			    {
       
   169 				//redraw the control under bubble control
       
   170 				RootControl()->ReDrawRect(rect); 
       
   171 				}
       
   172             }
       
   173             */
       
   174 		/*
       
   175         // signal server to add the pop area		
       
   176         if(UiLayout()->NotDrawToLayoutDevice())
       
   177             {
       
   178             struct SData
       
   179                 {
       
   180                 TRect rr;
       
   181                 TBool flag;
       
   182                 } data;
       
   183                 
       
   184             data.rr = aRect;
       
   185             data.flag = ETrue;
       
   186             TPtrC ptr;
       
   187             ptr.Set(reinterpret_cast<const TUint16*>(&data),sizeof(data)/sizeof(TUint16));
       
   188     
       
   189             UiLayout()->SignalOwner(ESignalPopupArea,ptr);
       
   190             }
       
   191             */
       
   192         
       
   193 		// signal server to copy the background as background bitmap for its own bitmap
       
   194         if(UiLayout()->NotDrawToLayoutDevice())
       
   195             {
       
   196             //copy backgroud to bitmap. DrawFrame seems to have transparent effect, 
       
   197             //so we need copy the background first.  
       
   198             if(!iBitmap)
       
   199                 {
       
   200                 TRAP_IGNORE(CreateBmpDevL());
       
   201                 }
       
   202         
       
   203             CFbsBitGc* gc = static_cast<CFbsBitGc*>(BitGc());
       
   204             gc->Activate( BitmapDevice() ); 
       
   205             CFbsBitGc* layoutGc = static_cast<CFbsBitGc*>(
       
   206                                 UiLayout()->LayoutOwner()->BitmapContext()); 
       
   207             gc->BitBlt(TPoint(0,0),*layoutGc,Rect());
       
   208             
       
   209             //ensure other pop up draws correctly on the background
       
   210             struct SData
       
   211                 {
       
   212                 CFbsBitGc* gc;
       
   213                 CFbsBitmap* bmp;
       
   214                 TRect rect;
       
   215                 } data;
       
   216             
       
   217             data.gc = gc;
       
   218             data.bmp = iBitmap;
       
   219             data.rect = Rect();
       
   220             TPtrC ptr;
       
   221             ptr.Set(reinterpret_cast<const TUint16*>(&data),sizeof(data)/sizeof(TUint16));
       
   222             
       
   223             UiLayout()->SignalOwner(ESignalDrawBackground,ptr);
       
   224             }
       
   225 
   121 
   226         Draw();
   122         Draw();
   227         
   123         
   228 		// notify sever to draw the bubble bitmap on the screen
   124         rect.BoundingRect(aRect);
   229         if(UiLayout()->NotDrawToLayoutDevice())
   125         UpdateAreaImmed(rect,ETrue);     
   230             {
       
   231             struct SData
       
   232                 {
       
   233             	TUint32 ctrl;
       
   234                 TBool flag;
       
   235                 TRect pos;
       
   236                 CFbsBitmap* bmp;
       
   237                 CFbsBitmap* mask;
       
   238                 } data;
       
   239                 
       
   240             data.ctrl = (TUint32)this;
       
   241             data.flag = ETrue;
       
   242             data.pos = Rect();
       
   243             data.bmp = iBitmap;
       
   244             data.mask = iMaskBitmap;
       
   245             TPtrC ptr;
       
   246             ptr.Set(reinterpret_cast<const TUint16*>(&data),sizeof(data)/sizeof(TUint16));            
       
   247             UiLayout()->SignalOwner(ESignalUpdateBubble,ptr);
       
   248             }
       
   249         else
       
   250             {
       
   251             rect.BoundingRect(aRect);
       
   252             UpdateAreaImmed(rect,ETrue);     
       
   253             }   
       
   254         
   126         
   255         iNeedRedraw = EFalse;
   127         iNeedRedraw = EFalse;
   256         }
   128         }
   257     }
   129     }
   258 EXPORT_C void CBubbleCtrl::SetBitmapParam(CFbsBitmap* aBmpId,
   130 EXPORT_C void CBubbleCtrl::SetBitmapParam(CFbsBitmap* aBmpId,
   280     }
   152     }
   281 
   153 
   282 EXPORT_C void CBubbleCtrl::Close()
   154 EXPORT_C void CBubbleCtrl::Close()
   283     {
   155     {
   284     TRect rect = Rect();
   156     TRect rect = Rect();
   285     if(UiLayout()->NotDrawToLayoutDevice())
   157     
   286 	{
   158     iShowing = EFalse;  
   287 	SetHidenFlag(ETrue);
       
   288     struct SData
       
   289         {
       
   290         TRect rr;
       
   291         TBool flag;
       
   292         } data;
       
   293     data.rr = rect;
       
   294     data.flag = EFalse;
       
   295     TPtrC ptr;
       
   296     ptr.Set(reinterpret_cast<const TUint16*>(&data),sizeof(data)/sizeof(TUint16));
       
   297 
       
   298     UiLayout()->SignalOwner(ESignalPopupArea,ptr);
       
   299 	}
       
   300 
       
   301     iShowing = EFalse;   
       
   302     
   159     
   303     if( iFreeze )
   160     if( iFreeze )
   304         {
   161         {
   305         if(iInvalidRect.IsEmpty() )
   162         if(iInvalidRect.IsEmpty() )
   306             {
   163             {
   311             iInvalidRect.BoundingRect( rect );
   168             iInvalidRect.BoundingRect( rect );
   312             }            
   169             }            
   313         }
   170         }
   314     else
   171     else
   315         {
   172         {
   316         if(UiLayout()->NotDrawToLayoutDevice())
   173         Clear();
   317             {
   174         SetHidenFlag(ETrue);    
   318             struct SData
   175         BringToBack();
   319                 {
   176 
   320             	TUint32 ctrl;
   177         RootControl()->ReDrawRect(rect);
   321                 TBool flag;
   178         UpdateAreaImmed(rect); 
   322                 TRect pos;
       
   323                 CFbsBitmap* bmp;
       
   324                 } data;
       
   325                 
       
   326             data.ctrl = (TUint32)this;
       
   327             data.flag = EFalse;
       
   328             data.pos = Rect();
       
   329             data.bmp = iBitmap;
       
   330             
       
   331             TPtrC ptr;
       
   332             ptr.Set(reinterpret_cast<const TUint16*>(&data),sizeof(data)/sizeof(TUint16));
       
   333             UiLayout()->SignalOwner(ESignalUpdateBubble,ptr);
       
   334             
       
   335             }
       
   336         else
       
   337             {
       
   338         
       
   339             Clear();
       
   340             SetHidenFlag(ETrue);    
       
   341             BringToBack();
       
   342     
       
   343             RootControl()->ReDrawRect(rect);
       
   344             UpdateAreaImmed(rect);
       
   345             }        
       
   346         }
   179         }
   347     }
   180     }
   348 
   181 
   349 EXPORT_C void CBubbleCtrl::Hide(TBool aFlag)
   182 EXPORT_C void CBubbleCtrl::Hide(TBool aFlag)
   350     {
   183     {
   369     {
   202     {
   370     if(!AbleToDraw() || iFreeze ) //|| !iShowing )
   203     if(!AbleToDraw() || iFreeze ) //|| !iShowing )
   371 	    {
   204 	    {
   372 	    return;
   205 	    return;
   373 	    }
   206 	    }
   374     if(UiLayout()->NotDrawToLayoutDevice() && !iBitmap)
   207     
   375         {
       
   376         TRAP_IGNORE(CreateBmpDevL());
       
   377         }
       
   378 		
       
   379     CFbsBitGc* gc = static_cast<CFbsBitGc*>(BitGc());
   208     CFbsBitGc* gc = static_cast<CFbsBitGc*>(BitGc());
   380     
   209     
   381     //mask bitmaps
   210     //mask bitmaps
   382   	DrawOpaqueMaskBackground();  
   211   	DrawOpaqueMaskBackground();  
   383   	
   212   	
   384     TRect rect = GetRect();          
   213     TRect rect = Rect();        
   385     TRect innerRect = rect;
   214     TRect innerRect = rect;
   386     
   215     
   387     if ( ( iLeftDiff == 0 ) && ( iTopDiff == 0 )
   216     if ( ( iLeftDiff == 0 ) && ( iTopDiff == 0 )
   388          && ( iRightDiff == 0 ) && ( iBottomDiff == 0 ) )
   217          && ( iRightDiff == 0 ) && ( iBottomDiff == 0 ) )
   389         {
   218         {
   403     //gc->Clear(rect);
   232     //gc->Clear(rect);
   404     		
   233     		
   405 	// Draw background
   234 	// Draw background
   406 	if ( iBgSkinId.iMajor )
   235 	if ( iBgSkinId.iMajor )
   407 	    {
   236 	    {
   408 	
   237     	AknsDrawUtils::DrawFrame( AknsUtils::SkinInstance(), 
   409     	AknsDrawUtils::DrawFrame( UiLayout()->SkinInstance(), //UiLayout()->SkinInstace()
       
   410                          *gc,
   238                          *gc,
   411                          rect,
   239                          rect,
   412                          innerRect,
   240                          innerRect,
   413                          iBgSkinId,
   241                          iBgSkinId,
   414                          KAknsIIDDefault ); 	        
   242                          KAknsIIDDefault ); 	        
   415 	    }
   243 	    }
   416 	else if( iFirstBmpId.iMajor && iMiddleBmpId.iMajor && iLastBmpId.iMajor )
   244 	else if( iFirstBmpId.iMajor && iMiddleBmpId.iMajor && iLastBmpId.iMajor )
   417 		{
   245 		{
   418 		AknPenInputDrawUtils::Draw3PiecesFrame( UiLayout()->SkinInstance(),
   246 		AknPenInputDrawUtils::Draw3PiecesFrame( AknsUtils::SkinInstance(),
   419 						 *gc,
   247 						 *gc,
   420 						 rect,
   248 						 rect,
   421 						 innerRect,
   249 						 innerRect,
   422 						 iFirstBmpId,
   250 						 iFirstBmpId,
   423 						 iMiddleBmpId,
   251 						 iMiddleBmpId,
   428 	    DrawBackground();    
   256 	    DrawBackground();    
   429 	    }
   257 	    }
   430                      
   258                      
   431     if ( iForgroundBmp )
   259     if ( iForgroundBmp )
   432         {
   260         {
   433         TRect iconRect;
   261         if( iForgroundBmp->SizeInPixels() != innerRect.Size() )
   434         iconRect.iTl = TPoint( innerRect.iTl.iX + iIconOffset.iWidth, 
       
   435                 innerRect.iTl.iY + iIconOffset.iHeight );
       
   436         iconRect.SetWidth( iIconSize.iWidth );
       
   437         iconRect.SetHeight( iIconSize.iHeight );
       
   438         
       
   439         if( iForgroundBmp->SizeInPixels() != iconRect.Size() )
       
   440         	{
   262         	{
   441         	AknIconUtils::SetSize( iForgroundBmp, iconRect.Size(), EAspectRatioNotPreserved );
   263         	AknIconUtils::SetSize( iForgroundBmp, innerRect.Size(), EAspectRatioNotPreserved );
   442         	}
   264         	}
   443         	
   265         	
   444     	TRect srcRect( TPoint( 0, 0 ), iForgroundBmp->SizeInPixels() );
   266     	TRect srcRect( TPoint( 0, 0 ), iForgroundBmp->SizeInPixels() );
   445     	
   267     	
   446     	if( iForgroundBmpMask )
   268     	if( iForgroundBmpMask )
   447     		{
   269     		{
   448             if( iForgroundBmpMask->SizeInPixels() != iconRect.Size() )
   270             if( iForgroundBmpMask->SizeInPixels() != innerRect.Size() )
   449             	{
   271             	{
   450             	AknIconUtils::SetSize( iForgroundBmpMask, iconRect.Size(), EAspectRatioNotPreserved);
   272             	AknIconUtils::SetSize( iForgroundBmpMask, innerRect.Size(), EAspectRatioNotPreserved);
   451             	}
   273             	}
   452             	        
   274             	        
   453             gc->SetBrushStyle( CGraphicsContext::ENullBrush );
   275 
   454     		gc->BitBltMasked( iconRect.iTl, 
   276     		gc->BitBltMasked( innerRect.iTl, 
   455     						  iForgroundBmp, 
   277     						  iForgroundBmp, 
   456     						  srcRect,
   278     						  srcRect,
   457     						  iForgroundBmpMask,
   279     						  iForgroundBmpMask,
   458     						  EFalse);
   280     						  EFalse);
   459     		}
   281     		}
   460         else
   282         else
   461             {
   283             {
   462     		gc->BitBlt( iconRect.iTl,
   284     		gc->BitBlt( innerRect.iTl,
   463     					iForgroundBmp,
   285     					iForgroundBmp,
   464     					srcRect );
   286     					srcRect );
   465             }            
   287             }            
   466         }
   288         }
   467         
   289         
   468     if ( iText && iText->Length() > 0 )
   290     if ( iText )
   469         {
   291         {
   470         gc->SetBrushStyle( CGraphicsContext::ENullBrush );
   292         gc->SetBrushStyle( CGraphicsContext::ENullBrush );
   471         TAknLayoutText textLayout;
   293         TAknLayoutText textLayout;
   472         textLayout.LayoutText(GetRect(), iTextFormat);
   294         textLayout.LayoutText(Rect(), iTextFormat);
   473         TRgb color( KRgbBlack );  // sane default for nonskinned case
   295         TRgb color( KRgbBlack );  // sane default for nonskinned case
   474 	    if ( AknsUtils::AvkonSkinEnabled() )
   296 	    if ( AknsUtils::AvkonSkinEnabled() )
   475 	        {
   297 	        {
   476 	        AknsUtils::GetCachedColor( UiLayout()->SkinInstance(),
   298 	        AknsUtils::GetCachedColor( AknsUtils::SkinInstance(),
   477 	                               color, KAknsIIDQsnTextColors, iTextColorIndex );
   299 	                               color, KAknsIIDQsnTextColors, iTextColorIndex );
   478 	        }
   300 	        }
   479          if ( iLangCode == ELangArabic ||
   301 	     textLayout.DrawText(*gc, *iText, EFalse, color);
   480               iLangCode == ELangHebrew ||
       
   481               iLangCode == ELangFarsi  ||
       
   482               iLangCode == ELangUrdu )
       
   483              {
       
   484               const CFont* font = textLayout.Font();
       
   485               HBufC* visualBuf = HBufC::New( iText->Length() + KAknBidiExtraSpacePerLine );
       
   486               *visualBuf = *iText;
       
   487               TPtr buf = visualBuf->Des();
       
   488 
       
   489               AknBidiTextUtils::ConvertToVisualAndClip(*iText, buf, *font,
       
   490                                           textLayout.TextRect().Size().iWidth,
       
   491                                           textLayout.TextRect().Size().iWidth,
       
   492                                           AknBidiTextUtils::ERightToLeft );
       
   493               textLayout.DrawText(*gc, buf, EFalse, color);
       
   494               delete visualBuf;
       
   495               visualBuf = NULL;
       
   496              }
       
   497          else
       
   498              {
       
   499              textLayout.DrawText(*gc, *iText, EFalse, color);
       
   500              }
       
   501         }
   302         }
   502     }
   303     }
   503            	
   304            	
   504 EXPORT_C void CBubbleCtrl::SetTextFormat(TAknTextLineLayout aTextFormat)
   305 EXPORT_C void CBubbleCtrl::SetTextFormat(TAknTextLineLayout aTextFormat)
   505     {
   306     {
   551                   
   352                   
   552         UpdateArea(iInvalidRect); 
   353         UpdateArea(iInvalidRect); 
   553         }
   354         }
   554     
   355     
   555     iInvalidRect = TRect();
   356     iInvalidRect = TRect();
   556     }
       
   557 
       
   558 TRect CBubbleCtrl::GetRect()
       
   559     {
       
   560     TRect r(Rect());
       
   561     if(UiLayout()->NotDrawToLayoutDevice())
       
   562         {
       
   563         r.Move(-Rect().iTl.iX, -Rect().iTl.iY);
       
   564         }
       
   565     return r;
       
   566     }
       
   567 
       
   568 
       
   569 void CBubbleCtrl::SetBmpDevice(CFbsBitGc* aGc,CFbsBitmapDevice* aDevice)
       
   570     {
       
   571     TAny* extension;
       
   572    
       
   573     if(KErrNone == Extension_(KFepCtrlExtId,extension,0))
       
   574         {
       
   575         static_cast<CFepUiBaseCtrl::CFepUiBaseCtrlExtension*>(extension)->SetGc(aGc);
       
   576         static_cast<CFepUiBaseCtrl::CFepUiBaseCtrlExtension*>(extension)->SetBmpDevice(aDevice);
       
   577         }
       
   578     }
       
   579 void CBubbleCtrl::CreateBmpDevL()
       
   580     {
       
   581     iBitmap = new ( ELeave ) CFbsBitmap;   
       
   582     //iMaskBitmap = new ( ELeave ) CFbsBitmap;
       
   583     CreateOwnDeviceL(iBitmap,0);
       
   584     }
       
   585 
       
   586 EXPORT_C void CBubbleCtrl::HandleResourceChange(TInt aType)
       
   587     {
       
   588     if(aType == KPenInputOwnDeviceChange)
       
   589         {
       
   590         if(UiLayout()->NotDrawToLayoutDevice() && !iBitmap)
       
   591             {
       
   592             TRAP_IGNORE(CreateBmpDevL());
       
   593             }
       
   594         }
       
   595     else
       
   596         CFepUiBaseCtrl::HandleResourceChange(aType);
       
   597     }
       
   598 
       
   599 EXPORT_C void CBubbleCtrl::SetRect(const TRect& aRect)
       
   600     {
       
   601 	if( !( UiLayout()->NotDrawToLayoutDevice()))
       
   602 		{
       
   603 		if( aRect != Rect())
       
   604 			{
       
   605 			CFepUiBaseCtrl::SetRect( aRect );
       
   606 			}
       
   607 		}
       
   608 	else
       
   609 		{
       
   610 		if( iShowing )
       
   611 			{
       
   612 			struct SData
       
   613 				{
       
   614 				TRect rr;
       
   615 				TBool flag;
       
   616 				} data;
       
   617 
       
   618 			 // Remove the original region from list
       
   619 			data.rr = Rect();
       
   620 			data.flag = EFalse;
       
   621 			TPtrC ptrForRemove;
       
   622 			ptrForRemove.Set( 
       
   623 				reinterpret_cast<const TUint16*>(&data), sizeof(data)/sizeof(TUint16));
       
   624 			UiLayout()->SignalOwner( ESignalPopupArea, ptrForRemove );
       
   625 
       
   626 			// Add the new region to list
       
   627 			data.rr = aRect;
       
   628 			data.flag = ETrue;
       
   629 			TPtrC ptrForAdd;
       
   630 			ptrForAdd.Set( 
       
   631 				reinterpret_cast<const TUint16*>(&data), sizeof(data)/sizeof(TUint16));
       
   632 			UiLayout()->SignalOwner( ESignalPopupArea, ptrForAdd );     
       
   633 			}
       
   634 			
       
   635 		if( aRect != Rect())
       
   636 			{
       
   637 			CFepUiBaseCtrl::SetRect( aRect );
       
   638 			TRAP_IGNORE(ResizeDeviceL());
       
   639 			}                   
       
   640 		}
       
   641     }
   357     }
   642 
   358 
   643 // ---------------------------------------------------------------------------
   359 // ---------------------------------------------------------------------------
   644 // CTooltipBubbleCtrl::NewL
   360 // CTooltipBubbleCtrl::NewL
   645 // factory function
   361 // factory function
   671     :CBubbleCtrl( aRect, aUiLayout, aCtrlId )
   387     :CBubbleCtrl( aRect, aUiLayout, aCtrlId )
   672     {
   388     {
   673 #ifdef RD_TACTILE_FEEDBACK
   389 #ifdef RD_TACTILE_FEEDBACK
   674     if(IsKindOfControl(ECtrlTactileFeedback) && !Hiden() && UiLayout())
   390     if(IsKindOfControl(ECtrlTactileFeedback) && !Hiden() && UiLayout())
   675         {
   391         {
   676 		SetTactileFeedbackType(ETouchFeedbackSensitiveInput);
   392 		SetTactileFeedbackType(ETouchFeedbackSensitiveKeypad);
   677         UiLayout()->RegisterFeedbackArea(reinterpret_cast<TInt>(this),aRect,ETouchFeedbackSensitiveInput);
   393         UiLayout()->RegisterFeedbackArea(reinterpret_cast<TInt>(this),aRect,ETouchFeedbackSensitiveKeypad);
   678         }  
   394         }  
   679 #endif // RD_TACTILE_FEEDBACK 
   395 #endif // RD_TACTILE_FEEDBACK 
   680     }
   396     }
   681 
   397 
   682 // ---------------------------------------------------------------------------
   398 // ---------------------------------------------------------------------------