Alf::IMulWidget Class Reference

class Alf::IMulWidget : public Alf::IAlfWidget

An interface for all Multimedia widgets. Widgets consist of control and visualization elements. Model owned by the application.

Interface paradigm would be used in a restrictive way. Controls are owned by Alfred environment. Widgets can be constructed using the widget factory. Widgets are owned and accessed using the Alfred environment.

Inherits from

Constructor & Destructor Documentation

~IMulWidget()

~IMulWidget()[inline, virtual]

Virtual destructor.

Member Functions Documentation

AddEventHandler(IAlfWidgetEventHandler &)

voidAddEventHandler(IAlfWidgetEventHandler &aObserver)[pure virtual]

Add an observer to widget inorder to get event notifications from the widget. Widget can have multiple observersers.

Parameters

IAlfWidgetEventHandler & aObserverObserver of widget.

ContainerLayout()

const CAlfLayout &ContainerLayout()[pure virtual]

Get the Container Layout for widget.

GetIconSize(mulwidget::TLogicalTemplate, mulvisualitem::TVisualAttribute, int &, int &)

voidGetIconSize(mulwidget::TLogicalTemplateaTemplateId,
mulvisualitem::TVisualAttributeaAttribute,
int &aHeight,
int &aWidth
)[pure virtual]

Get the icon size from the template

Parameters

mulwidget::TLogicalTemplate aTemplateId
mulvisualitem::TVisualAttribute aAttributeAttribute name of the Icon
int & aHeightHeight of the Icon
int & aWidthWidth of the Icon

GetIconSize(mulvisualitem::TVisualAttribute, int &, int &)

voidGetIconSize(mulvisualitem::TVisualAttributeaAttribute,
int &aHeight,
int &aWidth
)[pure virtual]

Get the icon size from the template

Parameters

mulvisualitem::TVisualAttribute aAttributeAttribute name of the Icon
int & aHeightHeight of the Icon
int & aWidthWidth of the Icon

RemoveEventHandler(IAlfWidgetEventHandler &)

voidRemoveEventHandler(IAlfWidgetEventHandler &aObserver)[pure virtual]

Remove an observer to widget

Parameters

IAlfWidgetEventHandler & aObserverObserver of widget.

SetAnimationTime(TMulVisualEffect, int)

voidSetAnimationTime(TMulVisualEffectaVisualEffect,
intaTransitionTime = 0
)[pure virtual]

Set Transaction/Animation time for variaous visual effect.

Examples:
 Set the animation time.

      mListWidget->SetAnimationTime( TMulVisualEffect::EHighlightTransition, 1000 );

Parameters

TMulVisualEffect aVisualEffectVisual effect to which animation time/transation time to set
int aTransitionTime = 0Transition Time in MilliSeconds

SetModel(IMulModelAccessor *, bool)

voidSetModel(IMulModelAccessor *aAccessor,
boolaFlag = true
)[pure virtual]

Set the data model for this widget. Widget uses the data model via IMulModelAccessor interface. Does not take ownership of the accessor and there can be only one accessor to the widget at any point. This will remove the binding to previous accessor, if any. Before deleting the accessor application should remove the binding to widget by calling the api by passing NULL.

Parameters

IMulModelAccessor * aAccessormodel to be set for widget
bool aFlag = true

SetRect(int, int, int, int, int)

voidSetRect(intaLeftMargin,
intaTopmargin,
intaHeight,
intaWidth,
intaTransitionTime = 0
)[pure virtual]

Set the size and position of the widget.All parameter values are in pixels and are relevant to the parent of the widget.

Parameters

int aLeftMarginmargin for the left border (top left x co-ordinate value)
int aTopmarginmargin for the top border (top left y co-ordinate value)
int aHeightheight of widget
int aWidthwidth of widget
int aTransitionTime = 0Transition Time in MilliSeconds

SetVisualColor(TMulVisualType, const TRgb &)

voidSetVisualColor(TMulVisualTypeaVisualType,
const TRgb &aColor
)[pure virtual]

Set the color and opacity of the visual for various visuals as per the widget. Also used to set the background transparent.

NOTE: TRgb with the alpha is mandatory .,if application doesnt sets the alpha results in the 0-opacity-Transparent. so applications always should use TRgb with alpha constructor: like- TRgb(TUint32 color,TInt alpha);

Examples: To Set the color and opacity of the thumbnail background
 Set the color and alpha of the visual.0x008090 and 0 respectively.

 iMyWidget->SetVisualColor( TMulVisualColor::EThumbnailBackgroundColor, TRgb(0x008090,0) );
 Here 0(zero) implies opacity - 1. 
Examples: To make the background Transparent
 Set the color and alpha of the visual.0x008090 and 255 respectively.

 iMyWidget->SetVisualColor( TMulVisualColor::EThumbnailBackgroundColor, TRgb(0x008090,255) );
 Here 255 alpha implies Transparent Background.No matter what the color is.

Parameters

TMulVisualType aVisualTypevisual to which color is to be applied.
const TRgb & aColorRGB color

ShowWidget(bool, int)

voidShowWidget(boolaShow,
intaTransitionTime = 0
)[pure virtual]

To hide and unhide Widget.

Parameters

bool aShowvalue to hide/unhide the Widget
int aTransitionTime = 0Transition Time in MilliSeconds

Type()

const IfId &Type()[static, inline]

Getter for the type identifier of this interface.

Member Enumerations Documentation

Enum TMulRotation

This enumeration defines Rotation effect that widget supports

Enumerators

ERotateLeft = 1

For left rotation

ERotateRight

For right rotation

Enum TMulVisualEffect

This enumeration defines Visual effect that widget support

Enumerators

EHighlightTransition = 1

Highlight transition effect.

Enum TMulVisualType

Enumerators

ETextVisual = 1

Color of the text in the widgets.

ECoverflowCounterVisual

Color of the Counter text in the Coverflow Widget.

EItemBackgroundBrush

Color of the Item brush in the Widget.

EThumbnailBackgroundBrush

Color for the background of the thumbnail image. Currently used in list widget only.