📄 drawappui.cpp
字号:
/*
* ============================================================================
* Name : CDrawAppUi from DrawAppui.cpp
* Part of : Draw
* Created : 22.04.2005 by
* Implementation notes:
* Initial content was generated by Series 60 Application Wizard.
* Version :
* Copyright:
* ============================================================================
*/
// INCLUDE FILES
#include "DrawAppui.h"
#include "DrawContainer.h"
#include <Draw.rsg>
#include "Draw.hrh"
//add by wwx
#include <stdlib.h>
//end
#include <avkon.hrh>
// ================= MEMBER FUNCTIONS =======================
//
// ----------------------------------------------------------
// CDrawAppUi::ConstructL()
//
// ----------------------------------------------------------
//
//CDrawContainer* iAppContainer;
void CDrawAppUi::ConstructL()
{
BaseConstructL();
iAppContainer = new (ELeave) CDrawContainer;
iAppContainer->SetMopParent( this );
iAppContainer->ConstructL( ClientRect() );
// iAppContainer->Drawmap();
/* for(int w=0;w<5;w++)
{
iAppContainer->SetData(50*w);
iAppContainer->DrawDeferred();
// for(int z=0;z<1000000000;z++);
}*/
// TRect rect = iAppContainer->Rect();
// iAppContainer->Drawmap(rect);
/*//add by wwx
char **R,**G,**B;
if ((R=(byte**)calloc(
for(int i=0;i<200;i++)
for (int j=0;j<200;j++)
{
R[j][i]=G[j][i]=B[j][i]=0;
}
iAppContainer->Draw(R,G,B);
//end */
//iAppContainer->Draw( ClientRect() );
AddToStackL( iAppContainer );
}
// ----------------------------------------------------
// CDrawAppUi::~CDrawAppUi()
// Destructor
// Frees reserved resources
// ----------------------------------------------------
//
CDrawAppUi::~CDrawAppUi()
{
if (iAppContainer)
{
RemoveFromStack( iAppContainer );
delete iAppContainer;
}
}
// ------------------------------------------------------------------------------
// CDrawAppUi::DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane)
// This function is 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 CDrawAppUi::DynInitMenuPaneL(
TInt /*aResourceId*/,CEikMenuPane* /*aMenuPane*/)
{
}
// ----------------------------------------------------
// CDrawAppUi::HandleKeyEventL(
// const TKeyEvent& aKeyEvent,TEventCode /*aType*/)
// takes care of key event handling
// ----------------------------------------------------
//
TKeyResponse CDrawAppUi::HandleKeyEventL(
const TKeyEvent& /*aKeyEvent*/,TEventCode /*aType*/)
{
return EKeyWasNotConsumed;
}
// ----------------------------------------------------
// CDrawAppUi::HandleCommandL(TInt aCommand)
// takes care of command handling
// ----------------------------------------------------
//
void CDrawAppUi::HandleCommandL(TInt aCommand)
{
switch ( aCommand )
{
case EAknSoftkeyBack:
case EEikCmdExit:
{
Exit();
break;
}
case EDrawCmdAppTest:
{
//iAppContainer->Drawmap(0);
//iAppContainer->DrawNow();
//iEikonEnv->InfoMsg(_L("test"));
iAppContainer->SetData(1);
for(int k=0;k<200;k++)
{
if(iAppContainer->Readyuv()==0) break;
//iAppContainer->SetData(1);
iAppContainer->YuvToRgb();
iAppContainer->DrawNow();
}
iAppContainer->FreeYuv();
/* for(int w=0;w<5;w++)
{
iAppContainer->SetData(50*w);
iAppContainer->DrawNow();
//for(int z=0;z<1000000000;z++);
}*/
/* //iAppContainer->Drawmap(0);
for (int i=0;i<5;i++)
{
iAppContainer->SetData (i*20);
//iAppContainer->DecodeOneFrame();
iAppContainer->DrawNow();
}*/
iEikonEnv->InfoMsg(_L("test"));
break;
}
// TODO: Add Your command handling code here
default:
break;
}
}
// End of File
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -