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

📄 cameraappbasecontainer.h

📁 S60官方摄像头程序
💻 H
字号:
/*
* ============================================================================
*  Name     : CCameraAppBaseContainer from CameraAppContainer.h
*  Part of  : CameraApp
*  Created  : 02/09/2004 by Forum Nokia
*  Description:
*     Declares container control for application.
*  Version  :
*  Copyright: Nokia Corporation, 2004
* ============================================================================
*/

#ifndef __CAMERAAPP_BASE_CONTAINER_H__
#define __CAMERAAPP_BASE_CONTAINER_H__

#include <coecntrl.h>
#include <akntabobserver.h>
   
class CFbsBitmap;
class CWsBitmap;
class CFbsBitGc;
class CFbsBitmapDevice;
class CCameraAppController;
class CAknNavigationDecorator;

/**
*  CCameraAppBaseContainer  container control class.
*  
*/
class CCameraAppBaseContainer : public CCoeControl, MCoeControlObserver, public MAknTabObserver
    {
    public: // Constructors and destructor
        
        /**
         * Symbian OS second phase constructor.
         * @param aRect Frame rectangle for container.
         */
        void ConstructL(const TRect& aRect);

        /**
         * Symbian OS default constructor.
         * @param aController Camera controller
         */
        CCameraAppBaseContainer(CCameraAppController& aController) 
            : iController( aController ) { };

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

    public: // New functions
		/**
		 * Draw the bitmap image immediately
		 * @param aBitmap bitmap to be displayed
		 */
		void DrawImageNow(CFbsBitmap& aBitmap);

		/**
		 * Redraw the offscree bitmap	
		 */
		void ReDrawOffScreenBitmap();

		/**
		 * Redraw the navi tabs	
		 */
	    void RedrawNaviTabsL();

		/** 
		 * Shows the conversion status on the navi tab area
		 * @param aStatus text to be display
		 */
	    void ShowConversionStatusL( const TDesC &aStatus );


    public:  // Functions from base classes
		/**
		 * Show the error message on the screen
		 * @param aMsg the message to be displayed
		 */
	    void ShowErrorMessage( const TDesC &aMsg );

        /** 
		 * See CCoeControl::OfferKeyEventL() 
		 */
		TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType);

	   /**
        * From MAknTabObserver, takes care of tab handling.
        * @param aIndex tab to be handled
        */
        virtual void TabChangedL(TInt aIndex); 

	protected: // New protected functions
		/** 
		 * Draw a bitmap to the real screen
		 */
		void DrawImage(CWindowGc& aGc ,const TRect& aRect) const;

	private: // New function
		/*
		 *	Create the offscreen bitmap
		 */
		void CreateOffScreenBitmapL();


    private: // Functions from base classes       	
		/**
		* From MCoeControlObserver
		* Acts upon changes in the hosted control's state. 
		*
		* @param aControl	The control changing its state
		* @param aEventType	The type of control event 
		*/
        void HandleControlEventL(CCoeControl* aControl,TCoeEvent aEventType);
        
    protected: //data       
        CFbsBitmap* iBitmap;
        CWsBitmap* iOffScreenBitmap;
        CFbsBitGc* iFbsBitGc;
        CFbsBitmapDevice* iBmpDevice;

        CCameraAppController& iController;
        TBool iOffScreenBitmapCreated;

		CAknNavigationDecorator* iNaviLabel;
		CAknNavigationDecorator* iNaviDecorator;
    };

#endif // __CAMERAAPP_BASE_CONTAINER_H__

⌨️ 快捷键说明

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