hellotestappview.cpp

来自「symbian os下的helloworld」· C++ 代码 · 共 108 行

CPP
108
字号
/*
============================================================================
 Name		: hellotestAppView.cpp
 Author	  : 
 Copyright   : Your copyright notice
 Description : Application view implementation
============================================================================
*/

// INCLUDE FILES
#include <coemain.h>
#include "hellotestAppView.h"

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

// -----------------------------------------------------------------------------
// ChellotestAppView::NewL()
// Two-phased constructor.
// -----------------------------------------------------------------------------
//
ChellotestAppView* ChellotestAppView::NewL( const TRect& aRect )
	{
	ChellotestAppView* self = ChellotestAppView::NewLC( aRect );
	CleanupStack::Pop( self );
	return self;
	}

// -----------------------------------------------------------------------------
// ChellotestAppView::NewLC()
// Two-phased constructor.
// -----------------------------------------------------------------------------
//
ChellotestAppView* ChellotestAppView::NewLC( const TRect& aRect )
	{
	ChellotestAppView* self = new ( ELeave ) ChellotestAppView;
	CleanupStack::PushL( self );
	self->ConstructL( aRect );
	return self;
	}

// -----------------------------------------------------------------------------
// ChellotestAppView::ConstructL()
// Symbian 2nd phase constructor can leave.
// -----------------------------------------------------------------------------
//
void ChellotestAppView::ConstructL( const TRect& aRect )
	{
	// Create a window for this application view
	CreateWindowL();

	// Set the windows size
	SetRect( aRect );

	// Activate the window, which makes it ready to be drawn
	ActivateL();
	}

// -----------------------------------------------------------------------------
// ChellotestAppView::ChellotestAppView()
// C++ default constructor can NOT contain any code, that might leave.
// -----------------------------------------------------------------------------
//
ChellotestAppView::ChellotestAppView()
	{
	// No implementation required
	}


// -----------------------------------------------------------------------------
// ChellotestAppView::~ChellotestAppView()
// Destructor.
// -----------------------------------------------------------------------------
//
ChellotestAppView::~ChellotestAppView()
	{
	// No implementation required
	}


// -----------------------------------------------------------------------------
// ChellotestAppView::Draw()
// Draws the display.
// -----------------------------------------------------------------------------
//
void ChellotestAppView::Draw( const TRect& /*aRect*/ ) const
	{
	// Get the standard graphics context
	CWindowGc& gc = SystemGc();

	// Gets the control's extent
	TRect drawRect( Rect());

	// Clears the screen
	gc.Clear( drawRect );
	
	}

// -----------------------------------------------------------------------------
// ChellotestAppView::SizeChanged()
// Called by framework when the view size is changed.
// -----------------------------------------------------------------------------
//
void ChellotestAppView::SizeChanged()
	{  
	DrawNow();
	}
// End of File

⌨️ 快捷键说明

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