当前位置: 首页>>代码示例>>C++>>正文


C++ TRect::Move方法代码示例

本文整理汇总了C++中TRect::Move方法的典型用法代码示例。如果您正苦于以下问题:C++ TRect::Move方法的具体用法?C++ TRect::Move怎么用?C++ TRect::Move使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TRect的用法示例。


在下文中一共展示了TRect::Move方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: Draw

void CCurThreeListBoxItem::Draw(CGraphic& aGraphic,TPoint& aPoint) const
{
	TPoint point = aPoint;

	ASSERT(iSlideText);
	TRect rect;
	if(iActive)
	{
		TSize size = iItemSize;
		size.iHeight *= 3;
		rect = size;
		rect.Move(point);

		aGraphic.SetPenColor(KTextColor);
		aGraphic.SetPenStyle(CGraphicsContext::ESolidPen);
		aGraphic.SetBrushColor(KListSelectedColor);
		aGraphic.SetBrushStyle(CGraphicsContext::ESolidBrush);
		aGraphic.DrawRect(rect);
		aGraphic.SetBrushStyle(CGraphicsContext::ENullBrush);
	}
	if(iIcon)
	{
		ASSERT(iIconMask);
		aGraphic.BitBltMasked(point,iIcon,iIconMask);
	}
	rect = iItemSize;
	if(iIcon)
	{
		rect.iTl.iX += iIcon->SizeInPixels().iWidth;
	}
	rect.Move(point);
	iSlideText->SetClientRect(rect);
	iSlideText->Draw(aGraphic);

	if(iActive)
	{	
		aGraphic.SetPenColor(iTextColor);
		rect.Move(0,iItemSize.iHeight);
		if(iSecondText)
		{
			aGraphic.DrawText(*iSecondText,rect);
		}
		rect.Move(0,iItemSize.iHeight);
		if(iThirdText)
		{
			aGraphic.DrawText(*iThirdText,rect);
		}

		aPoint.iY += iItemSize.iHeight*3;
	}
	else
	{
		aPoint.iY += iItemSize.iHeight;
	}
}
开发者ID:flaithbheartaigh,项目名称:wapbrowser,代码行数:55,代码来源:ListBoxItem.cpp

示例2: TestOffset

void TestRRegion::TestOffset()
	{
	RRegion rgn;
	const TRect* rlist;
	TRect r;
	TUint index;

	for(index=0;index<(sizeof(rect)/sizeof(rect[0]));index++)
		{
		rgn.Clear();
		rgn.AddRect(rect[index]);
		r=rect[index];
		r.Move(1,1);
		rgn.Offset(1,1);
		if (rect[index].IsEmpty())
			test(rgn.Count()==0);
		else
			{
			test(rgn.Count()==1);
			rlist=rgn.RectangleList();
			test(rlist[0]==r);
			}
		}
	rgn.Close();
	}
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:25,代码来源:t_regn.cpp

示例3: Draw

void CPanControl::Draw(const TRect& aRect) const
    {
    CWindowGc& gc = SystemGc();
    TRect sourceRect = Rect();
    sourceRect.Move(iCurrentPointerPos);
    gc.DrawBitmap(aRect, iSourceBitmap, sourceRect); 
    }
开发者ID:cdaffara,项目名称:symbiandump-os1,代码行数:7,代码来源:tpan.cpp

示例4: MsgDataPane

EXPORT_C TRect MsgEditorCommons::MsgDataPane()
    {
    TRect msgMainPane = MsgEditorCommons::MsgMainPane();
    
#ifdef RD_SCALABLE_UI_V2
    msgMainPane.Move( -msgMainPane.iTl );
#endif // RD_SCALABLE_UI_V2

//    TAknLayoutRect msgDataLayout;
//    msgDataLayout.LayoutRect(
//        msgMainPane,
//        AknLayoutScalable_Apps::msg_data_pane().LayoutLine() );
//        
//    return msgDataLayout.Rect();
    msgMainPane.Move(0,3);
    msgMainPane.Resize(-10,-3);
    return msgMainPane;
    }
开发者ID:flaithbheartaigh,项目名称:lemonplayer,代码行数:18,代码来源:MsgEditorCommon.cpp

示例5: Update

/**
@see MAnimSpriteFunctions::UpdateMember
@param aFullUpdate	Not used. Wserv2 always do full back to front rendering, so there is no distinction between changes needing aFullUpdate or not 
 */
void CWsSprite::Update(TInt aMember,TRect aRect,TBool /*aFullUpdate*/) 
	{
	if (iCurIndex!=aMember)
		return;
	aRect.Move(Pos());
	aRect.Intersection(iScreen->CurrentScreenSize());
	SetDirty(ETrue);
	Screen()->SpriteManager()->Schedule(this, &aRect);
	}
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:13,代码来源:SPRITE.CPP

示例6: Draw

void CMyPicture::Draw( CGraphicsContext& aGc,
                       const TPoint& aTopLeft,
                       const TRect& aClipRect,
                       MGraphicsDeviceMap* aMap ) const
  {
  TRect bitmapRect = aMap->TwipsToPixels(TRect(TPoint(), iSizeInTwips));
  bitmapRect.Move(aTopLeft);
  aGc.Reset();
  aGc.SetClippingRect(aClipRect);
  aGc.DrawBitmap(bitmapRect, iBitmap);
  }
开发者ID:bohwaz,项目名称:officereader,代码行数:11,代码来源:MyPicture.cpp

示例7: DrawItem

// CFepLayoutChoiceList::DrawItem
// Draw a choice list item.
// (other items were commented in a header).
// ---------------------------------------------------------------------------
//
void CFepLayoutChoiceList::DrawItem(TInt aIndex, TBool aErase)
    {
    //
    if(iWndControl)
        return;
    TRect rtItem;
    rtItem.iTl.iY = aIndex * iItemRect.Height();
    rtItem.iBr.iX = iItemRect.Width();
    rtItem.iBr.iY = rtItem.iTl.iY + iItemRect.Height();
    rtItem.Move(Rect().iTl);
    DrawItem(rtItem, *iItemList[aIndex], aErase, aIndex == iCurFocusItem );
    }
开发者ID:kuailexs,项目名称:symbiandump-mw1,代码行数:17,代码来源:peninputlayoutchoicelist.cpp

示例8: ConstructL

/**
  Second phase constructor for CConeBackgroundTestParentWithNoBg class.\n
  Sets a container window for component control, if the container is a window-owning control.\n
  Creates two child controls, first one is placed at the top left while other is at the bottom right.\n
*/
void CConeBackgroundTestParentWithNoBg::ConstructL(const CCoeControl& aParent, const TRect& aRect)
    {
    SetContainerWindowL(aParent);
    SetRect(aRect);
	TRect tlRect = aRect;
	tlRect.iBr.iX = (aRect.iBr.iX - aRect.iTl.iX)/2 + aRect.iTl.iX;
	tlRect.iBr.iY = (aRect.iBr.iY - aRect.iTl.iY)/2 + aRect.iTl.iY;
	iChildControl1 = CConeBackgroundTestControl::NewL(*this, tlRect);
	TRect brRect = tlRect;
	brRect.Move(tlRect.Width(), tlRect.Height());
	iChildControl2 = CConeBackgroundTestControl::NewL(*this, brRect);
	}
开发者ID:cdaffara,项目名称:symbiandump-mw1,代码行数:17,代码来源:TConeBackground.cpp

示例9: SetRect

// -----------------------------------------------------------------------------
// CFepUiLayout::SetRect
// Set layout rect
// -----------------------------------------------------------------------------
//
EXPORT_C void CFepUiLayout::SetRect(const TRect& aRect)
    {
    TRect layoutRect = Rect();
    layoutRect.Move(Position());
    if(layoutRect != aRect)
        {        
        iRootCtrl->SetRect(aRect);
        LayoutOwner()->LayoutSizeChanged( aRect.Size() );
        LayoutOwner()->SetPosition( aRect.iTl );
        iRootCtrl->GraphicDeviceSizeChanged();
        }
    }
开发者ID:kuailexs,项目名称:symbiandump-mw1,代码行数:17,代码来源:peninputuilayout.cpp

示例10: ReadRegionL

// ---------------------------------------------------------------------------
// ReadRegionL
// ---------------------------------------------------------------------------
//
void CAlfHierarchyModel::ReadRegionL( RMemReadStream* aStream, RRegion& aRegion, TPoint aWindowPos )
    {
    aRegion.Clear();
    TRect rect;
    TInt count = aStream->ReadInt32L();
    for (TInt i = 0 ; i < count ; i++ )
        {
        ReadRectL( rect, aStream );
        rect.Move(-aWindowPos);
        aRegion.AddRect( rect );
        }
    }
开发者ID:cdaffara,项目名称:symbiandump-mw4,代码行数:16,代码来源:alfhierarchymodel.cpp

示例11: Init

// ---------------------------------------------------------------------------
// CFepUiLayout::InitL
// Initialize the layout
// ---------------------------------------------------------------------------
//
EXPORT_C TRect CFepUiLayout::Init()
    {
    //Init control    
    TRect r = iRootCtrl->InitControl();
    r.Move( Position() );
    for(TInt i = 0; i < iDragbarNum; i++)
        {
        iDragbarList[i]->AddPositionObserver(static_cast<MPositionObserver*>
                                                                (iRootCtrl)); 
        }
    //iLayoutReady = ETrue;
    return r;
    }
开发者ID:kuailexs,项目名称:symbiandump-mw1,代码行数:18,代码来源:peninputuilayout.cpp

示例12: HideLines_Edwin

/**
 * Sets a clipping rectangle for hiding the whole or a part of edwin's text.
 *
 * The reason for using this function is the multiline edwins. The text inside
 * an edwin can be broken to two or more lines, which must be hidden or shown
 * independently from each other. That is why it is not enough just to move
 * the whole edwin out of the screen.
 *
 * @param aClipRect The clipping rect for edwin's text. An empty rect disables
 *   hiding.
 *
 * @return How many subcontrols were hidden
 */
static TInt HideLines_Edwin(CEikEdwin *aEdwin, TRect aClipRect)
{
    aEdwin->SetTextLinesRect(aClipRect);

    // Create rects of the first and last edwin lines
    TPoint edwinTl( aEdwin->Rect().iTl );
    TPoint edwinBr( aEdwin->Rect().iBr );
    TRect textFirstLine;
    aEdwin->TextLayout()->GetLineRect(edwinTl.iY, textFirstLine);
    textFirstLine.Move( edwinTl.iX, edwinTl.iY + aEdwin->Margins().iTop );
    TRect textLastLine;
    aEdwin->TextLayout()->GetLineRect(edwinBr.iY, textLastLine);
    textLastLine.Move( edwinBr.iX, edwinBr.iY - aEdwin->Margins().iTop - textLastLine.Height() );

    // Check if at least one line fits to the clipping rect
    if( aClipRect.Contains(textFirstLine.iTl) &&
            aClipRect.iBr.iY >= textFirstLine.iBr.iY )   // The first line fits
        return 0;
    if( aClipRect.Contains(textLastLine.iTl) &&
            aClipRect.iBr.iY >= textLastLine.iBr.iY )   // The last line fits
        return 0;
    return 1;
}
开发者ID:kuailexs,项目名称:symbiandump-mw1,代码行数:36,代码来源:EIKCAPCA.CPP

示例13: SetImage

void CGuideContainer::SetImage(class CImageHandler*& aImage, 
                               const TRect& aBaseRect,
                               TRect (*ptrFunc) (const class TRect& aRect, const class TSize& aSize),
                               float aXPos, float aYPos,
                               TInt aDx, TInt aDy)
{
   TRect rect = (*ptrFunc)(aBaseRect,
         TSize(WFLayoutUtils::CalculateXValue(aBaseRect.Width(), aXPos),
               WFLayoutUtils::CalculateYValue(aBaseRect.Height(), aYPos)));
   rect.Move(aDx, aDy);
   if (aImage) {
      aImage->SetImageRect(rect);
   } else {
      aImage = CImageHandler::NewL(rect);
   }
}
开发者ID:VLjs,项目名称:Wayfinder-S60-Navigator,代码行数:16,代码来源:GuideContainer.cpp

示例14: StartViewFinder

// ---------------------------------------------------------------------------
// CMMACameraWindow::StartViewFinder
// Starts viewfinder.
// ---------------------------------------------------------------------------
//
void CMMACameraWindow::StartViewFinder()
{
    LOG(EJavaMMAPI,EInfo," < StartViewFinder");

    ASSERT(iUICamera);
    ASSERT(iCameraPowerOn);
    ASSERT(iStarted);

    iStarterTimer->Cancel();

    // align client rect to RWindow, viewfinder
    // display co-ordinates is w.r.t to RWindow
    TRect relativeClientRect;
    relativeClientRect = iClientRect;
    relativeClientRect.Move(-iRWindowRect.iTl);

    // Set the drawing area
    TRect drawRect(iDrawRect);
    drawRect.Move(relativeClientRect.iTl);

    LOG2(EJavaMMAPI, EInfo,
         "MMA::CMMACameraWindow::StartViewFinder - Starting VF TL:%d,%d",
         drawRect.iTl.iX,
         drawRect.iTl.iY);
    LOG2(EJavaMMAPI, EInfo,
         "MMA::CMMACameraWindow::StartViewFinder - Starting VF BR:%d,%d",
         drawRect.iBr.iX,
         drawRect.iBr.iY);

    TRAPD(vfError, iUICamera->StartViewFinderDirectL(
              *iWs, *iScreenDevice, *iWindow, drawRect));

    if (vfError == KErrNone)
    {
        LOG(EJavaMMAPI,EInfo,"MMA::CMMACameraWindow::StartViewFinder - Start OK");
    }
    else
    {
        LOG1(EJavaMMAPI, EInfo,
             "MMA::CMMACameraWindow::StartViewFinder()  - \
StartViewFinderDirectL error=%d", vfError);

        TRAP_IGNORE(DrawViewFinderErrorL(vfError, drawRect));
    }

    LOG(EJavaMMAPI,EInfo," > StartViewFinder");
}
开发者ID:cdaffara,项目名称:symbiandump-ossapps,代码行数:52,代码来源:cmmacamerawindow.cpp

示例15: Draw

void CConeBackgroundTestParentWindowOwning::Draw(const TRect& aRect) const
	{
	CWindowGc& aGc = SystemGc();
	aGc.SetBrushStyle(CGraphicsContext::ERearwardDiagonalHatchBrush);
	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)); //blue, to be changed or removed
	aGc.DrawRect(tlRect);
	
	TRect brRect = tlRect;
	brRect.Move(tlRect.Width(), tlRect.Height());
	aGc.SetBrushColor(TRgb(0xffffff)); //white , to be changed or removed
	aGc.DrawRect(brRect);
	}
开发者ID:cdaffara,项目名称:symbiandump-mw1,代码行数:18,代码来源:TConeBackground.cpp


注:本文中的TRect::Move方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。