• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ ClientRect函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中ClientRect函数的典型用法代码示例。如果您正苦于以下问题:C++ ClientRect函数的具体用法?C++ ClientRect怎么用?C++ ClientRect使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: ClientRect

void CSpaceInvadersAppUi::InitShip()
{
	TInt x = ClientRect().Width() / 2 - ship_width / 2;
	TInt y = ClientRect().Height() - 50;
	iShip->SetX(x);
	iShip->SetY(y);
}
开发者ID:Watkinsong,项目名称:s6ace_invaders,代码行数:7,代码来源:SpaceInvadersAppUi.cpp


示例2: LOG_ENTERFN

// ---------------------------------------------------------
// CSecModUIViewBase::DoActivateL(...)
// 
// ---------------------------------------------------------
//
void CSecModUIViewBase::DoActivateL(
   const TVwsViewId& aPrevViewId,TUid /*aCustomMessageId*/,
   const TDesC8& /*aCustomMessage*/)
    {
    LOG_ENTERFN("CSecModUIViewBase::DoActivateL()");   
    if (KNullUid == iPrevViewId.iViewUid)
        {
        iPrevViewId = aPrevViewId;
        }
    SetTitlePaneL();
    AddNaviPaneLabelL();
                    
    if (!iContainer)
        {
        CreateContainerL();
        iContainer->SetMopParent(this);
        iContainer->ConstructL(ClientRect());
        iContainer->ListBox().SetListBoxObserver(this);
        AppUi()->AddToStackL(*this, iContainer);
        }         
   iContainer->ListBox().SetTopItemIndex( iTopItem );
   //the iCurrentPostion can be -1, if no keystore presents.
   if ( iCurrentPosition >= 0 )
       {
       iContainer->ListBox().SetCurrentItemIndex( iCurrentPosition ); 	
       } 
   iContainer->MakeVisible(ETrue);
   iContainer->SetRect(ClientRect());
   iContainer->ActivateL();
   
   
   LOG_LEAVEFN("CSecModUIViewBase::DoActivateL()");    
   }
开发者ID:kuailexs,项目名称:symbiandump-mw3,代码行数:38,代码来源:SecModUIViewBase.cpp


示例3: ClientRect

// -----------------------------------------------------------------------------
//  Called by the framework when the application status pane
//  size is changed.  Passes the new client rectangle to the
//  AppView
// -----------------------------------------------------------------------------
//
void COsmo4AppUi::HandleStatusPaneSizeChange()
{
	iAppView->SetRect( ClientRect() );
#ifndef GPAC_GUI_ONLY
	iPlaylist->SetRect( ClientRect() );
#endif
} 
开发者ID:bigbensk,项目名称:gpac,代码行数:13,代码来源:osmo4_ui.cpp


示例4: BaseConstructL

void CSpaceInvadersAppUi::ConstructL()
{
	// Initialise app UI with standard value.
	BaseConstructL(CAknAppUi::EAknEnableSkin);

	// Create the highscore holder to use highscores
	CSpaceInvadersDocument* ptr = (CSpaceInvadersDocument*)Document();
	iHighscoreHolder            = ptr->Holder();

	TInt error;
	
	// Create the audioplayer
	TRAP(error, iAudioPlayer = CSpaceInvadersAudioPlayer::NewL());
	if( error )
	{
		Exit();
	}
	
	// Create the ship
	TRAP(error, iShip = CShipEngine::NewL(0, 0 ));
	if ( error )
	{
		Exit();
	}

	// Create view objects
	TRAP(error, iAppView = CSpaceInvadersAppView::NewL( ClientRect(),this,iShip,
			                                iHighscoreHolder));
	if ( error )
	{
		Exit();
	}
	
	iAppView->MakeVisible(EFalse);
	
	TRAP(error, iStartMenuView = CSpaceInvadersStartMenuAppView::
								 NewL(ClientRect(), this, iHighscoreHolder) );
	if ( error )
	{
		Exit();
	}
	iStartMenuView->MakeVisible(ETrue);
	
	TRAP(error, iHighscoreView = CSpaceInvadersHighscoreView::
								 NewL(ClientRect(), this, iHighscoreHolder) );
	if ( error )
	{
		Exit();
	}
	iHighscoreView->MakeVisible(EFalse);
	iCurrentView = iStartMenuView;
	
	AddToStackL( iCurrentView );

	// Hiding the status pane
	CEikStatusPane* sp = iEikonEnv->AppUiFactory()->StatusPane();
	sp->MakeVisible(EFalse);

}
开发者ID:Watkinsong,项目名称:s6ace_invaders,代码行数:59,代码来源:SpaceInvadersAppUi.cpp


示例5: GetNumRows

Rect TableWidget::ColumnRect( int column ) const
{
    int last_row = GetNumRows() -1;
    
    Rect R = CellRect( column, 0) | CellRect( column, last_row);
    Rect r = ClientRect( column, 0) | ClientRect( column, last_row);

    return Rect( r.GetX1(), R.GetY1(), r.GetW(), R.GetH() );
}
开发者ID:BackupTheBerlios,项目名称:utgs-svn,代码行数:9,代码来源:TableWidget.cpp


示例6: GetNumColumns

Rect TableWidget::RowRect( int row ) const
{
    int last_col = GetNumColumns() -1;
    
    Rect R = CellRect( 0, row) | CellRect( last_col, row);
    Rect r = ClientRect( 0, row) | ClientRect( last_col, row);

    return Rect( R.GetX1(), r.GetY1(), R.GetW(), r.GetH() );
}
开发者ID:BackupTheBerlios,项目名称:utgs-svn,代码行数:9,代码来源:TableWidget.cpp


示例7: switch

// -----------------------------------------------------------------------
// Key Event Handler - Primarily to automate navigation through tab groups
// -----------------------------------------------------------------------
TKeyResponse CHindiDemoAppUi::HandleKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType)
{
  if (aType == EEventKey) 
  {
    if (iTabGroup == NULL)
    {
      return EKeyWasNotConsumed;
    } 
  }

  TInt active = iTabGroup->ActiveTabIndex();
  TInt count = iTabGroup->TabCount();

  switch (aKeyEvent.iCode) 
  {
    case EKeyLeftArrow:
      if (active > 0) 
      {
        // -----------------------------------------------------------------------
        // Change to usual layout
        // -----------------------------------------------------------------------
	TRect cr = ClientRect();
	if (cr.iTl.iY == Kqpn_height_status_pane_idle) 
        {
	  StatusPane()->SwitchLayoutL(R_AVKON_STATUS_PANE_LAYOUT_USUAL);
	}

	active--;
	iTabGroup->SetActiveTabByIndex(active);
	ActivateLocalViewL(TUid::Uid(iTabGroup->TabIdFromIndex(active)));
	return EKeyWasConsumed;
      }
      break;

    case EKeyRightArrow:
      if((active + 1) < count) 
      {
        TRect cr = ClientRect();  
        if (cr.iTl.iY == Kqpn_height_status_pane_idle) 
        {
	  StatusPane()->SwitchLayoutL(R_AVKON_STATUS_PANE_LAYOUT_USUAL);
        }

        active++;
        iTabGroup->SetActiveTabByIndex(active);
        ActivateLocalViewL(TUid::Uid(iTabGroup->TabIdFromIndex(active)));
        return EKeyWasConsumed;
      }
    break;

    default:
      break;
  }        

  return EKeyWasNotConsumed;
}
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:59,代码来源:HindiDemoappui.cpp


