Preview popup is a popup that can be used to show some extra information about e.g. a highlighted list item. It cannot get keyboard focus. Popup is shown after a default timeout of one second and hidden on key press or when it has been visible for ten seconds. These timeouts can be changed via this API.
Preview popup itself provides only timing services and an empty popup window whose frames and background are drawn with the current skin. It is client application's responsibility to provide the actual content. This can be any object derived from CCoeControl. When the popup is shown it asks content's size using CCoeControl::MinimumSize and sizes itself so that the whole content fits into the popup. Content can also be created asynchronously if it takes considerable amount of time.
|
Public Types |
enum | TAknPreviewStyle {
ELayoutDefault = 0x0001,
ELayoutSubMenu = 0x0002,
EPermanentMode = 0x0004,
EFixedMode = 0x0008,
EExcludeFrames = 0x0010,
EAutoMirror = 0x0020,
EDontClose = 0x0040
} |
enum | TAknPreviewPopUpContentSize { ESmall,
ELarge
} |
Public Member Functions |
| ~CAknPreviewPopUpController () |
| Destructor.
|
IMPORT_C void | SetPopUpShowDelay (const TTimeIntervalMicroSeconds32 &aDelay) |
| Sets the delay used before showing the preview popup.
|
IMPORT_C void | SetPopUpHideDelay (const TTimeIntervalMicroSeconds32 &aDelay) |
| Sets the delay used before hiding the preview popup.
|
IMPORT_C void | ShowPopUp () |
| Sets the preview popup visible after specified delay.
|
IMPORT_C void | HidePopUp () |
| Hides the popup immediately.
|
IMPORT_C void | ContentReady () |
| If application wishes to build preview popup's content asynchronously the content class should be derived from MAknPreviewPopUpContentProvider in addition to CCoeControl.
|
IMPORT_C void | SetPosition (const TPoint &aPoint) |
| Sets the position of preview popup.
|
IMPORT_C void | SetPositionByHighlight (const TRect &aHighlightRect) |
| Sets the position of the preview popup so that it is aligned with the given rectangle as specified in the LAF data.
|
IMPORT_C void | AddObserverL (const MAknPreviewPopUpObserver &aObserver) |
| Adds the observer to the list of observers.
|
IMPORT_C void | RemoveObserver (const MAknPreviewPopUpObserver &aObserver) |
| Removes the given observer from the observer list.
|
IMPORT_C void | UpdateContentSize () |
| Updates popup's size to reflect a change in content's size.
|
IMPORT_C TSize | Size () const |
| Returns the popup's size.
|
IMPORT_C void | SetHeadingTextL (const TDesC &aText) |
| Sets optional heading text.
|
void | NotifyObservers (MAknPreviewPopUpObserver::TPreviewPopUpEvent aEvent) |
| Notifies observers about the specified preview popup event.
|
IMPORT_C void | ResetTimer () |
| Resets the popup timeout.
|
Static Public Member Functions |
static IMPORT_C CAknPreviewPopUpController * | NewL (CCoeControl &aContent, MAknPreviewPopUpContentProvider &aContentProvider) |
| Two-phased constructor.
|
static IMPORT_C CAknPreviewPopUpController * | NewL (CCoeControl &aContent) |
| Two-phased constructor.
|
static IMPORT_C CAknPreviewPopUpController * | NewL (CCoeControl &aContent, MAknPreviewPopUpContentProvider &aContentProvider, const TInt aStyle) |
| Two-phased constructor.
|
static IMPORT_C CAknPreviewPopUpController * | NewL (CCoeControl &aContent, const TInt aStyle) |
| Two-phased constructor.
|
static IMPORT_C TAknPreviewPopUpContentSize | ContentSizeInLayout () |
| This static function can be used to query the logical size of the screen when drawing the content of the popup.
|
Protected Member Functions |
void | DoCancel () |
| From CTimer.
|
void | RunL () |
| From CActive.
|
TInt | RunError (TInt aError) |
| From CActive.
|