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


C++ ClientRect函数代码示例

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


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


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