📄 scalablescreendrawingview.cpp
字号:
// ScalableScreenDrawingView.cpp
// ------------------
//
////////////////////////////////////////////////////////////////////////
//
// Source file for the implementation of the
// view class - CScalableScreenDrawingView
//
////////////////////////////////////////////////////////////////////////
#include "ScalableScreenDrawingView.h"
#include "ScalableScreenDrawing.h"
#include <aknutils.h>
// Static constructor
CScalableScreenDrawingView* CScalableScreenDrawingView::NewLC()
{
CScalableScreenDrawingView* self = new (ELeave) CScalableScreenDrawingView;
CleanupStack::PushL(self);
self->ConstructL();
return self;
}
// Default constructor
CScalableScreenDrawingView::CScalableScreenDrawingView()
{
iContainer = NULL;
}
// Second-phase constructor
void CScalableScreenDrawingView::ConstructL()
{
BaseConstructL();
}
// Destructor
CScalableScreenDrawingView::~CScalableScreenDrawingView()
{
DoDeactivate();
}
// Destroy control when view is deactivated.
void CScalableScreenDrawingView::DoDeactivate()
{
if(iContainer)
{
AppUi()->RemoveFromStack(iContainer);
delete iContainer;
iContainer = NULL;
}
}
// View creates the control when it is activated.
void CScalableScreenDrawingView::DoActivateL(const TVwsViewId& /*aPrevViewId*/,TUid /*aCustomMessageId*/,
const TDesC8& /*aCustomMessage*/)
{
__ASSERT_ALWAYS(iContainer == NULL, User::Panic(_L("SNOWVIEW"), KErrAlreadyExists));
iContainer = new (ELeave) CScalableScreenDrawingControl();
iContainer->SetMopParent(this);
iContainer->ConstructL( AppUi()->ApplicationRect(), AppUi() ); // For full screen
AppUi()->AddToStackL( *this, iContainer );
}
TUid CScalableScreenDrawingView::Id() const
{
return KScalableScreenDrawingViewId;
}
// End of file.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -