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

📄 osm_assignmentappview.cpp

📁 an addition application in symbian using Carbide C++
💻 CPP
字号:
/*
 ============================================================================
 Name		: OSM_assignmentAppView.cpp
 Author	  : Salik iftikhar
 Copyright   : Assignment
 Description : Application view implementation
 ============================================================================
 */

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

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

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

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

// -----------------------------------------------------------------------------
// COSM_assignmentAppView::ConstructL()
// Symbian 2nd phase constructor can leave.
// -----------------------------------------------------------------------------
//
void COSM_assignmentAppView::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();
	}

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

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

// -----------------------------------------------------------------------------
// COSM_assignmentAppView::Draw()
// Draws the display.
// -----------------------------------------------------------------------------
//
void COSM_assignmentAppView::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);

	}

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

// -----------------------------------------------------------------------------
// COSM_assignmentAppView::HandlePointerEventL()
// Called by framework to handle pointer touch events.
// Note: although this method is compatible with earlier SDKs, 
// it will not be called in SDKs without Touch support.
// -----------------------------------------------------------------------------
//
void COSM_assignmentAppView::HandlePointerEventL(
		const TPointerEvent& aPointerEvent)
	{

	// Call base class HandlePointerEventL()
	CCoeControl::HandlePointerEventL(aPointerEvent);
	}

// End of File

⌨️ 快捷键说明

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