vrexnavidecoratortime.h

来自「symbian s60 有关音频的代码实例,供参考」· C头文件 代码 · 共 79 行

H
79
字号
/*
* ============================================================================
*  Name     : CVideoNaviDecoratorTime from VRexNaviDecoratorTime.h
*  Part of  : Video Example
*  Created  : 30/08/2006 by Forum  Nokia
*  Implementation notes:
*  Version  : 2.0
*  Copyright: Nokia Corporation, 2006
* ============================================================================
*/

#ifndef __VIDEONAVIDECORATORTIMER_H__
#define __VIDEONAVIDECORATORTIMER_H__

#include <coecntrl.h>
#include <aknutils.h>

const TInt KLeftX	= 0;
const TInt KLeftY	= 0;
const TInt KRightX	= 120;
const TInt KRightY	= 16;

/**
 *  CVideoNaviDecoratorTime
 *  A specific control to display time progress when playing a video clip. 
 *  It can also be used to display some status information.
 */
class CVideoNaviDecoratorTime : public CCoeControl
    {
    public:  // Constructors and destructor
        /**
        * Two-phased constructor.
        */
        static CVideoNaviDecoratorTime* NewL();

        /**
        * Destructor.
        */
        virtual ~CVideoNaviDecoratorTime();

    public: // New functions
        /**
         * This method updates label (time string) in navi pane.
         * @param aLabel, new label (time string)
         * @return void
         */
        void SetLabelL(const TDesC& aLabel);

    protected: // Functions from CCoeControl
        /**
         * See CCoeControl::SizeChanged().
         */
        void SizeChanged();

        /**
         * See CCoeControl::Draw(const TRect& aRect) const.
         */
        void Draw(const TRect& aRect) const;

    private:
        /**
         * C++ default constructor.
         */
        CVideoNaviDecoratorTime();

        /**
         * By default Symbian 2nd phase constructor is private.
         */
        void ConstructL();

    private: // Data
        // Label
        HBufC* iLabel;
        // Rectangle where label is drawn
        TAknLayoutText iTextLayout;
    };

#endif // __VIDEONAVIDECORATORTIMER_H__

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?