httpappview.cpp

来自「简单的socket请求」· C++ 代码 · 共 109 行

CPP
109
字号
/*
============================================================================
 Name        : HttpView.cpp
 Author      : 
 Version     :
 Copyright   : Your copyright notice
 Description : Application view
============================================================================
*/

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

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

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

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

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

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


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


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

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

⌨️ 快捷键说明

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