multiviewsappview.cpp

来自「symbian os c/c++ 多个view切换」· C++ 代码 · 共 97 行

CPP
97
字号
/*
* ==============================================================================
*  Name        : multiviewsappview.cpp
*  Part of     : MultiViews
*  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 "MultiViewsAppView.h"


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

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

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

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

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

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

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

// End of File

⌨️ 快捷键说明

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