📄 downloadview.cpp
字号:
/*
============================================================================
Name : DownLoadView.cpp
Author :
Copyright : Your copyright notice
Description : Application view implementation
============================================================================
*/
// INCLUDE FILES
#include <coemain.h>
#include "DownLoadView.h"
// ============================ MEMBER FUNCTIONS ===============================
// -----------------------------------------------------------------------------
// CDownLoadView::NewL()
// Two-phased constructor.
// -----------------------------------------------------------------------------
//
CDownLoadView* CDownLoadView::NewL(const TRect& aRect,CMainWinControl *aWin )
{
CDownLoadView* self = CDownLoadView::NewLC(aRect,aWin );
CleanupStack::Pop(self);
return self;
}
// -----------------------------------------------------------------------------
// CDownLoadView::NewLC()
// Two-phased constructor.
// -----------------------------------------------------------------------------
//
CDownLoadView* CDownLoadView::NewLC(const TRect& aRect,CMainWinControl *aWin )
{
CDownLoadView* self = new (ELeave) CDownLoadView;
CleanupStack::PushL(self);
self->ConstructL(aRect);
return self;
}
// -----------------------------------------------------------------------------
// CDownLoadView::ConstructL()
// Symbian 2nd phase constructor can leave.
// -----------------------------------------------------------------------------
//
void CDownLoadView::ConstructL(const TRect& aRect)
{
// Create a window for this application view
// CreateWindowL();
//iMainWin=aWin;
// Set the windows size
SetRect(aRect);
// Activate the window, which makes it ready to be drawn
ActivateL();
}
// -----------------------------------------------------------------------------
// CDownLoadView::CDownLoadView()
// C++ default constructor can NOT contain any code, that might leave.
// -----------------------------------------------------------------------------
//
CDownLoadView::CDownLoadView()
{
// No implementation required
}
// -----------------------------------------------------------------------------
// CDownLoadView::~CDownLoadView()
// Destructor.
// -----------------------------------------------------------------------------
//
CDownLoadView::~CDownLoadView()
{
// No implementation required
}
// -----------------------------------------------------------------------------
// CDownLoadView::Draw()
// Draws the display.
// -----------------------------------------------------------------------------
//
void CDownLoadView::Draw(const TRect& /*aRect*/) const
{
// Get the standard graphics context
CWindowGc& gc = SystemGc();
// Gets the control's extent
// TRect drawRect(Rect());
//gc.SetBrushColor(KRgbBlue); // KRgbBlue KRgbWhite
//gc.Clear(Rect());
/*
TRect Rect1=TRect(50,30,100,50);
gc.SetPenSize(TSize(3,3));
gc.SetPenColor(KRgbRed);
gc.DrawRect( Rect1 );
*/
// Clears the screen
// gc.Clear(drawRect);
}
// -----------------------------------------------------------------------------
// CDownLoadView::SizeChanged()
// Called by framework when the view size is changed.
// -----------------------------------------------------------------------------
//
void CDownLoadView::SizeChanged()
{
DrawNow();
}
TKeyResponse CDownLoadView::OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType)
{
//if( iContainer )
// return (iContainer->OfferKeyEventL(aKeyEvent, aType));
// iMainWin->iContainer->DrawNow();
return EKeyWasNotConsumed;
}
// -----------------------------------------------------------------------------
// CDownLoadView::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 CDownLoadView::HandlePointerEventL(const TPointerEvent& aPointerEvent)
{
// Call base class HandlePointerEventL()
CCoeControl::HandlePointerEventL(aPointerEvent);
}
// End of File
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -