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 &)

void AddEventHandler ( IAlfWidgetEventHandler & aObserver ) [pure virtual]

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

Parameters

IAlfWidgetEventHandler & aObserver Observer of widget.

ContainerLayout()

const CAlfLayout & ContainerLayout ( ) [pure virtual]

Get the Container Layout for widget.

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

void GetIconSize ( mulwidget::TLogicalTemplate aTemplateId,
mulvisualitem::TVisualAttribute aAttribute,
int & aHeight,
int & aWidth
) [pure virtual]

Get the icon size from the template

Parameters

mulwidget::TLogicalTemplate aTemplateId
mulvisualitem::TVisualAttribute aAttribute Attribute name of the Icon
int & aHeight Height of the Icon
int & aWidth Width of the Icon

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

void GetIconSize ( mulvisualitem::TVisualAttribute aAttribute,
int & aHeight,
int & aWidth
) [pure virtual]

Get the icon size from the template

Parameters

mulvisualitem::TVisualAttribute aAttribute Attribute name of the Icon
int & aHeight Height of the Icon
int & aWidth Width of the Icon

RemoveEventHandler(IAlfWidgetEventHandler &)

void RemoveEventHandler ( IAlfWidgetEventHandler & aObserver ) [pure virtual]

Remove an observer to widget

Parameters

IAlfWidgetEventHandler & aObserver Observer of widget.

SetAnimationTime(TMulVisualEffect, int)

void SetAnimationTime ( TMulVisualEffect aVisualEffect,
int aTransitionTime = 0
) [pure virtual]

Set Transaction/Animation time for variaous visual effect.

Examples:
         Set the animation time.

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

Parameters

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

SetModel(IMulModelAccessor *, bool)

void SetModel ( IMulModelAccessor * aAccessor,
bool aFlag = 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 * aAccessor model to be set for widget
bool aFlag = true

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

void SetRect ( int aLeftMargin,
int aTopmargin,
int aHeight,
int aWidth,
int aTransitionTime = 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 aLeftMargin margin for the left border (top left x co-ordinate value)
int aTopmargin margin for the top border (top left y co-ordinate value)
int aHeight height of widget
int aWidth width of widget
int aTransitionTime = 0 Transition Time in MilliSeconds

SetVisualColor(TMulVisualType, const TRgb &)

void SetVisualColor ( TMulVisualType aVisualType,
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 aVisualType visual to which color is to be applied.
const TRgb & aColor RGB color

ShowWidget(bool, int)

void ShowWidget ( bool aShow,
int aTransitionTime = 0
) [pure virtual]

To hide and unhide Widget.

Parameters

bool aShow value to hide/unhide the Widget
int aTransitionTime = 0 Transition 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.