示例8: DoActivateL

	void DoActivateL(
					 const TVwsViewId& aPrevViewId,TUid /*aCustomMessageId*/,
				const TDesC8& /*aCustomMessage*/)
	{
		CALLSTACKITEM_N(_CL("CDynamicSettingsViewImpl"), _CL("DoActivateL"));
		iIsActivated=ETrue;
		MActiveErrorReporter* rep=AppContext().GetActiveErrorReporter();
		if (rep) rep->SetInHandlableEvent(ETrue);
#ifdef __WINS__
		TInt dummy;
		TBreakItem b(GetContext(), dummy);
#endif
		iPreviousViewId = aPrevViewId;

		{
			CEikStatusPane *sp = StatusPane();
			// Fetch pointer to the default navi pane control
			CAknNavigationControlContainer* naviPane = ( CAknNavigationControlContainer * )
				sp->ControlL( TUid::Uid( EEikStatusPaneUidNavi ) );
			naviPane->PushDefaultL(ETrue);
		}

		if (!iContainer)
			{
				iContainer = CBgContainer::NewL( this, ClientRect() );
				
				if (!iListbox) {
					iListbox = new (ELeave) CAknSettingStyleListBox();
					iListbox->ConstructL( iContainer, EAknListBoxSelectionList );
						//iListbox->SetMopParent( iContainer );
					iListbox->SetContainerWindowL( *iContainer );
					iListbox->CreateScrollBarFrameL( ETrue );
					iListbox->ScrollBarFrame()->SetScrollBarVisibilityL(CEikScrollBarFrame::EOff, 
																		CEikScrollBarFrame::EAuto );
					iListbox->SetListBoxObserver( this );
					iSettingItemArray = new (ELeave) CAknSettingItemArray( 10, EFalse, 0);
					CTextListBoxModel* model = iListbox->Model();
					model->SetItemTextArray( iSettingItemArray );
					model->SetOwnershipType( ELbmDoesNotOwnItemArray );
				} 
			}
		
		UpdateListBoxL();
		
		iContainer->SetContentL( iListbox );

		AppUi()->AddToStackL( *this, iContainer );
		iContainer->SetRect(ClientRect());
		
		// 	CEikStatusPane* sp=iEikonEnv->AppUiFactory()->StatusPane();
		// 	CAknNavigationControlContainer *np = (CAknNavigationControlContainer *)sp->ControlL(TUid::Uid(EEikStatusPaneUidNavi)); 
		// 	np->PushDefaultL();
	
		iContainer->ActivateL();
	}
开发者ID:flaithbheartaigh,项目名称:jaikuengine-mobile-client,代码行数:55,代码来源:cu_dynamicsettings.cpp


示例9: ClientRect

/*
------------------------------------------------------------------------------
------------------------------------------------------------------------------
*/
void CMovingBallAppUi::HandleStatusPaneSizeChange()
{
	if(iAppView)
	{
		iAppView->SetRect( ClientRect() );
	}
	
	if(iMySplashScreen)
	{
		iMySplashScreen->SetRect( ClientRect() );
	}
} 
开发者ID:DrJukka,项目名称:Symbian_Codes,代码行数:16,代码来源:YApp_E887600D.cpp


示例10: BaseConstructL

// -----------------------------------------------------------------------------
// Cosmo4AppUi::ConstructL()
// Symbian 2nd phase constructor can leave.
// -----------------------------------------------------------------------------
//
void COsmo4AppUi::ConstructL()
{
    // Initialise app UI with standard value.
    BaseConstructL(CAknAppUi::EAknEnableSkin);

    /*Create display*/
    iAppView = COsmo4AppView::NewL( ClientRect() );
	AddToStackL(iAppView);

	/*create playlist*/
#ifndef GPAC_GUI_ONLY
	iPlaylist = CPlaylist::NewL( ClientRect(), iAppView->GetUser() );

	iPlaylist->MakeVisible(EFalse);
#endif
	
	iAppView->MakeVisible(ETrue);
	view_mode = 0;

	m_title = NULL;

	//StatusPane ()->SwitchLayoutL ( R_AVKON_STATUS_PANE_LAYOUT_SMALL );

	nb_keys = 0;
	CaptureKeys(1);



	CCommandLineArguments *args = CCommandLineArguments::NewL();
#ifndef GPAC_GUI_ONLY
	if (args->Count() > 1) {
		TPtrC url = args->Arg(1);
#if defined(_UNICODE)
		char szURL[1024];
		u16 szURLUTF16[1024];
		size_t len;
		len = url.Size();
		memcpy(szURLUTF16, url.Ptr(), sizeof(u8)*len);
		szURLUTF16[len/2] = 0;
		const u16 *sptr = szURLUTF16;
		len = gf_utf8_wcstombs(szURL, 512, &sptr);
		if (len != (size_t) -1) {
			szURL[len] = 0;
			iAppView->Connect((const char *)szURL);
		}
#else
		iAppView->Connect((const char *)url.Ptr());
#endif
	}
#endif
	delete args;
}
开发者ID:bigbensk,项目名称:gpac,代码行数:57,代码来源:osmo4_ui.cpp


