|
Nokia N97 SDK Example Applications Guide |
00001 /* 00002 * ============================================================================== 00003 * Name : NaviScrollTimer.h 00004 * Part of : Listbox example 00005 * Interface : 00006 * Description : 00007 * Version : 00008 * 00009 * Copyright (c) 2007 Nokia Corporation. 00010 * This material, including documentation and any related 00011 * computer programs, is protected by copyright controlled by 00012 * Nokia Corporation. 00013 * ============================================================================== 00014 */ 00015 00016 #ifndef NAVISCROLLTIMER_H 00017 #define NAVISCROLLTIMER_H 00018 00019 00020 #include <e32base.h> 00021 #include <aknnavilabel.h> 00022 #include <aknnavi.h> 00023 #include <aknnavide.h> 00024 00025 /** 00026 * CNaviScrollTimer class. 00027 * This class is used to scroll text on navigation pane. 00028 */ 00029 class CNaviScrollTimer : public CTimer 00030 { 00031 00032 public: 00033 00034 /** 00035 * Two-phased constructor. 00036 * @param aNavitext A string to navipane. 00037 */ 00038 static CNaviScrollTimer* NewL( const TDesC& aNavitext ); 00039 00040 /** 00041 * C++ default constructor. 00042 */ 00043 CNaviScrollTimer(); 00044 00045 /** 00046 * Destructor 00047 */ 00048 ~CNaviScrollTimer(); 00049 00050 public: // New functions 00051 00052 /** 00053 * Starts to scroll navigation pane text. Scrolling is not started if 00054 * given text fits to navigation pane. In this case it only adds text 00055 * to navigation pane. 00056 */ 00057 void StartScroll(); 00058 00059 private: 00060 00061 /** 00062 * Updates the Navigation pane. Every time when this function is called, 00063 * it moves the text to the left by one character. 00064 * @return ETrue if text is scrolled totally out of navigation pane, 00065 * otherwise EFalse. 00066 */ 00067 TBool UpdateNaviPaneL(); 00068 00069 /** 00070 * 2nd phase constructor. 00071 * @param aNavitext A string to navipane. 00072 */ 00073 void ConstructL( const TDesC& aNavitext ); 00074 00075 00076 private: // From CActive 00077 00078 /** 00079 * After completed timer period, execution comes to RunL 00080 */ 00081 void RunL(); 00082 00083 private: //Data 00084 00085 /** 00086 * A pointer to default control in navigation pane. 00087 * 00088 * Not owned 00089 */ 00090 CAknNavigationControlContainer* iNaviPane; 00091 00092 /** 00093 * A pointer to navigation pane decorator. 00094 * 00095 * Owned 00096 */ 00097 CAknNavigationDecorator* iDecorator; 00098 00099 /** 00100 * Integer indicating current shown text length in navigation pane. 00101 */ 00102 TInt iCount; 00103 00104 /** 00105 * Text shown in navigation pane. 00106 * 00107 * Owned. 00108 */ 00109 HBufC* iNaviText; 00110 00111 }; 00112 00113 #endif // NAVISCROLLTIMER_H 00114 00115 // End of File 00116
|
© Nokia 2009 |