📄 ldk008appview.cpp
字号:
/*
============================================================================
Name : LDK008View.cpp
Author :
Version :
Copyright : Your copyright notice
Description : Application view
============================================================================
*/
// INCLUDE FILES
#include <coemain.h>
#include "LDK008AppView.h"
// ============================ MEMBER FUNCTIONS ===============================
// -----------------------------------------------------------------------------
// CLDK008AppView::NewL()
// Two-phased constructor.
// -----------------------------------------------------------------------------
//
CLDK008AppView* CLDK008AppView::NewL( const TRect& aRect )
{
CLDK008AppView* self = CLDK008AppView::NewLC( aRect );
CleanupStack::Pop( self );
return self;
}
// -----------------------------------------------------------------------------
// CLDK008AppView::NewLC()
// Two-phased constructor.
// -----------------------------------------------------------------------------
//
CLDK008AppView* CLDK008AppView::NewLC( const TRect& aRect )
{
CLDK008AppView* self = new ( ELeave ) CLDK008AppView;
CleanupStack::PushL( self );
self->ConstructL( aRect );
return self;
}
// -----------------------------------------------------------------------------
// CLDK008AppView::ConstructL()
// Symbian 2nd phase constructor can leave.
// -----------------------------------------------------------------------------
//
void CLDK008AppView::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();
}
// -----------------------------------------------------------------------------
// CLDK008AppView::CLDK008AppView()
// C++ default constructor can NOT contain any code, that might leave.
// -----------------------------------------------------------------------------
//
CLDK008AppView::CLDK008AppView()
{
// No implementation required
}
// -----------------------------------------------------------------------------
// CLDK008AppView::~CLDK008AppView()
// Destructor.
// -----------------------------------------------------------------------------
//
CLDK008AppView::~CLDK008AppView()
{
// No implementation required
}
// -----------------------------------------------------------------------------
// CLDK008AppView::Draw()
// Draws the display.
// -----------------------------------------------------------------------------
//
void CLDK008AppView::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 );
}
// -----------------------------------------------------------------------------
// CLDK008AppView::SizeChanged()
// Called by framework when the view size is changed.
// -----------------------------------------------------------------------------
//
void CLDK008AppView::SizeChanged()
{
DrawNow();
}
// End of File
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -