Exemplo n.º 1
0
EXPORT_C TBool AknsDrawUtils::DrawFramePart( MAknsSkinInstance* aInstance,
    CWindowGc& aGc, const TRect& aRect, const TAknsItemID& aFrameID,
    const TAknsFrameElementIndex aFrameElement )
    {
    if( !aInstance )
        {
        return EFalse;
        }

    CAknsImageTableItemData* data = static_cast<CAknsImageTableItemData*>(
        aInstance->GetCachedItemData( aFrameID, EAknsITImageTable ) );
    if( data && (data->NumberOfImages()==EAknsFrameElementsN) )
        {
        aGc.SetPenStyle(CGraphicsContext::ENullPen);
        aGc.SetBrushStyle(CGraphicsContext::ESolidBrush);

        TBool retVal = CheckAndDrawCachedImage( aInstance, aGc, aRect,
            data->ImageIID( aFrameElement ), KAknsDrawParamDefault );

        aGc.SetPenStyle(CGraphicsContext::ESolidPen);
        aGc.SetBrushStyle(CGraphicsContext::ENullBrush);

        return retVal;
        }

    return EFalse;
    }
Exemplo n.º 2
0
/**
 * Draws the joints between menu pane and menu pane title into the graphics
 * context aGc, in the rectangle aRect.
 */
EXPORT_C void LafMenuPane::DrawTitlePaneJoint(const MLafEnv& aLafEnv, const CCoeControl& aMenuPane, CWindowGc& aGc, const CCoeControl* aMenuPaneTitle, const TRect& aInnerRect)
	{
	PrepareGcForDrawingItems(aLafEnv, aMenuPane, aGc);
    aGc.SetPenStyle(CGraphicsContext::ENullPen);
    aGc.DrawRect(aInnerRect);
	if (aMenuPaneTitle)
		{// pane has title, so make sure they are joined up correctly
		const TPoint titlePos = aMenuPaneTitle->Position();
		const TInt width = aMenuPaneTitle->Size().iWidth;
		const TPoint position = aMenuPane.Position();

		// left straight join
		aGc.SetPenStyle(CGraphicsContext::ESolidPen);
		aGc.SetPenColor(aLafEnv.ControlColor(EColorMenuPaneBackground, aMenuPane));
		// get rid of the gray bit of border
		aGc.DrawLine(TPoint(titlePos.iX-position.iX+5,4),TPoint(titlePos.iX-position.iX+width-5,4));
		// get rid of the black bit of border
		aGc.DrawLine(TPoint(titlePos.iX-position.iX+4,0),TPoint(titlePos.iX-position.iX+width-4,0));
		aGc.DrawLine(TPoint(titlePos.iX-position.iX+4,1),TPoint(titlePos.iX-position.iX+width-4,1));

		aGc.DrawLine(TPoint(titlePos.iX-position.iX+5,4),TPoint(titlePos.iX-position.iX+width-5,4));
		aGc.DrawLine(TPoint(titlePos.iX-position.iX+MenuPaneSeparatorMargin() ,0),TPoint(titlePos.iX-position.iX+width-MenuPaneSeparatorMargin(),0));
		aGc.DrawLine(TPoint(titlePos.iX-position.iX+MenuPaneSeparatorMargin() ,1),TPoint(titlePos.iX-position.iX+width-MenuPaneSeparatorMargin(),1));
		aGc.DrawLine(TPoint(titlePos.iX-position.iX+MenuPaneSeparatorMargin() ,2),TPoint(titlePos.iX-position.iX+width-MenuPaneSeparatorMargin(),2));
		aGc.DrawLine(TPoint(titlePos.iX-position.iX+MenuPaneSeparatorMargin() ,3),TPoint(titlePos.iX-position.iX+width-MenuPaneSeparatorMargin(),3));

		// draw in black line seperator
		aGc.SetPenColor(KRgbBlack);
		aGc.DrawLine(TPoint(titlePos.iX-position.iX +MenuPaneSeparatorMargin(),0),TPoint(titlePos.iX-position.iX+width-3-MenuPaneSeparatorMargin(),0));

		TGulBorder::TColors borderColors;
		GetBorderColors(borderColors, aLafEnv, *aMenuPaneTitle);

		aGc.SetPenColor(borderColors.iMidlight);
		aGc.DrawLine(TPoint(titlePos.iX-position.iX+1,0),TPoint(titlePos.iX-position.iX+4,0));
		aGc.DrawLine(TPoint(titlePos.iX-position.iX+1,1),TPoint(titlePos.iX-position.iX+4,1));

		if (aMenuPaneTitle->Rect().iBr.iX==aMenuPane.Rect().iBr.iX)
			{// right straight join
			aGc.SetPenColor(borderColors.iMid);
			aGc.DrawLine(TPoint(aInnerRect.iBr.iX,0),TPoint(aInnerRect.iBr.iX,5));
			aGc.DrawLine(TPoint(aInnerRect.iBr.iX+1,0),TPoint(aInnerRect.iBr.iX+1,4));
			aGc.DrawLine(TPoint(aInnerRect.iBr.iX+2,0),TPoint(aInnerRect.iBr.iX+2,3));
			}
		else
			{// right corner join
			TInt xPos=titlePos.iX-position.iX+width-4;
			aGc.SetPenColor(borderColors.iMid);
			aGc.DrawLine(TPoint(xPos,0),TPoint(xPos,4));
			aGc.DrawLine(TPoint(xPos+1,0),TPoint(xPos+1,3));
			aGc.DrawLine(TPoint(xPos+2,0),TPoint(xPos+2,2));
			}
		}
	}
Exemplo n.º 3
0
/**
  Draw function of CConeBackgroundTestDrawer2 class used to draw the control.\n
  Sets the brush style to Solid Brush and Pen Style to Null Pen.\n
  Sets the brush colour to Blue and paints an ellipse on  the control.\n
*/
void CConeBackgroundTestDrawer2::Draw(CWindowGc& aGc, const CCoeControl& /*aControl*/, const TRect& aRect) const
	{
	aGc.SetBrushStyle(CGraphicsContext::ESolidBrush);
	aGc.SetPenStyle(CGraphicsContext::ENullPen);
	aGc.SetBrushColor(TRgb(0x0000ff));
	aGc.DrawEllipse(aRect);
	}
Exemplo n.º 4
0
/**
 * Draws the left adornment to the graphics context aGc, in the rectangle aRect. The menu pane
 * flags determines the type of adornment to be drawn.
 */
EXPORT_C void LafMenuPane::DrawLeftAdornment(const MLafEnv& aLafEnv, const CCoeControl& /*aMenuPane*/, CWindowGc& aGc, const TRect& aRect, const TItemAttributes& aItemAttributes)
	{
// Brush the background of the rect.
	aGc.SetPenStyle(CGraphicsContext::ENullPen);
	aGc.DrawRect(aRect);
	aGc.SetPenStyle(CGraphicsContext::ESolidPen);
	const TInt itemFlags = aItemAttributes.iFlags;
	if (itemFlags&EEikMenuItemSymbolOn)
		{
		if (itemFlags&EEikMenuItemCheckBox)
			{
			TRect rect = aRect;
			rect.iTl.iY += aItemAttributes.iBaseLine;
			TBuf<1> buf;
			buf.Append(TChar(ESymFontTick));
			aGc.UseFont(SymbolFont(aLafEnv));
			aGc.SetPenStyle(CGraphicsContext::ESolidPen);
			// as the tick is big, ignore KPreLeftAdornment and steal 1 pixels from left.
			aGc.DrawText(buf,TPoint(rect.iTl.iX-1, rect.iTl.iY));
			aGc.UseFont(NormalFont(aLafEnv));
			}
		else if (itemFlags&KLafMenuItemRadio)
			{
			TUid bmpUid(TUid::Uid(KLafUidEikonOptiVal));
			const CFbsBitmap* bitmap = aLafEnv.Bitmap(bmpUid);
			TSize bitsize = bitmap->SizeInPixels();
			TRect butRect(TPoint(0,0), TPoint(bitsize.iWidth,bitsize.iHeight));
			TInt yoffset = (aRect.Size().iHeight - bitsize.iHeight) / 2;
			TInt xoffset = KLafPreLeftAdornmentSpace;
			TPoint offset(xoffset,yoffset);
			if (aItemAttributes.iHighlightType == SLafMenuPane::EDrawHighlight)
				{
				bmpUid=TUid::Uid(KLafUidEikonOptihVal);
				bitmap = aLafEnv.Bitmap(bmpUid);
				}
			bmpUid=TUid::Uid(KLafUidEikonOptimVal);
			const CFbsBitmap* mask = aLafEnv.Bitmap(bmpUid);
			aGc.BitBltMasked((aRect.iTl+offset), bitmap, butRect, mask,ETrue);
			}
		}
	}
Exemplo n.º 5
0
/**
 * Draws the cascade symbol into the graphics context aGc, in the rectangle aRect and sets
 * the pen color depending on whether the menu item is dimmed or focused.
 */
EXPORT_C void LafMenuPane::DrawRightAdornment(const MLafEnv& aLafEnv, const CCoeControl& /*aMenuPane*/, CWindowGc& aGc, const TRect& aRect, const TItemAttributes& aItemAttributes)
	{
	const TInt cascadeSize=Min(KLafRightAdornmentSpace,aItemAttributes.iHeight);

// Brush the background of the rect.
	aGc.SetPenStyle(CGraphicsContext::ENullPen);
	aGc.DrawRect(aRect);
	aGc.SetPenStyle(CGraphicsContext::ESolidPen);
	if (aItemAttributes.iInternalFlags&EMenuIsRightAdornment)
		{
		//Sort out rect for cascade symbol
		TRect cascadeRect=TRect(TPoint(aRect.iBr.iX-cascadeSize-PostRightAdornmentSpace(),aItemAttributes.iHPosition),
					TSize(cascadeSize,aItemAttributes.iHeight));
		cascadeRect.iTl.iY+=((aItemAttributes.iHeight-cascadeSize)/2);
		cascadeRect.iBr.iY-=((aItemAttributes.iHeight-cascadeSize)/2);
		TBuf<1> cascade;
		cascade.Append(TChar(ESymFontMenuCascade));
		aGc.UseFont(SymbolFont(aLafEnv));
		aGc.DrawText(cascade,cascadeRect,cascadeRect.Height(),CGraphicsContext::ERight);
		aGc.UseFont(NormalFont(aLafEnv));
		}
	}
Exemplo n.º 6
0
/**
  Draw function of CConeBackgroundTestDrawer2 class used to draw the control.\n
  Sets the brush style to Solid Brush and Pen Style to Null Pen.\n
  Sets the brush colour to Red and paints the top left part of the control.\n
  Sets the brush colour and points the bottom right part of the control.\n
*/
void CConeBackgroundTestDrawer1::Draw(CWindowGc& aGc, const CCoeControl& /*aControl*/, const TRect& aRect) const
	{
	
	aGc.SetBrushStyle(CGraphicsContext::ESolidBrush);
	aGc.SetPenStyle(CGraphicsContext::ENullPen);
	
	TRect tlRect = aRect;
	tlRect.iBr.iX = (tlRect.iBr.iX - tlRect.iTl.iX)/2 + tlRect.iTl.iX;
	tlRect.iBr.iY = (tlRect.iBr.iY - tlRect.iTl.iY)/2 + tlRect.iTl.iY;
	
	aGc.SetBrushColor(TRgb(0xff0000));
	aGc.DrawRect(tlRect);
	
	TRect brRect = tlRect;
	brRect.Move(tlRect.Width(), tlRect.Height());
	aGc.SetBrushColor(TRgb(0x00ff00));
	aGc.DrawRect(brRect);
	}
Exemplo n.º 7
0
/**
  Draw function of CConeBackgroundTestDrawer2 class used to draw the control.\n
  Sets the background style for Drawing.\n
  1. if aStyle is zero , the brush style is EVerticalHatchBrush.\n
  2. if aStyle is one , the brush style is EForwardDiagonalHatchBrush.\n
  3. if aStyle is two , the brush style is EHorizontalHatchBrush.\n
  4. if aStyle is three , the brush style is ERearwardDiagonalHatchBrush.\n
  Sets the brush colour to Red and paints the top left part of the control.\n
  Sets the brush colour and points the bottom right part of the control.\n
*/
void CConeBackgroundTestDrawer0::Draw(CWindowGc& aGc, const CCoeControl& /*aControl*/, const TRect& aRect) const
	{
	aGc.SetPenStyle(CGraphicsContext::ENullPen);
	aGc.SetBrushColor(TRgb(0xffffff));
	aGc.Clear();

	switch (iBgStyle)
		{
		case 0:
			aGc.SetBrushStyle(CGraphicsContext::EVerticalHatchBrush);
			break;
			
		case 1:
			aGc.SetBrushStyle(CGraphicsContext::EForwardDiagonalHatchBrush);
			break;
			
		case 2:
			aGc.SetBrushStyle(CGraphicsContext::EHorizontalHatchBrush);
			break;
			
		case 3:
			aGc.SetBrushStyle(CGraphicsContext::ERearwardDiagonalHatchBrush);
			break;
		}

	aGc.SetPenColor(TRgb(0xff0000));
	aGc.DrawRect(aRect);
	
	TRect tlRect = aRect;
	tlRect.iBr.iX = (tlRect.iBr.iX - tlRect.iTl.iX)/2 + tlRect.iTl.iX;
	tlRect.iBr.iY = (tlRect.iBr.iY - tlRect.iTl.iY)/2 + tlRect.iTl.iY;
	
	aGc.SetBrushColor(TRgb(0xff00ff));
	aGc.DrawRect(tlRect);
	
	TRect brRect = tlRect;
	brRect.Move(tlRect.Width(), tlRect.Height());
	aGc.SetBrushColor(TRgb(0x00ff00));
	aGc.DrawRect(brRect);
	}
Exemplo n.º 8
0
void MainL()	
	{	
	RWsSession ws;
	ws.Connect();
 	CWsScreenDevice* scr = new(ELeave) CWsScreenDevice(ws);
	scr->Construct();
 	CWindowGc* gc = new(ELeave) CWindowGc(scr);
	gc->Construct();
 	RWindowGroup grp(ws);
	grp.Construct(0xc0decafe, ETrue);
 	RWindow win(ws);
	win.Construct(grp, 0xbeefcafe);
	win.SetExtent(TPoint(20,160), TSize(320,240));
	win.Activate();
 	win.Invalidate();
	win.BeginRedraw();
	gc->Activate(win);
 	gc->SetPenStyle(CGraphicsContext::ENullPen);
	gc->SetBrushStyle(CGraphicsContext::ESolidBrush);
 	TBool color = EFalse;

if (Profiler::Start() == KErrNotFound)
	{
	_LIT(KProfiler,"profiler");
	_LIT(KStart,"start -noui -drive=S");
	RProcess p;
	if (p.Create(KProfiler,KStart) == KErrNone)
		{
		p.Resume();
		p.Close();
		}
	}

	for (TInt col=0; col<KCol; ++col)
		{
		color = !color;		
		for (TInt row=0; row<KRow; ++row)
			{
			TRect rect;
			rect.iTl.iX = col * KSize.iWidth;
			rect.iTl.iY = row * KSize.iHeight;
			rect.SetSize(KSize);
			color = !color;
			gc->SetBrushColor(color? KRgbBlue : KRgbBlack);
			gc->DrawRect(rect);
			}
	}
	
	
	
	gc->Deactivate();
	win.EndRedraw();
	ws.Flush();
 	User::After(3000000);
 	win.Close();
	grp.Close();
	delete gc;
	delete scr;
	ws.Close();

	Profiler::Stop();
	Profiler::Close();
	Profiler::Unload();

	} 
Exemplo n.º 9
0
// -----------------------------------------------------------------------------
// AknsDrawUtils::BackgroundBetweenRects()
// (commented in the header).
// -----------------------------------------------------------------------------
//
EXPORT_C TBool AknsDrawUtils::BackgroundBetweenRects(
    MAknsSkinInstance* aInstance, MAknsControlContext* aContext,
    const CCoeControl* aControl, CWindowGc& aGc,
    const TRect& aOuterRect,const TRect& aInnerRect, const TInt aDrawParam )
    {
    TInt drawParam = aDrawParam;
    TInt originalParam = aDrawParam;
    TBool retVal = EFalse;
    TBool blitFailed = EFalse;
    TBool blitAttempted = EFalse;

    if ( !&aGc )
        {
        return retVal;
        }

    MAknsControlContext* parentContext = GetParentContext( aContext );
    if( parentContext )
        {
        retVal = BackgroundBetweenRects( aInstance, parentContext, aControl, aGc,
            aOuterRect, aInnerRect, aDrawParam );
        drawParam |= KAknsDrawParamNoClearUnderImage;
        }
    else if( drawParam & KAknsDrawParamBottomLevelRGBOnly )
        {
        drawParam |= KAknsDrawParamRGBOnly;
        }

    originalParam = drawParam;

    if( aContext )
        {
        aContext->UpdateContext();
        }

    TAknsBackground* bgLayout = RetrieveBackgroundLayout( aContext );

    TAknsItemID imgIID( KAknsIIDNone );
    CAknsImageItemData* imgData = RetrieveBackgroundImage(
        aInstance, bgLayout, imgIID );

    // chained background
    if (imgData && imgData->ParentIID() != KAknsIIDNone)
        {
        TAknsItemID parentiid = imgData->ParentIID();
        TRect parentDrawRect = imgData->DrawRect();

        imgData = RetrieveKnownBackgroundImage(
            aInstance, parentiid );
        if (imgData)
            {
            imgData->SetDrawRect(parentDrawRect);
            drawParam |= KAknsDrawParamChained ;
            }
        }

    TPoint paDelta = GetParentAbsoluteDelta( bgLayout, aControl );

    if (!(aDrawParam & KAknsDrawParamPrepareOnly))
        {
        aGc.SetPenStyle(CGraphicsContext::ENullPen);
        aGc.SetBrushStyle(CGraphicsContext::ESolidBrush);
        }

    TBool blit = EFalse;
    //Rect for frame border
    TRect rlist[4];
    rlist[0] = aOuterRect;
    rlist[0].iBr.iY=aInnerRect.iTl.iY;
    rlist[1] = rlist[0];
    rlist[1].iBr.iY=aOuterRect.iBr.iY;
    rlist[1].iTl.iY=aInnerRect.iBr.iY;
    rlist[2] = aInnerRect;
    rlist[2].iTl.iX=aOuterRect.iTl.iX;
    rlist[2].iBr.iX=aInnerRect.iTl.iX;
    rlist[3] = rlist[2];
    rlist[3].iTl.iX=aInnerRect.iBr.iX;
    rlist[3].iBr.iX=aOuterRect.iBr.iX;
    if( imgData )
        {        
        blitAttempted = ETrue;
        for ( TInt i=0; i <4 ; i++ )
            {
            if( (drawParam & KAknsDrawParamNoClearUnderImage) == 0 )
                {            
                blit = BlitAndClear( aInstance, aGc, rlist[i],
                        imgData, imgIID, bgLayout, paDelta, drawParam );
                }
            else
                {
                blit = Blit( aInstance, aGc, rlist[i],
                        imgData, imgIID, bgLayout, paDelta, drawParam );
                }
            if ( !blit )
                {
                blitFailed = ETrue;
                }
            }
        }
    else
        {
        if( !(drawParam & KAknsDrawParamNoClearUnderImage) &&
            !(drawParam & KAknsDrawParamPrepareOnly) )
            {
            // Clear only if permitted
            for (TInt i=0; i<4; i++)
                {
                aGc.DrawRect(rlist[i]);
                }
            }
        }

    if( bgLayout )
        {
        TAknsBackground* nextLayout = bgLayout->iNext;
        while( nextLayout && (drawParam!=KAknsDrawParamLimitToFirstLevel) )
            {
            imgData = RetrieveKnownBackgroundImage( aInstance,
                nextLayout->iImageID );
            if (imgData && imgData->ParentIID() != KAknsIIDNone)
                {
                TAknsItemID parentiid = imgData->ParentIID();
                TRect parentDrawRect = imgData->DrawRect();

                imgData = RetrieveKnownBackgroundImage(
                aInstance, parentiid );
                if (imgData)
                    {
                    imgData->SetDrawRect(parentDrawRect);
                    drawParam |= KAknsDrawParamChained;
                    }
                }
            else
                {
                drawParam=originalParam;
                }

            if( imgData )
                {                
                blitAttempted = ETrue;
                for ( TInt i=0; i < 4; i++ )
                    {
                    blit = Blit( aInstance, aGc, rlist[i], imgData,
                            nextLayout->iImageID, nextLayout, paDelta, drawParam );
                    if ( !blit )
                        {
                        blitFailed = ETrue;
                        }
                    }
                }

            nextLayout = nextLayout->iNext;
            }
        }

    if (!(aDrawParam & KAknsDrawParamPrepareOnly))
        {
        aGc.SetPenStyle(CGraphicsContext::ESolidPen);
        aGc.SetBrushStyle(CGraphicsContext::ENullBrush);
        }

    if ( blitFailed )
        {
        retVal = EFalse;
        }
    else if ( !retVal )
        {
        retVal = blitAttempted;
        }

    return retVal;
    }
