www.pudn.com > nokie_soundplayer.rar > soundview.h


/* Copyright (c) 2004, Nokia. All rights reserved */ 
 
 
#ifndef __SOUNDVIEW_H__ 
#define __SOUNDVIEW_H__ 
 
 
// INCLUDES 
#include  
#include  
 
 
// 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