EXPORT_C void CBubbleCtrl::Popup(const TRect& aRect)
    {
    SetRect(aRect);

    if(iFreeze)
        {
        iShowing = ETrue;              
        SetHidenFlag(EFalse);        
        return;
        }
    if(!iShowing || aRect != Rect() || iNeedRedraw)
        {
        iShowing = ETrue;  
        TRect rect = Rect();
        SetRect(aRect);
        SetHidenFlag(EFalse);        
        BringToTop();
        //redraw the control under bubble control
        if(aRect != rect)        
            RootControl()->ReDrawRect(rect);    

        Draw();
        
        rect.BoundingRect(aRect);
        UpdateAreaImmed(rect,ETrue);     
        
        iNeedRedraw = EFalse;
        }
    }
void CHuiRasterizedTextMesh::ExpandRectWithShadow(TRect& aRect) const
    {
    if ( iVisual && iLines.Count() )
        {
        CHuiDropShadow* shadowHandler = iVisual->DropShadowHandler();
        if ( shadowHandler &&
             shadowHandler->IsShadowVisible() &&
             iLines[0].iTexture )
            {
            const TInt requestedBlurredSize = HUI_ROUND_FLOAT_TO_INT( 2*shadowHandler->iRadius.Now() );
            THuiTextureHandle shadow;
            // take the first line as an example
            TBool haveShadowTexture = iLines[0].iTexture->GetShadowTexture( shadow,requestedBlurredSize );
            
            if ( haveShadowTexture )
                {
                const TRect shadowRect = shadowHandler->ShadowDrawingTRect( 
                        aRect.iTl,
                        aRect.Size(),
                        shadow.Size(),
                        *iVisual );           
                           
                aRect.BoundingRect( shadowRect );
                }
            }
        }
    }
inline const TRect BoundingRect(TRect aFirst, const TRect& aSecond)
{
   aFirst.BoundingRect(aSecond);
   return aFirst;
}