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

📄 puttyterminalview.cpp

📁 大名鼎鼎的远程登录软件putty的Symbian版源码
💻 CPP
字号:
/*    puttyterminalview.cpp * * Putty UI View class for the terminal view * * Copyright 2003 Sergei Khloupnov * Copyright 2002,2004 Petteri Kangaslampi * * See license.txt for full copyright and license information.*/#include <aknviewappui.h>#include <aknconsts.h>#include <putty.rsg>#include "puttyterminalview.h"#include "puttyterminalcontainer.h"#include "puttyappui.h"// Factory methodCPuttyTerminalView *CPuttyTerminalView::NewL(MTerminalObserver *aTerminalObserver,                                             CPuttyAppUi *aAppUi,                                             const TDesC &aFontFile) {        CPuttyTerminalView *self = new (ELeave) CPuttyTerminalView(aTerminalObserver,                                                               aAppUi,                                                               aFontFile);    CleanupStack::PushL(self);    self->ConstructL();    CleanupStack::Pop(self);    return self;}// ConstructorCPuttyTerminalView::CPuttyTerminalView(MTerminalObserver *aTerminalObserver,                                       CPuttyAppUi *aAppUi,                                       const TDesC &aFontFile)    : iAppUi(aAppUi),      iTerminalObserver(aTerminalObserver) {    iFontFile = aFontFile;}// DestructorCPuttyTerminalView::~CPuttyTerminalView() {    if ( iContainer ) {        iAppUi->TerminalDeleted();        AppUi()->RemoveFromStack(iContainer);        delete iContainer;        iContainer = NULL;    }}// Second-phase constructorvoid CPuttyTerminalView::ConstructL() {    BaseConstructL(R_PUTTY_TERMINAL_VIEW);}// Returns a pointer to the terminalCTerminalControl *CPuttyTerminalView::Terminal() {    return iContainer->Terminal();}// Sets the font to usevoid CPuttyTerminalView::SetFontL(const TDesC &aFontFile) {    iContainer->SetFontL(aFontFile);}// Sets the full screen mode on/offvoid CPuttyTerminalView::SetFullScreenL(TBool aFullScreen) {    iContainer->SetFullScreenL(aFullScreen);}// Set terminal grayed statusvoid CPuttyTerminalView::SetTerminalGrayed(TBool aGrayed) {    iContainer->SetTerminalGrayed(aGrayed);}// Returns the view IDTUid CPuttyTerminalView::Id() const {    return TUid::Uid(KPuttyTerminalViewUid);}// Handles a command from the systemvoid CPuttyTerminalView::HandleCommandL(TInt aCommand) {    AppUi()->HandleCommandL(aCommand);}// Dynamically initialize a menu panevoid CPuttyTerminalView::DynInitMenuPaneL(TInt aResourceId,                                          CEikMenuPane *aMenuPane) {    iAppUi->DoDynInitMenuPaneL(aResourceId, aMenuPane);}// View activatedvoid CPuttyTerminalView::DoActivateL(const TVwsViewId &/*aPrevViewId*/,                                     TUid /*aCustomMessageId*/,                                     const TDesC8 &/*aCustomMessage*/) {    if ( !iContainer ) {        iContainer = CPuttyTerminalContainer::NewL(ClientRect(),                                                   iTerminalObserver, this,                                                   iFontFile);        iContainer->SetMopParent(this);        iContainer->ActivateL();        AppUi()->AddToStackL(iContainer);        iAppUi->TerminalCreatedL();    }}// View deactivatedvoid CPuttyTerminalView::DoDeactivate() {    if ( iContainer ) {        AppUi()->RemoveFromStack(iContainer);    }}

⌨️ 快捷键说明

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