×
Namespaces

Variants
Actions

Preview Pop-up

From Nokia Developer Wiki
Jump to: navigation, search
Article Metadata
Code ExampleArticle
Created: visrini (28 Jan 2008)
Last edited: hamishwillee (30 May 2013)

The preview pop-up component is a floating non-focusable AVKON pop-up component. Its purpose is to provide a common pop-up frame that applications can use to show additional information to the user. It is part of the E-Series SDK plugin which can be downloaded here

Starting with S60 3rd Edition, supporting Feature Pack 2 this component is part of the platform offering thus it can be found in the public SDK.

Header file:

#include <aknpreviewpopupcontroller.h>
#include <aknpreviewpopupobserver.h>

LIBRARY :

Avkon.lib

Constructing a Preview Pop-up

// CCoeControl that will be shown in the poup
iPopupContent = CPreviewPopupContent::NewL(rect);
//iPopupController is CAknPreviewPopUpController object
iPopupController = CAknPreviewPopUpController::NewL(*iPopupContent,
CAknPreviewPopUpController::ELayoutDefault);
// Heading to be shown.Hidden by default
iPopupController->SetHeadingTextL(_L("Heading"));
//Listen for notifications
iPopupController->AddObserverL( *this );

Showing the popup

iPopupController->SetPositionByHighlight(Rect());
iPopupController->ShowPopUp();

Hiding the popup

iPopupController->HidePopUp();

Getting Notifications :

The MAknPreviewPopUpObserver is used to get notifications of the popup. Derive your class from and implement the pure virtual function as below:

void CPreviewPopUpExAppView::HandlePreviewPopUpEventL(CAknPreviewPopUpController* 
/*aController*/,TPreviewPopUpEvent aEvent )
{
switch(aEvent)
{
case EPreviewPopUpShown:
CEikonEnv::InfoWinL(_L("Popup"),_L("Shown"));
break;
case EPreviewPopUpHidden:
CEikonEnv::InfoWinL(_L("Popup"),_L("Hidden"));
break;
}
}

Example Application

File:PreviewPopUpEx.zip

This page was last modified on 30 May 2013, at 07:40.
79 page views in the last 30 days.
×