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

📄 aolabbubblesortappui.cpp

📁 《Symbian S60第3版手机程序开发与实用教程》光盘源代码
💻 CPP
字号:
// Copyright (c) 2006 Nokia Corporation.

#include <avkon.hrh>
#include <aknnotewrappers.h>
#include <stringloader.h>
#include <AOLabBubbleSort.rsg>
#include <f32file.h>
#include <s32file.h>
#include "AOLabBubbleSortAppUi.h"
#include "AOLabBubbleSortContainer.h"
#include "AOLabBubbleSort.hrh"


// Symbian 2nd phase constructor
void CAOLabBubbleSortAppUi::ConstructL()
    {
    BaseConstructL();
	iAppContainer = CAOLabBubbleSortContainer::NewL(ClientRect());
	}


// C++  constructor
CAOLabBubbleSortAppUi::CAOLabBubbleSortAppUi()
    {
    // No implementation required
    }


// C++ Destructor
CAOLabBubbleSortAppUi::~CAOLabBubbleSortAppUi()
    {
    delete iAppContainer;
    }


// Called by the EIKON framework just before it displays
// a menu pane. Its default implementation is empty, and by overriding it,
// the application can set the state of menu items dynamically according
// to the state of application data.
void CAOLabBubbleSortAppUi::DynInitMenuPaneL(TInt aResourceId, CEikMenuPane* aMenuPane)
    {
    if (aResourceId == R_MENU)
        {
       	if (iAppContainer->IsSorting())
            {
            aMenuPane->SetItemTextL(ECommandSort, R_COMMAND_CANCELSORTING);
            }
        else
        	{
        	aMenuPane->SetItemTextL(ECommandSort,R_COMMAND_STARTSORTING);
        	}
        }
    }
    

// Takes care of command handling
void CAOLabBubbleSortAppUi::HandleCommandL( TInt aCommand )
    {
    switch( aCommand )
        {
        case EEikCmdExit:
        case EAknSoftkeyExit:
        	{	
            Exit();
            break;
        	}

        case ECommandSort:
            {
            if (iAppContainer->IsSorting())
            	{
            	iAppContainer->CancelSortL();
            	}
            else
              	{
              	iAppContainer->SortL();
            	}
            break;
            }
            
        default:
            break;
        }
    }


//  Called by the framework when the application status pane size is changed.
void CAOLabBubbleSortAppUi::HandleStatusPaneSizeChange()
{
	iAppContainer->SetRect( ClientRect() );
} 

// End of File

⌨️ 快捷键说明

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