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

📄 multiviewsappui.cpp

📁 symbian os c/c++ 多个view切换
💻 CPP
字号:
/*
* ==============================================================================
*  Name        : multiviewsappui.cpp
*  Part of     : MultiViews
*  Interface   :
*  Description :
*  Version     :
*
Copyright (c) 2004 - 2006 Nokia Corporation.
*  This material, including documentation and any related
*  computer programs, is protected by copyright controlled by
*  Nokia Corporation.
* ==============================================================================
*/


// INCLUDE FILES
#include <e32std.h>

#include "MultiViews.pan"
#include "MultiViewsAppUi.h"
#include "MultiViewsView1.h"
#include "MultiViewsView2.h"


// ========================= MEMBER FUNCTIONS ==================================

// -----------------------------------------------------------------------------
// CMultiViewsAppUi::ConstructL()
// Symbian 2nd phase constructor can leave.
// -----------------------------------------------------------------------------
//
void CMultiViewsAppUi::ConstructL()
    {
    // Initialise app UI
    BaseConstructL(EAknEnableSkin);

    iAppView1 = CMultiViewsView1::NewL();
    iAppView2 = CMultiViewsView2::NewL();

    // Transfer ownership to base class
    AddViewL( iAppView1 );
    AddViewL( iAppView2 );

    SetDefaultViewL( *iAppView1 );
    }

// -----------------------------------------------------------------------------
// CMultiViewsAppUi::HandleCommandL()
// Takes care of command handling.
// -----------------------------------------------------------------------------
//
void CMultiViewsAppUi::HandleCommandL( TInt aCommand )
    {
    switch ( aCommand )
        {
        case EEikCmdExit:
        case EAknSoftkeyExit:
            Exit();
            break;
        default:
            Panic( EMultiViewsBasicUi );
            break;
        }
    }

// -----------------------------------------------------------------------------
// CMultiViewsAppUi::HandleResourceChangeL()
// Called by framework when layout is changed.
// -----------------------------------------------------------------------------
//
void CMultiViewsAppUi::HandleResourceChangeL( TInt aType )
    {
    CAknAppUi::HandleResourceChangeL( aType );
       
    if ( aType==KEikDynamicLayoutVariantSwitch )
        {
        iAppView1->HandleSizeChange(aType);
        iAppView2->HandleSizeChange(aType);
        }           
    }
    
// End of File

⌨️ 快捷键说明

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