void CMyListBoxAppView::CreateListBoxL() { // Creates a new custom list box. iListBox = new (ELeave) CCustomListBox(); iListBox->ConstructL(this,CEikListBox::ENoFirstLetterMatching| CEikListBox::ENoExtendedSelection); iListBox->SetListBoxObserver(this); // Fills the list box with some items. UpdateListBoxL(iIsDoubleLine); }
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(); }
// --------------------------------------------------------- // CCertManUIContainerTrust::DrawListBoxL( // TInt aCurrentPosition, TInt aTopItem, TInt aCertificateIndex) // Draws listbox // --------------------------------------------------------- // void CCertManUIContainerTrust::DrawListBoxL( TInt aCurrentPosition, TInt aTopItem, TInt aCertificateIndex) { CERTMANUILOGGER_ENTERFN( " CCertManUIContainerTrust::DrawListBoxL" ); iListBox->SetTopItemIndex( aTopItem ); iListBox->SetCurrentItemIndex( aCurrentPosition ); UpdateListBoxL( aCertificateIndex ); ActivateL(); DrawNow(); CERTMANUILOGGER_LEAVEFN( " CCertManUIContainerTrust::DrawListBoxL" ); }
// --------------------------------------------------------- // CCertManUIContainerPersonal::ConstructL( // const TRect& aRect, TInt aCurrentPosition, TInt aTopItem) // EPOC two phased constructor // --------------------------------------------------------- // void CCertManUIContainerPersonal::ConstructL( const TRect& aRect, TInt aCurrentPosition, TInt aTopItem ) { CERTMANUILOGGER_ENTERFN( " CCertManUIContainerPersonal::ConstructL" ); CreateWindowL(); CreateListBoxL(); UpdateListBoxL( aCurrentPosition, aTopItem ); if ( iListBox ) { // Creates graphic. iListBox->ItemDrawer()->ColumnData()-> SetIconArray( iIconHandler->CreateIconArrayL() ); } SetRect( aRect ); CERTMANUILOGGER_LEAVEFN( " CCertManUIContainerPersonal::ConstructL" ); }
// --------------------------------------------------------------------------- // CGSSenSensorsView::ChangeSensorActiveSettingL // Change sensors active status setting . // --------------------------------------------------------------------------- // void CGSSenSensorsView::ChangeSensorActiveSettingL() { TRACE_( "[GSSensorPlugin] CGSSenSensorsView::ChangeSensorActiveSettingL()" ); TInt currentValue = iModel->SensorActiveStatusL(); if( currentValue == KGSSenOff ) { currentValue = KGSSenOn; } else { currentValue = KGSSenOff; } iModel->SetSensorActiveStatusL( currentValue ); UpdateListBoxL( KGSSenorsActive ); TRACE_( "[GSSensorPlugin] CGSSenSensorsView::ChangeSensorActiveSettingL() - return" ); }