animationappview.cpp

来自「Animation Client/Server Symbian 程序.」· C++ 代码 · 共 105 行

CPP
105
字号
/*
* ==============================================================================
*  Name        : animationappview.cpp
*  Part of     : Animation example
*  Interface   :
*  Description :
*  Version     :
*
*  Copyright (c) 2004 - 2006 Nokia Corporation.
*  This material, including documentation and any related
*  computer programs, is protected by copyright controlled by
*  Nokia Corporation.
* ==============================================================================
*/

// INCLUDE FILES
#include <coemain.h>
#include <eikenv.h>

#include "AnimationAppView.h"

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

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

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

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

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

void CAnimationAppView::HandleResolutionChange(TRect aRect)
    {
    SetRect( aRect );
    }

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

// -----------------------------------------------------------------------------
// CAnimationAppView::Draw()
// Draws the display.
// -----------------------------------------------------------------------------
//
void CAnimationAppView::Draw( const TRect& /*aRect*/ ) const
    {
    // Clear the screen
    CWindowGc& gc = SystemGc();
    TRect drawRect( Rect() );
    gc.Clear( drawRect );
    }

// End of File

⌨️ 快捷键说明

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