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

📄 s60uicodeexview.cpp

📁 symbian os c++ 自定义界面
💻 CPP
字号:
// S60UICodeExView.cpp
// ------------------
//

////////////////////////////////////////////////////////////////////////
//
// Source file for the implementation of the
// view class - CS60UICodeExView
//
////////////////////////////////////////////////////////////////////////

#include "S60UICodeExView.h"
#include "S60UICodeEx.h"
#include <aknutils.h>

#include "S60UICodeEx.hrh"

// Static constructor
CS60UICodeExView* CS60UICodeExView::NewLC()
    {
    CS60UICodeExView* self = new (ELeave) CS60UICodeExView( );
    CleanupStack::PushL(self);
    self->ConstructL();
    return self;
    }

// Default constructor
CS60UICodeExView::CS60UICodeExView()
    {
    iContainer = NULL;
    }

// Second-phase constructor
void CS60UICodeExView::ConstructL()
    {
    BaseConstructL();
    }

// Destructor
CS60UICodeExView::~CS60UICodeExView()
    {
    DoDeactivate();
    }

// Destroy control when view is deactivated.
void CS60UICodeExView::DoDeactivate()
    {
    if(iContainer)
        {
        AppUi()->RemoveFromStack(iContainer);
        delete iContainer;
        iContainer = NULL;
        }
    }

void CS60UICodeExView::SetDrawText( TDes* aText )
    {
    iContainer->SetText( aText );
    }

// View creates the control when it is activated.
void CS60UICodeExView::DoActivateL(const TVwsViewId& /*aPrevViewId*/,TUid /*aCustomMessageId*/,
                           const TDesC8& /*aCustomMessage*/)
    {
    __ASSERT_ALWAYS(iContainer == NULL, User::Panic(_L("MAINVIEW"), KErrAlreadyExists));
    iContainer = new (ELeave) CS60UICodeExControl();
    iContainer->SetMopParent(this);
    iContainer->ConstructL( AppUi()->ClientRect(), AppUi() );  // For full screen    
    
    AppUi()->AddToStackL( *this, iContainer );
    }

TUid CS60UICodeExView::Id() const
    {
    return KS60UICodeExViewId;
    }

void CS60UICodeExView::HandleStatusPaneSizeChange()
    {    
    iContainer->SetRect( AppUi()->ClientRect() );
    }    

    
void CS60UICodeExView::HandleScreenDeviceChangedL()
    {    
    if( iContainer )
	    {
	    iContainer->SetRect( AppUi()->ClientRect() );
	    }	   
    }

    

// End of file.

⌨️ 快捷键说明

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