MActivePalette2UI Class Reference

class MActivePalette2UI

The interface for the Active Palette. The ActivePalette2Factory is used to instantiate objects that provide this interface.

Constructor & Destructor Documentation

~MActivePalette2UI()

~MActivePalette2UI ( ) [inline, virtual]

Destructor. Will clean up all installed plugins.

Member Functions Documentation

CoeControl()

CCoeControl * CoeControl ( ) [pure virtual]

Returns the underlying CCoeControl , if any.

GetAvailablePlugins(RArray< TUid > &)

TInt GetAvailablePlugins ( RArray < TUid > & aPluginList ) const [pure virtual]

Gets a list of available external plugins.

Parameters

RArray < TUid > & aPluginList On return, will contain a list a valid plugin UIDs

GetCurrentItem(TInt &)

TInt GetCurrentItem ( TInt & aItemId ) const [pure virtual]

Gets the currently focussed item

Parameters

TInt & aItemId On return, will contain the ID of the item in focus

GetItemList(RArray< TActivePalette2ItemVisible > &)

TInt GetItemList ( RArray < TActivePalette2ItemVisible > & aItemVisibleList ) const [pure virtual]

Gets the list of currently installed items. The list will include all items, both visible and invisible. SetItemList()

Parameters

RArray < TActivePalette2ItemVisible > & aItemVisibleList On return, will contain the item list.

GetItemVisibility(TInt, TBool &)

TInt GetItemVisibility ( TInt aItemId,
TBool & aIsVisible
) const [pure virtual]

Find out the visibility of a specified item

Parameters

TInt aItemId The item's ID
TBool & aIsVisible On return, indicates the visibility of the item

GetPaletteVisibilityAnimationDuration(TInt &)

TInt GetPaletteVisibilityAnimationDuration ( TInt & aTimeInMilliseconds ) const [pure virtual]

Gets the duration of the SetPaletteVisibility animation.

SetPaletteVisibility() SetPaletteVisibilityAnimationDuration()

Parameters

TInt & aTimeInMilliseconds On return, will contain how long the animation will take, in milliseconds

HuiControl()

CHuiControl * HuiControl ( ) [pure virtual]

Returns the underlying CHuiControl, if any.

InstallItemL(const TActivePalette2ItemVisible &, const TUid &, const TDesC8 &)

TInt InstallItemL ( const TActivePalette2ItemVisible & aItemVisible,
const TUid & aPluginUid,
const TDesC8 & aCustomDataDes
) [pure virtual]

Installs an item to the AP.

Parameters

const TActivePalette2ItemVisible & aItemVisible The ID and visibility of the new item
const TUid & aPluginUid The UID of the plugin to handle this item
const TDesC8 & aCustomDataDes Descriptor data to pass to the plugin

InstallItemL(const TActivePalette2ItemVisible &, const TUid &, TInt)

TInt InstallItemL ( const TActivePalette2ItemVisible & aItemVisible,
const TUid & aPluginUid,
TInt aCustomDataInt = 0
) [pure virtual]

Installs an item to the AP.

Parameters

const TActivePalette2ItemVisible & aItemVisible The ID and visibility of the new item
const TUid & aPluginUid The UID of the plugin to handle this item
TInt aCustomDataInt = 0 Integer data to pass to the plugin

InstallItemL(const TActivePalette2ItemVisible &, const TUid &, TInt, const TDesC8 &)

TInt InstallItemL ( const TActivePalette2ItemVisible & aItemVisible,
const TUid & aPluginUid,
TInt aCustomDataInt,
const TDesC8 & aCustomDataDes
) [pure virtual]

Installs an item to the AP.

Parameters

const TActivePalette2ItemVisible & aItemVisible The ID and visibility of the new item
const TUid & aPluginUid The UID of the plugin to handle this item
TInt aCustomDataInt Integer data to pass to the plugin
const TDesC8 & aCustomDataDes Descriptor data to pass to the plugin

LocateTo(const TPoint &)

void LocateTo ( const TPoint & aTopLeft ) [pure virtual]

Move the AP.

Parameters

const TPoint & aTopLeft Point specifying where to move the AP to

Location()

TPoint Location ( ) const [pure virtual]

Returns the top left point of the AP

RemoveItem(TInt)

TInt RemoveItem ( TInt aItemId ) [pure virtual]

Removes an item

Parameters

TInt aItemId The resource ID of the item to install

RenderActivePalette(const TRect &)

void RenderActivePalette ( const TRect & aRect ) const [pure virtual]

Forces the AP to draw itself to the supplied aRect. Uses the context previously set by SetGc, if any; uses the screen's context otherwise. Calls to this will only have an effect if a CCoeControl-based AP has been created.

SetGc()

Parameters

const TRect & aRect The rect to render to

SendMessage(TInt, TInt, const TDesC8 &)

TInt SendMessage ( TInt aItemId,
TInt aMessageId,
const TDesC8 & aDataDes
) [pure virtual]

Sends a message to the specified item's handling plugin

Parameters

TInt aItemId The item's ID
TInt aMessageId Message ID
const TDesC8 & aDataDes Custom data passed as a descriptor

SendMessage(TInt, TInt, TInt)

TInt SendMessage ( TInt aItemId,
TInt aMessageId,
TInt aDataInt
) [pure virtual]

Sends a message to the specified item's handling plugin

Parameters

TInt aItemId The item's ID
TInt aMessageId Message ID
TInt aDataInt Custom data passed as an integer

SetCurrentItem(TInt)

TInt SetCurrentItem ( TInt aItemId ) [pure virtual]

Sets the currently focussed item

Parameters

TInt aItemId The ID of the item to focus

SetGc(CBitmapContext *)

void SetGc ( CBitmapContext * aGc = NULL ) [pure virtual]

Sets the graphics context to draw to. If called with aGc being non-NULL, the AP will be rendered to the supplied context in future drawing operations. If called with NULL, the screen's GC will be used instead. Calls to this will only have an effect if a CCoeControl-based AP has been created.

RenderActivePalette()

Parameters

CBitmapContext * aGc = NULL The graphics context to draw to

SetItemList(const RArray< TActivePalette2ItemVisible > &)

TInt SetItemList ( const RArray < TActivePalette2ItemVisible > & aItemVisibleList ) [pure virtual]

Sets the order and visibility of installed items. aItemVisibleList may be incomplete (i.e. not all installed item IDs must be present). In this case, the non-specified items will be shuffled down to the end of the AP, whilst retaining their relative order. If the item that was in focus before the call is still visible, it retains the focus, else the first visible item gains focus.

GetItemList()

Parameters

const RArray < TActivePalette2ItemVisible > & aItemVisibleList The list describing the order and visibility of the items

SetItemVisibility(TInt, TBool)

TInt SetItemVisibility ( TInt aItemId,
TBool aIsVisible
) [pure virtual]

Sets the visibility of an item

Parameters

TInt aItemId The item's ID
TBool aIsVisible The visibility state

SetNavigationKeys(const TActivePalette2NavigationKeys &)

void SetNavigationKeys ( const TActivePalette2NavigationKeys & aNavigationKeys ) [pure virtual]

Sets the keys the user will press to navigate the AP. This sets the scancodes responded to when CCoeControl::OfferKeyEvent, CHuiControl::OfferEvent or similar are called.

Parameters

const TActivePalette2NavigationKeys & aNavigationKeys The new navigation keys

SetObserver(MActivePalette2Observer *)

void SetObserver ( MActivePalette2Observer * aObserver ) [pure virtual]

Sets the active palette observer used for callbacks. Calls to this function replace the previously set observer. SetObserver(NULL) may be called to remove the previously set observer without specifying a new observer

Parameters

MActivePalette2Observer * aObserver The new observer to use

SetPaletteVisibility(TBool, TBool, TInt)

TInt SetPaletteVisibility ( TBool aVisible,
TBool aAnimated,
TInt aDelayedStartMilliseconds = 0
) [pure virtual]

Hides or shows the palette. After calling this function, and until the transition (if any) is complete, the AP will not accept any user input.

SetPaletteVisibilityAnimationDuration() GetPaletteVisibilityAnimationDuration()

Parameters

TBool aVisible If ETrue, shows the AP, otherwise hides it
TBool aAnimated Whether the transition should be animated. If not, the change is made as soon as aDelayedStartMilliseconds has passed
TInt aDelayedStartMilliseconds = 0 An optional pause before the transition begins.

SetPaletteVisibilityAnimationDuration(TInt)

TInt SetPaletteVisibilityAnimationDuration ( TInt aTimeInMilliseconds ) [pure virtual]

Sets the duration of the SetPaletteVisibility animation.

SetPaletteVisibility() GetPaletteVisibilityAnimationDuration()

Parameters

TInt aTimeInMilliseconds How long the animation should take, in milliseconds