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.
Public Member Functions | |
---|---|
~IMulWidget () | |
void | AddEventHandler ( IAlfWidgetEventHandler &) |
const CAlfLayout & | ContainerLayout () |
void | GetIconSize ( mulwidget::TLogicalTemplate , mulvisualitem::TVisualAttribute , int &, int &) |
void | GetIconSize ( mulvisualitem::TVisualAttribute , int &, int &) |
void | RemoveEventHandler ( IAlfWidgetEventHandler &) |
void | SetAnimationTime ( TMulVisualEffect , int) |
void | SetModel ( IMulModelAccessor *, bool) |
void | SetRect (int, int, int, int, int) |
void | SetVisualColor ( TMulVisualType , const TRgb &) |
void | ShowWidget (bool, int) |
const IfId & | Type () |
Public Member Enumerations | |
---|---|
enum | TMulRotation { ERotateLeft = 1, ERotateRight } |
enum | TMulVisualEffect { EHighlightTransition = 1 } |
enum | TMulVisualType { ETextVisual = 1, ECoverflowCounterVisual , EItemBackgroundBrush , EThumbnailBackgroundBrush } |
void | AddEventHandler | ( | IAlfWidgetEventHandler & | aObserver | ) | [pure virtual] |
Add an observer to widget inorder to get event notifications from the widget. Widget can have multiple observersers.
IAlfWidgetEventHandler & aObserver | Observer of widget. |
const CAlfLayout & | ContainerLayout | ( | ) | [pure virtual] |
Get the Container Layout for widget.
void | GetIconSize | ( | mulwidget::TLogicalTemplate | aTemplateId, |
mulvisualitem::TVisualAttribute | aAttribute, | |||
int & | aHeight, | |||
int & | aWidth | |||
) | [pure virtual] |
Get the icon size from the template
mulwidget::TLogicalTemplate aTemplateId | |
mulvisualitem::TVisualAttribute aAttribute | Attribute name of the Icon |
int & aHeight | Height of the Icon |
int & aWidth | Width of the Icon |
void | GetIconSize | ( | mulvisualitem::TVisualAttribute | aAttribute, |
int & | aHeight, | |||
int & | aWidth | |||
) | [pure virtual] |
Get the icon size from the template
mulvisualitem::TVisualAttribute aAttribute | Attribute name of the Icon |
int & aHeight | Height of the Icon |
int & aWidth | Width of the Icon |
void | RemoveEventHandler | ( | IAlfWidgetEventHandler & | aObserver | ) | [pure virtual] |
Remove an observer to widget
IAlfWidgetEventHandler & aObserver | Observer of widget. |
void | SetAnimationTime | ( | TMulVisualEffect | aVisualEffect, |
int | aTransitionTime = 0 | |||
) | [pure virtual] |
Set Transaction/Animation time for variaous visual effect.
Set the animation time. mListWidget->SetAnimationTime( TMulVisualEffect::EHighlightTransition, 1000 );
TMulVisualEffect aVisualEffect | Visual effect to which animation time/transation time to set |
int aTransitionTime = 0 | Transition Time in MilliSeconds |
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.
IMulModelAccessor * aAccessor | model to be set for widget |
bool aFlag = true |
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.
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 |
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);
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.
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.
TMulVisualType aVisualType | visual to which color is to be applied. |
const TRgb & aColor | RGB color |
void | ShowWidget | ( | bool | aShow, |
int | aTransitionTime = 0 | |||
) | [pure virtual] |
To hide and unhide Widget.
bool aShow | value to hide/unhide the Widget |
int aTransitionTime = 0 | Transition Time in MilliSeconds |
This enumeration defines Rotation effect that widget supports
ERotateLeft = 1 |
For left rotation |
ERotateRight |
For right rotation |
This enumeration defines Visual effect that widget support
EHighlightTransition = 1 |
Highlight transition effect. |
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. |
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.