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

📄 testmenuappview.cpp

📁 symbianOS第三版开发与实用教程部分源码和部分试验
💻 CPP
字号:
/*
============================================================================
 Name        : TestMenuAppView.cpp
 Author      : Lion
 Copyright   : Your copyright notice
 Description : Application view implementation
============================================================================
*/

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

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

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

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

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

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


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


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

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

⌨️ 快捷键说明

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