📄 tcpex.h
字号:
// TcpEx.h
// ------------
//
// Copyright (c) 2000 Symbian Ltd. All rights reserved.
//
////////////////////////////////////////////////////////////////////
// TcpEx
// ----------
//
//
// The class definitions for the simple example application
// containing a single view with the text "Hello World !" drawn
// on it.
//
// The class definitions are:
//
// CTcpExApplication
// CTcpExAppUi
// CTcpExAppView
// CTcpExDocument
//
//
////////////////////////////////////////////////////////////////////
#ifndef __TcpEx_H
#define __TcpEx_H
#include <coeccntx.h>
#include <eikenv.h>
#include <eikappui.h>
#include <eikapp.h>
#include <eikdoc.h>
#include <eikmenup.h>
#include <eiklabel.h>
#include <eikon.hrh>
#include <TcpEx.rsg>
#include "TcpEx.hrh"
#include "TcpExActive.h"
////////////////////////////////////////////////////////////////////////
//
// CTCPExApplication
//
////////////////////////////////////////////////////////////////////////
class CTCPExApplication : public CEikApplication
{
private:
// Inherited from class CApaApplication
CApaDocument* CreateDocumentL();
TUid AppDllUid() const;
};
////////////////////////////////////////////////////////////////////////
//
// CTCPExAppView
//
////////////////////////////////////////////////////////////////////////
class CTCPExAppView : public CCoeControl
{
public:
inline TRetrieveHttpProgress State() const;
TInt SetState(const TRetrieveHttpProgress aState);
void ClearL();
void SetTextL(const TDesC& aText);
static CTCPExAppView* NewL(const TRect& aRect);
CTCPExAppView();
~CTCPExAppView();
void ConstructL(const TRect& aRect);
private:
// Inherited from CCoeControl
void Draw(const TRect& aRect) const;
inline TInt CountComponentControls() const;
inline CCoeControl* ComponentControl(TInt aIndex) const;
private:
const static TInt
KSeparatorY = 50,
KMargin = 10;
TRetrieveHttpProgress iState;
TPtrC iStateDesc;
CEikLabel *iBody;
};
inline TRetrieveHttpProgress CTCPExAppView::State() const
{
return iState;
}
inline TInt CTCPExAppView::CountComponentControls() const
{
return 1;
}
inline CCoeControl* CTCPExAppView::ComponentControl(TInt /*aIndex*/) const
{
return iBody;
}
////////////////////////////////////////////////////////////////////////
//
// CTCPExAppUi
//
////////////////////////////////////////////////////////////////////////
class CTCPExAppUi : public CEikAppUi, public MRetrieveHttpCallbacks
{
public:
// construction/destruction
void ConstructL();
~CTCPExAppUi();
private:
// methods inherited from CEikAppUi
void HandleCommandL(TInt aCommand);
void DynInitMenuPaneL(TInt aMenuId, CEikMenuPane* aMenuPane);
// Method inherited from MRetrieveHttpCallbacks
virtual void StateChange(TRetrieveHttpProgress aState) ;
private:
CTCPExAppView* iAppView;
CRetrieveHttp* iRetriever;
void StartRequest(const TDesC& aUri);
};
////////////////////////////////////////////////////////////////////////
//
// CTCPExDocument
//
////////////////////////////////////////////////////////////////////////
class CTCPExDocument : public CEikDocument
{
public:
static CTCPExDocument* NewL(CEikApplication& aApp);
CTCPExDocument(CEikApplication& aApp);
void ConstructL();
private:
// Inherited from CEikDocument
CEikAppUi* CreateAppUiL();
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -