⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 soundview.h

📁 symbian 可以实现控制声音大小的源码 非常实用!
💻 H
字号:
/* Copyright (c) 2004, Nokia. All rights reserved */


#ifndef __SOUNDVIEW_H__
#define __SOUNDVIEW_H__


// INCLUDES
#include <coecntrl.h>
#include <coeccntx.h>


// FORWARD DECLARATIONS
class CEikLabel;
class CSoundDocument;


// CLASS DECLARATION

/**
* CSoundView
* An instance of the Application View object for the Sound 
* example application
*/
class CSoundView : public CCoeControl
    {
    public:

        /**
        * NewL
        * Two-phased constructor.
        * Create a CSoundView object, which will draw itself to aRect
        * @param aRect the rectangle this view will be drawn to
        * @param aMessage the text to use for the label
        * @return a pointer to the created instance of CSoundView
        */
        static CSoundView* NewL( const TRect& aRect, const TDesC& aMessage );
        
        /**
        * NewL
        * Two-phased constructor.
        * Create a CSoundView object, which will draw itself to aRect
        * @param aRect the rectangle this view will be drawn to
        * @param aMessage the text to use for the label
        * @return a pointer to the created instance of CSoundView
        */
        static CSoundView* NewLC( const TRect& aRect, const TDesC& aMessage );

        /**
        * ~CSoundView
        * Virtual Destructor.
        */
        virtual ~CSoundView();

        /**
        * NotifyStatusL
        * Display a string identifying the current audio utility
        * @param aMessage the string to be displayed
        */
        void NotifyStatusL( const TDesC& aMessage );


    public:  // from CCoeControl

        /**
        * Draw
        * Draw this CSoundView to the screen
        * @param aRect the rectangle of this view that needs updating
        */
        void Draw( const TRect& aRect ) const;

    
    protected: // From CCoeControl

        /**
        * CountComponentControls.
        * Returns number of component.
        * @return Number of controls
        */
        TInt CountComponentControls() const;


        /**
        * ComponentControl.
        * Returns pointer to particular component.
        * @param aIndex Index of the control
        * @return Pointer to Control's component control, identified by index
        */
        CCoeControl* ComponentControl( TInt aIndex ) const;

        /**
        * SizeChanged
        * Called by framework when the View size is changed.
        */
        void SizeChanged(); 

    private:  // Constructors and destructor

        /**
        * CSoundView.
        * C++ default constructor.
        */
        CSoundView();


        /**
        * ConstructL
        * 2nd phase constructor.
        * @param aRect the rectangle this view will be drawn to
        * @param aMessage the text to use for the label
        */
        void ConstructL( const TRect& aRect, const TDesC& aMessage );


    private:    // Data

        /**
        * iLabel the label for displaying the current sound utility identifier
        * owned by CSoundView object.
        */
        CEikLabel* iLabel;

        /** iBrushStyle the brush style **/
        CWindowGc::TBrushStyle iBrushStyle;

        /** iBrushColor the brush color **/
        TRgb iBrushColor;
    };

#endif // __SOUNDVIEW_H__

// End of File

⌨️ 快捷键说明

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