本文整理汇总了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);
}
示例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()");
}
示例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
}
示例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);
}
示例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() );
}
示例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() );
}
示例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;
}
示例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();
}
示例9: ClientRect
/*
------------------------------------------------------------------------------
------------------------------------------------------------------------------
*/
void CMovingBallAppUi::HandleStatusPaneSizeChange()
{
if(iAppView)
{
iAppView->SetRect( ClientRect() );
}
if(iMySplashScreen)
{
iMySplashScreen->SetRect( ClientRect() );
}
}
示例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;
}
示例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);
}
示例12: BaseConstructL
/*
* Construct an object of CYPagesAppView Class.
*/
void CYPagesAppUi::ConstructL()
{
BaseConstructL(EAknEnableSkin);
iAppView = CYPagesAppView::NewL(ClientRect());
iCoeEnv->ReadResource(iAppView->iDisplayText,R_EXAMPLE_TEXT);
}
示例13: ClientRect
// ---------------------------------------------------------
// CApSettingsPlugin::HandleClientRectChange
// ---------------------------------------------------------
void CCertManUIPlugin::HandleClientRectChange()
{
if ( iContainer )
{
iContainer->SetRect( ClientRect() );
}
}
示例14: ClientRect
// ---------------------------------------------------------
// CSymTorrentFilesView::HandleViewRectChange()
// ---------------------------------------------------------
//
void CSymTorrentFilesView::HandleViewRectChange()
{
if ( iFilesContainer )
{
iFilesContainer->SetRect( ClientRect() );
}
}
示例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") );
}