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

📄 bitmaprotatorappui.cpp

📁 《基于Symbian OS的手机开发与应用实践》这本书的配套源码。
💻 CPP
字号:
/*
* ============================================================================
*  Name     : CBitmapRotatorAppUi from BitmapRotatorAppui.cpp
*  Part of  : BitmapRotator
*  Created  : 30.01.2006 by ToBeReplacedByAuthor
*  Implementation notes:
*     Initial content was generated by Series 60 Application Wizard.
*  Version  :
*  Copyright: ToBeReplacedByCopyright
* ============================================================================
*/

// INCLUDE FILES
#include "BitmapRotatorAppui.h"
#include "BitmapRotatorContainer.h" 
#include <BitmapRotator.rsg>
#include "BitmapRotator.hrh"

#include <avkon.hrh>

// ================= MEMBER FUNCTIONS =======================
//
// ----------------------------------------------------------
// CBitmapRotatorAppUi::ConstructL()
// 
// ----------------------------------------------------------
//
void CBitmapRotatorAppUi::ConstructL()
    {
    BaseConstructL();

    iAppContainer = new (ELeave) CBitmapRotatorContainer;
    iAppContainer->SetMopParent( this );
    iAppContainer->ConstructL( ClientRect() );
    AddToStackL( iAppContainer );
    }

// ----------------------------------------------------
// CBitmapRotatorAppUi::~CBitmapRotatorAppUi()
// Destructor
// Frees reserved resources
// ----------------------------------------------------
//
CBitmapRotatorAppUi::~CBitmapRotatorAppUi()
    {
    if (iAppContainer)
        {
        RemoveFromStack( iAppContainer );
        delete iAppContainer;
        }
   }

// ----------------------------------------------------
// CBitmapRotatorAppUi::HandleCommandL(TInt aCommand)
// takes care of command handling
// ----------------------------------------------------
//
void CBitmapRotatorAppUi::HandleCommandL(TInt aCommand)
    {
    switch ( aCommand )
        {
        case EAknSoftkeyBack:
        case EEikCmdExit:
            {
            Exit();
            break;
            }
        case EBitmapRotatorRotateLeft:
            {
            TKeyEvent keyEvent = {0, EStdKeyLeftArrow, 0, 0};
            TEventCode eventCode = EEventKey;
            iAppContainer->OfferKeyEventL(keyEvent, eventCode);
            break;
            }
        case EBitmapRotatorRotateRight:
            {
            TKeyEvent keyEvent = {0, EStdKeyRightArrow, 0, 0};
            TEventCode eventCode = EEventKey;
            iAppContainer->OfferKeyEventL(keyEvent, eventCode);
            break;
            }
        case EBitmapRotatorMirrorHorizontal:
            {
            TKeyEvent keyEvent = {0, EStdKeyUpArrow, 0, 0};
            TEventCode eventCode = EEventKey;
            iAppContainer->OfferKeyEventL(keyEvent, eventCode);
            break;
            }
        case EBitmapRotatorMirrorVertical:
            {
            TKeyEvent keyEvent = {0, EStdKeyDownArrow, 0, 0};
            TEventCode eventCode = EEventKey;
            iAppContainer->OfferKeyEventL(keyEvent, eventCode);
            break;
            }
         default:
            break;      
        }
    }



// End of File  

⌨️ 快捷键说明

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