Exemplo n.º 10
0
EXPORT_C void AknPopupLayouts::HandleDraw(CEikonEnv* /*aEikEnv*/,
                  CWindowGc &aGc,
                  const TAknPopupWindowLayoutDef &aDef, 
                  CEikListBox* aListBox, 
                  CAknPopupHeadingPane* aHeading)
    {
    TRect windowRect = MenuRect(const_cast<TAknPopupWindowLayoutDef&>(aDef));
    MAknsSkinInstance *skin = AknsUtils::SkinInstance();
    MAknsControlContext *cc = AknsDrawUtils::ControlContext( aListBox );
    TBool windowFrameDrawn = EFalse;
    if (!cc) cc = aListBox->View()->ItemDrawer()->SkinBackgroundControlContext();
    
    TRegionFix<5> dontDrawRegion;
    TRegionFix<22> drawRegion;
    if ( aListBox )
        {
        dontDrawRegion.AddRect( aListBox->Rect() );

        // If there are scroll bars and they draw their own background, take
        // them out of clipping region
        CEikScrollBarFrame* scrollBarFrame = aListBox->ScrollBarFrame();
        if (scrollBarFrame)
            {
            CEikScrollBar* hBar = scrollBarFrame->GetScrollBarHandle(
                CEikScrollBar::EHorizontal);
            CEikScrollBar* vBar = scrollBarFrame->GetScrollBarHandle(
                CEikScrollBar::EVertical);
            TBool drawHorizontal = ETrue;
            TBool drawVertical = ETrue;
            scrollBarFrame->DrawBackgroundState(drawHorizontal, drawVertical);
            drawHorizontal = drawHorizontal && hBar && hBar->IsVisible();
            drawVertical = drawVertical && vBar && vBar->IsVisible();
            if (drawHorizontal)
                {
                TRect scrollBarRect(hBar->Rect());
                if (hBar->OwnsWindow())
                    {
                    TPoint windowPos = aDef.iWindowRect.iTl;
                    TPoint scrollBarPos = hBar->PositionRelativeToScreen();
                    scrollBarRect.Move(scrollBarPos - windowPos);
                    }
                dontDrawRegion.AddRect(scrollBarRect);
                }
            if (drawVertical)
                {
                TRect scrollBarRect(vBar->Rect());
                if (vBar->OwnsWindow())
                    {
                    TPoint windowPos = aDef.iWindowRect.iTl;
                    TPoint scrollBarPos = vBar->PositionRelativeToScreen();
                    scrollBarRect.Move(scrollBarPos - windowPos);
                    }
                dontDrawRegion.AddRect(scrollBarRect);
                }
            }
        }
    if ( aHeading )
        {
        dontDrawRegion.AddRect( aHeading->Rect() );
        }
    drawRegion.AddRect( windowRect );
    drawRegion.SubRegion( dontDrawRegion );
    if (cc)
        {
        const TAknsItemID *popupBgId = &KAknsIIDQsnBgPopupBackground;
        TAknLayoutRect popupBgRect;
        popupBgRect.LayoutRect(windowRect, SkinLayout::Popup_windows_skin_placing__background_slice__Line_1(windowRect));
        AknsDrawUtils::DrawCachedImage(skin, aGc, popupBgRect.Rect(), *popupBgId);

        const TAknsItemID *sliceId = &KAknsIIDQsnBgSlicePopup;
        TAknLayoutRect sliceRect;
        sliceRect.LayoutRect(windowRect, SkinLayout::Popup_windows_skin_placing__background_slice__Line_2());
        AknsDrawUtils::DrawCachedImage(skin, aGc, sliceRect.Rect(), *sliceId);
            
        TAknLayoutRect topLeft;
        topLeft.LayoutRect(windowRect, SkinLayout::Popup_windows_skin_placing__frame_general__Line_2());

        TAknLayoutRect bottomRight;
        bottomRight.LayoutRect(windowRect, SkinLayout::Popup_windows_skin_placing__frame_general__Line_5());

        TRect outerRect = TRect(topLeft.Rect().iTl, bottomRight.Rect().iBr);
        TRect innerRect = TRect(topLeft.Rect().iBr, bottomRight.Rect().iTl);
        aGc.SetPenStyle(CGraphicsContext::ENullPen);
        const TAknsItemID *frameId = &KAknsIIDQsnFrPopup;
        const TAknsItemID *frameCenterId = &KAknsIIDQsnFrPopupCenter;
        aGc.SetClippingRegion( drawRegion );
        windowFrameDrawn = AknsDrawUtils::DrawFrame(skin, aGc, outerRect, innerRect, *frameId, *frameCenterId);
        aGc.CancelClippingRegion();
        }
    if (!windowFrameDrawn)
        {
        AknDraw::DrawWindowShadow(aGc, aDef.iCover, aDef.iSecond, aDef.iFirst, aDef.iOutline, aDef.iInside);
        }
    }