Namespaces

Variants
Actions

Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.

Preview Pop-up

From 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 04:40.
54 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×