videoplayback/inc/mpxvideoplaybackmediadetailsviewer.h
branchRCL_3
changeset 11 8970fbd719ec
parent 9 5294c000a26d
child 21 315810614048
equal deleted inserted replaced
10:112a725ff2c2 11:8970fbd719ec
    13 *
    13 *
    14 * Description:  Media Details Viewer
    14 * Description:  Media Details Viewer
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 // Version : %version:  e003sa33#5 %
    18 // Version : %version:  e003sa33#6 %
    19 
    19 
    20 #ifndef MPXVIDEOPLAYBACKMEDIADETAILSVIEWER_H_
    20 #ifndef MPXVIDEOPLAYBACKMEDIADETAILSVIEWER_H_
    21 #define MPXVIDEOPLAYBACKMEDIADETAILSVIEWER_H_
    21 #define MPXVIDEOPLAYBACKMEDIADETAILSVIEWER_H_
    22 
    22 
    23 //  INCLUDES
    23 //  INCLUDES
   121         void FormatLabelsL() const;   
   121         void FormatLabelsL() const;   
   122         
   122         
   123         void UpdateBackgroundBitmapL() const;
   123         void UpdateBackgroundBitmapL() const;
   124         
   124         
   125         /** 
   125         /** 
   126         * Timer callback for scroll filename timer
   126         * Timer callback for scroll timer
   127         * @since 9.2 
   127         * @since 9.2 
   128         * @param aPtr Pointer to timers callback 
   128         * @param aPtr Pointer to timers callback 
   129         * @return KErrNone 
   129         * @return KErrNone 
   130         */ 
   130         */ 
   131         static TInt ScrollFilenameTimer( TAny* aPtr );
   131         static TInt ScrollTimer( TAny* aPtr );
   132 
   132 
   133         /** 
   133         /** 
   134         * Handle Scroll Filename Timer
   134         * Handle Scroll Timer
   135         * @since 9.2 
   135         * @since 9.2 
   136         * @return void 
   136         * @return void 
   137         */ 
   137         */ 
   138         void HandleScrollFilenameTimerL();   
   138         void HandleScrollTimerL();
   139         
   139         
   140         /** 
   140         /** 
   141         * Determine the number of items to be shown in the viewer
   141         * Determine the number of items to be shown in the viewer
   142         * @since 9.2 
   142         * @since 9.2 
   143         * @return the number of rows to be created
   143         * @return the number of rows to be created
   148         * Dynamically calculate determine the viewer rectangle dyanmically
   148         * Dynamically calculate determine the viewer rectangle dyanmically
   149         * @since 9.2 
   149         * @since 9.2 
   150         * @return the viewer rect
   150         * @return the viewer rect
   151         */                   
   151         */                   
   152         TRect CalculateViewerRectL();          
   152         TRect CalculateViewerRectL();          
       
   153 
       
   154         /**
       
   155          * Update the text of filename label
       
   156          */
       
   157         void UpdateFilenameL();
       
   158 
       
   159         /**
       
   160          * Update the text of title label
       
   161          */
       
   162         void UpdateTitleL();
       
   163 
       
   164     private:
       
   165         
       
   166         /**
       
   167          * Scroll the too long text for some label
       
   168          */
       
   169         class TTextScroller
       
   170         {
       
   171             public:
       
   172         
       
   173                 /**
       
   174                  * Constructor
       
   175                  */
       
   176                 TTextScroller();
       
   177 
       
   178                 /**
       
   179                  * Check if the source text needs scrolling.
       
   180                  */
       
   181                 TBool IsScrollNeeded();
       
   182 
       
   183                 /**
       
   184                  * Check if the text of a label needs to be updated
       
   185                  */
       
   186                 TBool IsUpdateNeeded();
       
   187 
       
   188                 /**
       
   189                  * Scroll the source text, and append it to the destination text
       
   190                  *
       
   191                  * @param aSrcText the source text to be scrolled.
       
   192                  * @param aDesText to which the scrolled text to be appended
       
   193                  */
       
   194                 void ScrollText( const TDesC& aSrcText, TDes& aDesText );
       
   195 
       
   196             private:
   153                 
   197                 
       
   198                 TUint32		iDelayBeginningTick;
       
   199                 TInt		iTextScrollPos;
       
   200                 TBool		iDelay;
       
   201                 TBool		iScroll;
       
   202                 TInt		iSrcTextLen;
       
   203         };
   154 
   204 
   155     private:    // Data
   205     private:    // Data
       
   206         
   156         CMPXVideoPlaybackControlsController* iController;
   207         CMPXVideoPlaybackControlsController* iController;
   157         
   208         
   158         CEikLabel*                           iClipnameLabel;
   209         CEikLabel*                           iClipnameLabel;
   159         CEikLabel*                           iTitleLabel;
   210         CEikLabel*                           iTitleLabel;
   160         CEikLabel*                           iArtistLabel;        
   211         CEikLabel*                           iArtistLabel;        
   166         CEikLabel*                           iAdditionalLabel;
   217         CEikLabel*                           iAdditionalLabel;
   167         
   218         
   168 
   219 
   169         CFbsBitmap*                          iBackgroundBitmap;   
   220         CFbsBitmap*                          iBackgroundBitmap;   
   170         CPeriodic*                           iScrollingTextTimer;
   221         CPeriodic*                           iScrollingTextTimer;
   171         TInt                                 iScrollPosition;
       
   172         TBool                                iShouldPauseScrolling;
       
   173         TRect                                iViewerRect;
   222         TRect                                iViewerRect;
   174         HBufC*                               iAdditionalString;
   223         HBufC*                               iAdditionalString;
   175         TUint32                              iScrollTimerDelayBeginningTick;
   224         TTextScroller                        iFilenameScroller;
       
   225         TTextScroller                        iTitleScroller;
       
   226         // after every scrolling label has updated, draw them
       
   227         TBool                                iScrolledTextUpdated; 
   176 };
   228 };
   177 
   229 
   178 
   230 
   179 
   231 
   180 #endif /* MPXVIDEOPLAYBACKMEDIADETAILSVIEWER_H_ */
   232 #endif /* MPXVIDEOPLAYBACKMEDIADETAILSVIEWER_H_ */