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

📄 cameraappbasecontainer.h

📁 SYMBIAN camera 样例程序如果需要了解更多或缺少什么文件可以邮件联系我
💻 H
字号:
/*
* ============================================================================
*  Name     : CCameraAppBaseContainer from CameraAppBaseContainer.h
*  Part of  : CameraApp
*  Description:
*     Declares container control for application.
*  Created  : 05/06/2006 by Forum Nokia
*  Version  : 2.0
*  Copyright: Nokia Corporation, 2006
* ============================================================================
*/

#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);

        /**
         * Constructor.
         * @param aController Camera controller
         */
        CCameraAppBaseContainer(CCameraAppController& 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 RedrawNaviPaneL(CAknNavigationDecorator* aNaviDecorator);

        /** 
         * Shows the conversion status on the navi tab area
         * @param aStatus text to be display
         */
        void ShowConversionStatusL( const TDesC &aStatus );
        
        /** 
         * Shows the image capture mode (size/format) used by the engine
         * @param aMode text to be display
         */
        void ShowCaptureModeL( const TDesC &aMode );


    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();
        
        /*
         *	Create a label and display it on the navi pane
         */
        void CreateNaviLabelL( const TDesC &aText, 
                               CAknNavigationDecorator*& aNaviDec );

    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);
        
        /**
        * From CCoeControl
        * Handles changes to the control's resources.
        *
        * @param aType	A message UID value        
        */
        void HandleResourceChange( TInt aType );
        
        /**
        * From CoeControl
        * Called when this control's rect changes.
        */
        void SizeChanged();

    protected: //data       
        CFbsBitmap* iBitmap;
        CWsBitmap* iOffScreenBitmap;
        CFbsBitGc* iFbsBitGc;
        CFbsBitmapDevice* iBmpDevice;

        CCameraAppController& iController;
        TBool iOffScreenBitmapCreated;

        CAknNavigationDecorator* iConvLabel;
        CAknNavigationDecorator* iModeLabel;
   };

#endif // __CAMERAAPP_BASE_CONTAINER_H__

⌨️ 快捷键说明

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