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 > & aPluginListOn 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 & aItemIdOn 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 > & aItemVisibleListOn return, will contain the item list.

GetItemVisibility(TInt, TBool &)

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

Find out the visibility of a specified item

Parameters

TInt aItemIdThe item's ID
TBool & aIsVisibleOn 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 & aTimeInMillisecondsOn 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 & aItemVisibleThe ID and visibility of the new item
const TUid & aPluginUidThe UID of the plugin to handle this item
const TDesC8 & aCustomDataDesDescriptor data to pass to the plugin

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

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

Installs an item to the AP.

Parameters

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

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

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

Installs an item to the AP.

Parameters

const TActivePalette2ItemVisible & aItemVisibleThe ID and visibility of the new item
const TUid & aPluginUidThe UID of the plugin to handle this item
TInt aCustomDataIntInteger data to pass to the plugin
const TDesC8 & aCustomDataDesDescriptor data to pass to the plugin

LocateTo(const TPoint &)

voidLocateTo(const TPoint &aTopLeft)[pure virtual]

Move the AP.

Parameters

const TPoint & aTopLeftPoint 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(TIntaItemId)[pure virtual]

Removes an item

Parameters

TInt aItemIdThe resource ID of the item to install

RenderActivePalette(const TRect &)

voidRenderActivePalette(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 & aRectThe rect to render to

SendMessage(TInt, TInt, const TDesC8 &)

TInt SendMessage(TIntaItemId,
TIntaMessageId,
const TDesC8 &aDataDes
)[pure virtual]

Sends a message to the specified item's handling plugin

Parameters

TInt aItemIdThe item's ID
TInt aMessageIdMessage ID
const TDesC8 & aDataDesCustom data passed as a descriptor

SendMessage(TInt, TInt, TInt)

TInt SendMessage(TIntaItemId,
TIntaMessageId,
TIntaDataInt
)[pure virtual]

Sends a message to the specified item's handling plugin

Parameters

TInt aItemIdThe item's ID
TInt aMessageIdMessage ID
TInt aDataIntCustom data passed as an integer

SetCurrentItem(TInt)

TInt SetCurrentItem(TIntaItemId)[pure virtual]

Sets the currently focussed item

Parameters

TInt aItemIdThe ID of the item to focus

SetGc(CBitmapContext *)

voidSetGc(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 = NULLThe 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 > & aItemVisibleListThe list describing the order and visibility of the items

SetItemVisibility(TInt, TBool)

TInt SetItemVisibility(TIntaItemId,
TBoolaIsVisible
)[pure virtual]

Sets the visibility of an item

Parameters

TInt aItemIdThe item's ID
TBool aIsVisibleThe visibility state

SetNavigationKeys(const TActivePalette2NavigationKeys &)

voidSetNavigationKeys(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 & aNavigationKeysThe new navigation keys

SetObserver(MActivePalette2Observer *)

voidSetObserver(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 * aObserverThe new observer to use

SetPaletteVisibility(TBool, TBool, TInt)

TInt SetPaletteVisibility(TBoolaVisible,
TBoolaAnimated,
TIntaDelayedStartMilliseconds = 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 aVisibleIf ETrue, shows the AP, otherwise hides it
TBool aAnimatedWhether the transition should be animated. If not, the change is made as soon as aDelayedStartMilliseconds has passed
TInt aDelayedStartMilliseconds = 0An optional pause before the transition begins.

SetPaletteVisibilityAnimationDuration(TInt)

TInt SetPaletteVisibilityAnimationDuration(TIntaTimeInMilliseconds)[pure virtual]

Sets the duration of the SetPaletteVisibility animation.

SetPaletteVisibility() GetPaletteVisibilityAnimationDuration()

Parameters

TInt aTimeInMillisecondsHow long the animation should take, in milliseconds