示例11: BaseConstructL

void CHelloWorldBasicAppUi::ConstructL()
    {
    // Initialise app UI with standard value.
    BaseConstructL(CAknAppUi::EAknEnableSkin);

    // Create view object
    iAppView = CHelloWorldBasicAppView::NewL(ClientRect());
    
    iAppContainer = new (ELeave) CFileListContainer;
    iAppContainer->SetMopParent(this);
    iAppContainer->ConstructL(ClientRect());
    AddToStackL(iAppContainer);
    }
开发者ID:cdaffara,项目名称:symbiandump-os1,代码行数:13,代码来源:testlauncherappui.cpp


示例12: BaseConstructL

/*
 * Construct an object of CYPagesAppView Class.
 */
void CYPagesAppUi::ConstructL()
{
    BaseConstructL(EAknEnableSkin);
	
    iAppView = CYPagesAppView::NewL(ClientRect());
	iCoeEnv->ReadResource(iAppView->iDisplayText,R_EXAMPLE_TEXT);  
}
开发者ID:pulkit110,项目名称:Yellow-Pages-Symbian,代码行数:10,代码来源:YPagesAppUi.cpp


示例13: ClientRect

// ---------------------------------------------------------
// CApSettingsPlugin::HandleClientRectChange
// ---------------------------------------------------------
void CCertManUIPlugin::HandleClientRectChange()
{
    if ( iContainer )
    {
        iContainer->SetRect( ClientRect() );
    }
}
开发者ID:kuailexs,项目名称:symbiandump-mw3,代码行数:10,代码来源:CertmanuiPlugin.cpp


示例14: ClientRect

// ---------------------------------------------------------
// CSymTorrentFilesView::HandleViewRectChange()
// ---------------------------------------------------------
//
void CSymTorrentFilesView::HandleViewRectChange()
{
    if ( iFilesContainer )
    {
        iFilesContainer->SetRect( ClientRect() );
    }
}
开发者ID:Nokia700,项目名称:SymTorrent,代码行数:11,代码来源:SymTorrentFilesView.cpp


示例15: BaseConstructL

// ---------------------------------------------------------------------------
// Symbian 2nd Constructor
// ---------------------------------------------------------------------------
//
void CBCTestSkinsView::ConstructL()
    {
    BaseConstructL( R_BCTESTSKINS_VIEW );

    iContainer = new( ELeave ) CBCTestSkinsContainer();
    iContainer->SetMopParent( this );
    iContainer->ConstructL( ClientRect() );
    AppUi()->AddToStackL( *this, iContainer );
    iContainer->MakeVisible( ETrue );

    iTestUtil = CBCTestUtil::NewL();

    // Add test case here.
    iTestUtil->AddTestCaseL( CBCTestDrawUtilsCase::NewL( iContainer ),
        _L("Test CBCTestDrawUtilsCase") );
    iTestUtil->AddTestCaseL( CBCTestEffectQueueCase::NewL( iContainer ),
        _L("Test CBCTestEffectQueueCase") );
    iTestUtil->AddTestCaseL( CBCTestBmpAnimCase::NewL( iContainer ),
        _L("Test CBCTestBmpAnimCase") );
    iTestUtil->AddTestCaseL( CBCTestUtilsCase::NewL( iContainer ),
        _L("Test CBCTestUtilsCase") );
    iTestUtil->AddTestCaseL( CBCTestEffectCmdCase::NewL( iContainer ),
        _L("Test CBCTestEffectCmdCase") );

    }
开发者ID:cdaffara,项目名称:symbiandump-mw1,代码行数:29,代码来源:bctestskinsview.cpp


示例16: ConstructL

void CTestView::ConstructL() 
	{
	iControl=new(ELeave) CTestViewControl;
    iControl->ConstructL(ViewId());
	iControl->SetRect(ClientRect());
	AddToStackL(iControl);
	}
开发者ID:cdaffara,项目名称:symbiandump-mw1,代码行数:7,代码来源:tview2.CPP


示例17: ClientRect

void NCProgressWin::Paint( wal::GC& gc, const crect& paintRect )
{
	crect rect = ClientRect();
	int w = rect.Width();

	Draw3DButtonW2( gc, rect, 0x808080, false );
	rect.Dec();
	rect.Dec();
	w -= 2;

	if ( !( _num < _from || _to <= _from || w <= 0 ) )
	{
		int64_t size = _to - _from;
		int n = int( ( w * _num ) / size );

		crect r = rect;
		r.right = n;

		unsigned color = 0xA00000;
		unsigned bColor = ColorTone( color, -80 ), aColor = ColorTone( color, +80 );
		FillHorisont( gc, r, aColor, bColor );

		_lastWidth = w;
		_lastPos = n;
		rect.left += n;
	}

	unsigned color = 0xB0B0B0;
	unsigned bColor = ColorTone( color, +50 ), aColor = ColorTone( color, -50 );
	FillHorisont( gc, rect, aColor, bColor );

}
开发者ID:FaionWeb,项目名称:WCMCommander,代码行数:32,代码来源:fileopers.cpp


示例18: ClientRect

// ---------------------------------------------------------
// CSymTorrentStatusView::HandleViewRectChange()
// ---------------------------------------------------------
//
void CSymTorrentStatusView::HandleViewRectChange()
    {
    if ( iStatusContainer )
        {
        iStatusContainer->SetRect( ClientRect() );
        }
    }
开发者ID:Nokia700,项目名称:SymTorrent,代码行数:11,代码来源:SymTorrentStatusView.cpp


示例19: new

void 
CVicinityView::DoActivateL(const TVwsViewId& aPrevViewId,
                           TUid aCustomMessageId,
                           const TDesC8& aCustomMessage) 
{
   iWayFinderUI->GetNavigationDecorator()->MakeScrollButtonVisible( ETrue );
   if (!iContainer) {
      iContainer = new (ELeave) CVicinityContainer;
      iContainer->SetMopParent(this);
      iContainer->ConstructL(ClientRect(), 
                             this,
                             iWayFinderUI,
                             iMapView);
      if( iGpsPos.lat != MAX_INT32 ) {
         iContainer->setGpsPos( iGpsPos,
                                (int) iHeading360 );
      }
      iContainer->SetDetailFetcher(m_detailFetcher);
      iContainer->SetFavoriteFetcher(m_favoriteFetcher);
      AppUi()->AddToStackL(* this, iContainer);
   }


   /* Special case for fixed point vicinity information */
   if(!iWayFinderUI->IsGpsConnected()) {
      iContainer->ForceUpdate();
   }
   
}
开发者ID:VLjs,项目名称:Wayfinder-S60-Navigator,代码行数:29,代码来源:VicinityView.cpp


示例20: ClientRect

// ---------------------------------------------------------
// CMailIdView::HandleClientRectChange()
// ---------------------------------------------------------
//
void CMailIdView::HandleClientRectChange()
    {
    if ( iContainer )
        {
        iContainer->SetRect( ClientRect() );
        }
    }
开发者ID:deepakprabhakara,项目名称:ripplevault,代码行数:11,代码来源:mailidview.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ ClientToScreen函数代码示例发布时间:2022-05-30
下一篇:
C++ ClientPrint函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap