|
Nokia N97 SDK Example Applications Guide |
#include <NaviScrollTimer.h>
Inheritance diagram for CNaviScrollTimer:

Definition at line 29 of file NaviScrollTimer.h.
Public Member Functions |
|
| CNaviScrollTimer () | |
| ~CNaviScrollTimer () | |
| void | StartScroll () |
Static Public Member Functions |
|
| static CNaviScrollTimer * | NewL (const TDesC &aNavitext) |
Private Member Functions |
|
| TBool | UpdateNaviPaneL () |
| void | ConstructL (const TDesC &aNavitext) |
| void | RunL () |
Private Attributes |
|
| CAknNavigationControlContainer * | iNaviPane |
| CAknNavigationDecorator * | iDecorator |
| TInt | iCount |
| HBufC * | iNaviText |
|
|
C++ default constructor. Definition at line 37 of file NaviScrollTimer.cpp. Referenced by NewL().
|
|
|
Destructor Definition at line 47 of file NaviScrollTimer.cpp. References iDecorator, iNaviPane, and iNaviText. 00048 { 00049 Cancel(); 00050 delete iNaviText; 00051 00052 if( iDecorator ) 00053 { 00054 if( iNaviPane ) iNaviPane->Pop( iDecorator ); 00055 delete iDecorator; 00056 } 00057 }
|
|
|
Two-phased constructor.
Definition at line 83 of file NaviScrollTimer.cpp. References CNaviScrollTimer(). Referenced by CListboxSettingList::ConstructL(), CListboxNumberContainer::ConstructL(), and CListboxGraphicContainer::ConstructL(). 00084 { 00085 CNaviScrollTimer* self = new ( ELeave ) CNaviScrollTimer(); 00086 CleanupStack::PushL( self ); 00087 self->ConstructL( aNavitext ); 00088 CleanupStack::Pop( self ); 00089 return self; 00090 }
|
|
|
Starts to scroll navigation pane text. Scrolling is not started if given text fits to navigation pane. In this case it only adds text to navigation pane. Definition at line 114 of file NaviScrollTimer.cpp. References iNaviText, and UpdateNaviPaneL(). Referenced by CListboxSettingList::ConstructL(), CListboxNumberContainer::ConstructL(), and CListboxGraphicContainer::ConstructL(). 00115 { 00116 // Start scrolling only if text do not fit to navi pane 00117 if( iNaviText->Des().Length() > KMaxVisibleStringLenth ) 00118 After( 1 ); 00119 else 00120 UpdateNaviPaneL(); 00121 }
|
|
|
Updates the Navigation pane. Every time when this function is called, it moves the text to the left by one character.
Definition at line 129 of file NaviScrollTimer.cpp. References iCount, iDecorator, iNaviPane, and iNaviText. Referenced by RunL(), and StartScroll(). 00130 { 00131 TBool returnVal( EFalse ); 00132 // Return ETrue if text is scrolled totally to left 00133 if( iCount == iNaviText->Des().Length() ) 00134 returnVal = ETrue; 00135 00136 // NaviLabel can only be updated by creating a new navidecorator. 00137 if( iDecorator ) 00138 { 00139 iNaviPane->Pop( iDecorator ); 00140 delete iDecorator; 00141 iDecorator = NULL; 00142 } 00143 // Create new decorator 00144 iDecorator = iNaviPane->CreateNavigationLabelL(); 00145 // Push decorator object to the navigation pane's object stack. 00146 iNaviPane->PushL( *iDecorator ); 00147 // Get the control inside of decorator object as CAknNaviLabel. 00148 CAknNaviLabel* naviLabel = 00149 static_cast<CAknNaviLabel*>( iDecorator->DecoratedControl() ); 00150 // Finally set label text 00151 naviLabel->SetTextL( iNaviText->Des().Right(iCount) ); 00152 00153 iCount--; 00154 if(iCount == 0) 00155 iCount = iNaviText->Des().Length(); 00156 00157 return returnVal; 00158 }
|
|
|
2nd phase constructor.
Definition at line 64 of file NaviScrollTimer.cpp. References iCount, iNaviPane, and iNaviText. 00065 { 00066 CActiveScheduler::Add( this ); 00067 CTimer::ConstructL(); 00068 00069 iNaviText = aNavitext.AllocL(); 00070 iCount = iNaviText->Des().Length(); 00071 00072 // Get the navigation pane 00073 CEikStatusPane* sp = CEikonEnv::Static()->AppUiFactory()->StatusPane(); 00074 iNaviPane = static_cast<CAknNavigationControlContainer*>( 00075 sp->ControlL( TUid::Uid( EEikStatusPaneUidNavi ) ) ); 00076 }
|
|
|
After completed timer period, execution comes to RunL Definition at line 97 of file NaviScrollTimer.cpp. References UpdateNaviPaneL(). 00098 { 00099 TInt timeout; 00100 00101 if( UpdateNaviPaneL() ) 00102 timeout = KScrollStartTimeout; 00103 else 00104 timeout = KScrollTimeout; 00105 00106 After( timeout ); 00107 }
|
|
|
A pointer to default control in navigation pane. Not owned Definition at line 90 of file NaviScrollTimer.h. Referenced by ConstructL(), UpdateNaviPaneL(), and ~CNaviScrollTimer(). |
|
|
A pointer to navigation pane decorator. Owned Definition at line 97 of file NaviScrollTimer.h. Referenced by UpdateNaviPaneL(), and ~CNaviScrollTimer(). |
|
|
Integer indicating current shown text length in navigation pane. Definition at line 102 of file NaviScrollTimer.h. Referenced by ConstructL(), and UpdateNaviPaneL(). |
|
|
Text shown in navigation pane. Owned. Definition at line 109 of file NaviScrollTimer.h. Referenced by ConstructL(), StartScroll(), UpdateNaviPaneL(), and ~CNaviScrollTimer(). |
|
© Nokia 2009 |