📄 bitmapbitbltmaskview.cpp
字号:
/**
*
* @brief Definition of CBitmapBitBltMaskView
*
* Copyright (c) EMCC Software Ltd 2003
* @version 1.0
*/
// INCLUDES
// Class include
#include "BitmapBitBltMaskView.h"
// System includes
#include <aknviewappui.h> // CAknViewAppUi
#include <Bitmap.rsg> // R_BITMAP_BITBLTMASKVIEW
// User includes
#include "BitmapBitBltMaskContainer.h" // CBitmapBitBltMaskContainer
#include "Bitmap.hrh" // TBitmapViewNumber
// ================= MEMBER FUNCTIONS =======================
/**
* Destructor.
*/
CBitmapBitBltMaskView::~CBitmapBitBltMaskView()
{
delete iContainer;
}
/**
* Symbian OS 2 phase constructor.
* Constructs the CBitmapBitBltMaskView using the NewLC method, popping
* the constructed object from the CleanupStack before returning it.
*
* @param aRect The rectangle for this window
* @return The newly constructed CBitmapBitBltMaskView
*/
CBitmapBitBltMaskView* CBitmapBitBltMaskView::NewL()
{
CBitmapBitBltMaskView* self = CBitmapBitBltMaskView::NewLC();
CleanupStack::Pop(self);
return self;
}
/**
* Symbian OS 2 phase constructor.
* Constructs the CBitmapBitBltMaskView using the constructor and ConstructL
* method, leaving the constructed object on the CleanupStack before returning it.
*
* @param aRect The rectangle for this window
* @return The newly constructed CBitmapBitBltMaskView
*/
CBitmapBitBltMaskView* CBitmapBitBltMaskView::NewLC()
{
CBitmapBitBltMaskView* self = new (ELeave) CBitmapBitBltMaskView();
CleanupStack::PushL(self);
self->ConstructL();
return self;
}
/**
* Symbian OS 2nd phase constructor.
* Uses the superclass constructor to construct the view using the
* R_BITMAP_BITBLTMASKVIEW resource.
*/
void CBitmapBitBltMaskView::ConstructL()
{
BaseConstructL(R_BITMAP_BITBLTMASKVIEW);
}
/**
* Called by the framework
* @return The Uid for this view
*/
TUid CBitmapBitBltMaskView::Id() const
{
return TUid::Uid(EBitmapBitBltMaskViewId);
}
/**
* Called by the framework when the view is activated. Constructs the
* container if necessary, setting this view as its MOP parent, and
* adding it to the control stack.
*/
void CBitmapBitBltMaskView::DoActivateL(const TVwsViewId& /*aPrevViewId*/,
TUid /*aCustomMessageId*/,
const TDesC8& /*aCustomMessage*/)
{
if (!iContainer)
{
iContainer = CBitmapBitBltMaskContainer::NewL(ClientRect());
iContainer->SetMopParent(this);
AppUi()->AddToStackL(*this, iContainer);
}
}
/**
* Called by the framework when the view is deactivated.
* Removes the container from the control stack and deletes it.
*/
void CBitmapBitBltMaskView::DoDeactivate()
{
if (iContainer)
{
AppUi()->RemoveFromStack(iContainer);
delete iContainer;
iContainer = NULL;
}
}
/**
* From CEikAppUi, takes care of command handling for this view.
*
* @param aCommand command to be handled
*/
void CBitmapBitBltMaskView::HandleCommandL(TInt aCommand)
{
switch (aCommand)
{
case EAknSoftkeyBack:
{
AppUi()->HandleCommandL(EEikCmdExit);
break;
}
default:
{
AppUi()->HandleCommandL(aCommand);
}
}
}
// End of File
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -