// ----------------------------------------------------------------------------- // CNaviScrollTimer::UpdateNaviPaneL() // Updates the Navigation pane. Every time when this function is called // it moves the text to the left by one character. // ----------------------------------------------------------------------------- // TBool CNaviScrollTimer::UpdateNaviPaneL() { TBool returnVal( EFalse ); // Return ETrue if text is scrolled totally to left if( iCount == iNaviText->Des().Length() ) returnVal = ETrue; // NaviLabel can only be updated by creating a new navidecorator. if( iDecorator ) { iNaviPane->Pop( iDecorator ); delete iDecorator; iDecorator = NULL; } // Create new decorator iDecorator = iNaviPane->CreateNavigationLabelL(); // Push decorator object to the navigation pane's object stack. iNaviPane->PushL( *iDecorator ); // Get the control inside of decorator object as CAknNaviLabel. CAknNaviLabel* naviLabel = static_cast<CAknNaviLabel*>( iDecorator->DecoratedControl() ); // Finally set label text naviLabel->SetTextL( iNaviText->Des().Right(iCount) ); iCount--; if(iCount == 0) iCount = iNaviText->Des().Length(); return returnVal; }
/* ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- */ void CYuccaNavi::GetTextL(TDes& aText) { if(iNaviDecorator) { if(iNaviDecorator->DecoratedControl()) { CAknNaviLabel* Tmp = STATIC_CAST(CAknNaviLabel*, iNaviDecorator->DecoratedControl()); const TDesC* Texksti = Tmp->Text(); if(Texksti) { aText.Copy(*Texksti); } } }
// ---------------------------------------------------------------------------- // CNaviPaneHandler::SetNaviPaneTitleL // // ---------------------------------------------------------------------------- // void CNaviPaneHandler::SetNaviPaneTitleL(const TDesC& aTitle) { if ( !iStatusPane || !iNaviPane ) { return; } if ( iNaviDecorator ) { CAknNaviLabel* naviLabel = static_cast<CAknNaviLabel*>(iNaviDecorator->DecoratedControl()); if ( naviLabel ) { naviLabel->SetTextL( aTitle ); iNaviDecorator->DrawDeferred(); } } else { iNaviDecorator = iNaviPane->CreateNavigationLabelL( aTitle ) ; iNaviPane->PushL( *iNaviDecorator ); // activate navi label in navi pane iNavidecoratorPushed = ETrue; } }