class CAlfVisual : public CAlfPropertyOwner |
Visual base class
// #1 Visual object usage CAlfVisual* newVisual = CAlfVisual::AddNewL( *myMainControl, mMainGridLayout ); newVisual->EnableBrushesL(); newVisual->Brushes->AppendL( borderBrush, EAlfHasOwnership ); // #2 as a base class class CMyVisual : public CAlfVisual { public: // allocation function CMyVisual(CAlfControl& aOwnerControl, CAlfLayout* aParentLayout = 0); // Function documentation void MyVisualSpecificFunction(); protected: ~CAlfVisual(); private: TInt mMyPrivateData; };alfclient.lib
Public Member Functions | |
---|---|
CAlfVisual () | |
~CAlfVisual () | |
IMPORT_C void | AlignByOrigin ( TAlfRealRect &) |
IMPORT_C CAlfBrushArray * | Brushes () |
IMPORT_C void | ClearFlag ( TAlfVisualFlags ) |
IMPORT_C void | ClearFlags ( TUint ) |
IMPORT_C TBool | Clipping () |
IMPORT_C CAlfGenComponent * | Comms () |
IMPORT_C void | ConstructL ( CAlfControl &) |
IMPORT_C void | ConstructL ( CAlfControl &, TInt , TInt , const TDesC8 &) |
IMPORT_C TInt | CopyValues (const CAlfVisual &, TInt , TInt ) |
IMPORT_C TAlfTimedValue | DepthOffset () |
IMPORT_C CAlfDisplay * | Display () |
IMPORT_C TAlfRealRect | DisplayRect () |
IMPORT_C TAlfRealRect | DisplayRectTarget () |
IMPORT_C TPoint | DisplayToLocal (const TPoint &) |
IMPORT_C TAlfRealPoint | DisplayToLocal (const TAlfRealPoint &) |
IMPORT_C void | DoRemoveAndDestroyAllD () |
IMPORT_C CAlfDropShadow * | DropShadowHandler () |
IMPORT_C TReal32 | EffectiveOpacity () |
IMPORT_C void | EnableBrushesL ( TBool ) |
IMPORT_C void | EnableDropShadowL ( TBool ) |
IMPORT_C void | EnableTransformationL ( TBool ) |
IMPORT_C CAlfEnv & | Env () |
IMPORT_C CAlfVisual * | FindTag (const TDesC8 &) |
IMPORT_C TUint | Flags () |
IMPORT_C TBool | HasTactileFeedback ( TInt ) |
IMPORT_C TAlfVisualHOrigin | HorizontalOrigin () |
IMPORT_C TInt | HorizontalPadding () |
IMPORT_C TInt | Identifier () |
IMPORT_C TBool | IsTagged () |
IMPORT_C CAlfLayout * | Layout () |
IMPORT_C TPoint | LocalToDisplay (const TPoint &) |
IMPORT_C TAlfRealPoint | LocalToDisplay (const TAlfRealPoint &) |
IMPORT_C TSize | MaxSize () |
IMPORT_C TAlfRealSize | MaxSizeInBaseUnits () |
IMPORT_C void | Mimic ( CAlfVisual &, TInt ) |
IMPORT_C TSize | MinSize () |
IMPORT_C TAlfRealSize | MinSizeInBaseUnits () |
IMPORT_C void | Move (const TPoint &, TInt ) |
IMPORT_C void | Move (const TAlfRealPoint &, TInt ) |
IMPORT_C void | MoveToFront ( TInt ) |
IMPORT_C const TAlfTimedValue & | Opacity () |
IMPORT_C CAlfControl & | Owner () |
IMPORT_C TPoint | Padding () |
IMPORT_C const TAlfBoxMetric & | PaddingAsMetric () |
IMPORT_C TAlfRealRect | PaddingInPixels () |
IMPORT_C void | Pause ( TInt ) |
IMPORT_C TAlfTimedPoint | Pos () |
IMPORT_C void | RemoveAndDestroyAllD () |
IMPORT_C void | RemoveTactileFeedback ( TInt ) |
IMPORT_C void | Resume ( TInt ) |
IMPORT_C void | SetCenteredPosAndSize (const TPoint &, const TSize &, TInt ) |
IMPORT_C void | SetCenteredPosAndSize (const TAlfRealPoint &, const TAlfRealSize &, TInt ) |
IMPORT_C void | SetClipping ( TBool ) |
IMPORT_C void | SetDepthOffset (const TAlfTimedValue &) |
void | SetDisplay (CAlfDisplay *) |
IMPORT_C void | SetEffectL (const TDesC &) |
IMPORT_C void | SetFlag ( TAlfVisualFlags ) |
IMPORT_C void | SetFlags ( TUint ) |
IMPORT_C void | SetGroupEffectL (const TDesC &, TInt ) |
void | SetLayout ( CAlfLayout *) |
IMPORT_C void | SetMaxSize (const TSize &) |
IMPORT_C void | SetMaxSize (const TAlfRealSize &) |
IMPORT_C void | SetMinSize (const TSize &) |
IMPORT_C void | SetMinSize (const TAlfRealSize &) |
IMPORT_C void | SetOpacity (const TAlfTimedValue &) |
IMPORT_C void | SetOrigin ( TAlfVisualHOrigin , TAlfVisualVOrigin ) |
IMPORT_C void | SetOwner ( CAlfControl &) |
IMPORT_C void | SetPadding ( TInt ) |
IMPORT_C void | SetPadding (const TPoint &) |
IMPORT_C void | SetPadding (const TAlfBoxMetric &) |
IMPORT_C void | SetPos (const TAlfRealPoint &, TInt ) |
IMPORT_C void | SetPos (const TAlfTimedPoint &) |
IMPORT_C void | SetRect (const TAlfRealRect &, TInt ) |
IMPORT_C void | SetSize (const TAlfRealSize &, TInt ) |
IMPORT_C void | SetSize (const TAlfTimedPoint &) |
IMPORT_C void | SetTactileFeedbackL ( TInt , TInt ) |
IMPORT_C void | SetTagL (const TDesC8 &) |
IMPORT_C const TAlfTimedPoint | Size () |
IMPORT_C const TDesC8 & | Tag () |
TBool | TagMatches (const TDesC8 &) |
IMPORT_C CAlfTransformation & | Transformation () |
IMPORT_C void | UpdateChildrenLayout ( TInt ) |
IMPORT_C TAlfVisualVOrigin | VerticalOrigin () |
IMPORT_C TInt | VerticalPadding () |
Protected Member Functions | |
---|---|
IMPORT_C void | PropertyOwnerExtension (const TUid &, TAny **) |
Private Attributes | |
---|---|
TPrivateData * | iData |
IMPORT_C void | AlignByOrigin | ( | TAlfRealRect & | aRect | ) | const |
Aligns the rectangle using the visual's origin position.
TAlfRealRect & aRect | A rectangle (origin at top left). Modified to suit the visual's origin. |
IMPORT_C void | ClearFlag | ( | TAlfVisualFlags | aFlag | ) |
Unset flags that affect the visual's behaviour.
TAlfVisualFlags aFlag | Flag to clear. |
IMPORT_C void | ClearFlags | ( | TUint | aAnyFlags | ) |
Clear one or more flags that affect the visual's behaviour.
TUint aAnyFlags | One or more flags to clear. |
IMPORT_C TBool | Clipping | ( | ) | const |
Determines whether the visual is clipping its contents.
IMPORT_C void | ConstructL | ( | CAlfControl & | aOwner | ) | [virtual] |
ConstructL
CAlfControl & aOwner |
IMPORT_C void | ConstructL | ( | CAlfControl & | aOwner, |
TInt | aImplementationId, | |||
TInt | aImplementationUid, | |||
const TDesC8 & | aConstructionParams | |||
) |
CAlfControl & aOwner | Who owns this new control. |
TInt aImplementationId | |
TInt aImplementationUid | |
const TDesC8 & aConstructionParams |
IMPORT_C TInt | CopyValues | ( | const CAlfVisual & | aSourceVisual, |
TInt | aBitmask = AlfVisualProperties::EAll, | |||
TInt | aTransitionTime = 0 | |||
) |
Copies selected, basic types of properties from another visual If another visual is in the middle of interpolating selected value(s), target value is used with given transition time.
For dynamic properties, use CAlfPropertyOwner::CopyProperty()
const CAlfVisual & aSourceVisual | Visual, from which the values are copied |
TInt aBitmask = AlfVisualProperties::EAll | Defines what properties to copy |
TInt aTransitionTime = 0 | Number of milliseconds for transitioning to new values. |
IMPORT_C TAlfRealRect | DisplayRect | ( | ) | const |
Calculates the visual's bounding rectangle in display coordinates. Display coordinates are defined relative to the display's visible area. Uses the current values of the position and size. Only calculated once per frame.
IMPORT_C TAlfRealRect | DisplayRectTarget | ( | ) | const |
Calculates the visual's bounding rectangle in display coordinates. Display coordinates are defined relative to the display's visible area. Uses the target values of the position and size, which means transitions are always immediate in the returned rectangle.
IMPORT_C TPoint | DisplayToLocal | ( | const TPoint & | aPoint | ) | const |
const TPoint & aPoint |
IMPORT_C TAlfRealPoint | DisplayToLocal | ( | const TAlfRealPoint & | aPoint | ) | const |
Convert display coordinates to local coordinate. Display coordinates are defined relative to the display's visible area.
const TAlfRealPoint & aPoint | Point in display coordinates. |
IMPORT_C CAlfDropShadow * | DropShadowHandler | ( | ) | const |
Returns the drop shadow parameter handler.
IMPORT_C TReal32 | EffectiveOpacity | ( | ) | const |
Returns the opacity of the visual, taking into account the opacity of parent visuals.
IMPORT_C void | EnableBrushesL | ( | TBool | aEnabled = ETrue | ) |
Enables or disables brushes for the visual.
TBool aEnabled = ETrue |
IMPORT_C void | EnableDropShadowL | ( | TBool | aEnable = ETrue | ) |
Enables the drop shadow. Currently implemented for the image and text visuals.
TBool aEnable = ETrue | ETrue to enable, EFalse to disable. |
IMPORT_C void | EnableTransformationL | ( | TBool | aIsTransformed = ETrue | ) |
Enables or disables transformation of the control group.
TBool aIsTransformed = ETrue | ETrue for enabling. |
IMPORT_C CAlfVisual * | FindTag | ( | const TDesC8 & | aTag | ) | [virtual] |
Finds a visual whose tag descriptor contains a specific tag.
CAlfVisual::FindTag() is the basic implementation that checks if this visual's tag matches the specified tag. CAlfLayout::FindTag() extends the search into child visuals, covering recursively entire visual hierarchies.
Todo: how should several visuals with matching tag to be handled ??
CAlfVisual::Tag() CAlfVisual::SetTagL() CAlfVisual::IsTagged() CAlfLayout::FindTag()
const TDesC8 & aTag | Tag to look for. If this tag is found as a part of a visual's colon-separated tag descriptor, it is treated as a match and the visual is returned. The tag to look for cannot contain separator characters (:). |
IMPORT_C TBool | HasTactileFeedback | ( | TInt | aEventType = KAlfTactileFeedbackEventTypeNone | ) | const |
Checks whether a tactile feedback has been assigned. Eventhough, this returns EFalse the layout may have feedback defined.
TInt aEventType = KAlfTactileFeedbackEventTypeNone | Event type which needs to match If KAlfTactileFeedbackEventTypeNone, the event type is irrelevant. |
IMPORT_C TAlfVisualHOrigin | HorizontalOrigin | ( | ) | const |
Determines the horizontal origin.
IMPORT_C TInt | HorizontalPadding | ( | ) | const |
Returns the horizontal padding pixels. Visuals can use this to determine the amount of padding that should be applied to the content.
this will return correct pixel values only if paddings were set using deprecated pixel based APIs, so migrate to using metrics instead
IMPORT_C TBool | IsTagged | ( | ) | const |
Determines if the visual has a tag.
CAlfVisual::Tag() CAlfVisual::SetTagL() CAlfVisual::FindTag()
IMPORT_C TPoint | LocalToDisplay | ( | const TPoint & | aPoint | ) | const |
Convert local coordiantes to display coordinates. Display coordinates are defined relative to the display's visible area.
const TPoint & aPoint |
IMPORT_C TAlfRealPoint | LocalToDisplay | ( | const TAlfRealPoint & | aPoint | ) | const |
Convert local coordinates to display coordinates. Display coordinates are defined relative to the display's visible area.
const TAlfRealPoint & aPoint | Point in local coordinates. |
IMPORT_C TSize | MaxSize | ( | ) | const |
Use base unit version instead
Returns the maximum size of the visual.
IMPORT_C TAlfRealSize | MaxSizeInBaseUnits | ( | ) | const |
Returns the maximum size of the visual in base units.
IMPORT_C void | Mimic | ( | CAlfVisual & | aVisual, |
TInt | aTransitionTime = 0 | |||
) |
Positions and sizes this visual to match another.
CAlfVisual & aVisual | Visual whose position and size to copy. |
TInt aTransitionTime = 0 |
IMPORT_C TSize | MinSize | ( | ) | const |
Use base unit version instead
Returns the minimum size of the visual.
IMPORT_C TAlfRealSize | MinSizeInBaseUnits | ( | ) | const |
Returns the minimum size of the visual in base units.
IMPORT_C void | Move | ( | const TPoint & | aOffset, |
TInt | aTransitionTime = 0 | |||
) |
Use base unit version instead
Moves the visual's position.
IMPORT_C void | Move | ( | const TAlfRealPoint & | aOffset, |
TInt | aTransitionTime = 0 | |||
) |
Moves the visual's position.
const TAlfRealPoint & aOffset | Offset from the current target in base units. |
TInt aTransitionTime = 0 | Transition time in milliseconds. |
IMPORT_C void | MoveToFront | ( | TInt | aTransitionTime = 0 | ) |
Moves the visual to the front inside its parent layout. In other words, the visual becames the last child of the parent. Causes layout recalculation.
TInt aTransitionTime = 0 |
IMPORT_C const TAlfTimedValue & | Opacity | ( | ) | const |
Returns the overall opacity affecting the owner's visuals. All visuals owned by this object are affected by this opacity.
IMPORT_C TPoint | Padding | ( | ) | const |
Returns the padding pixels. Visuals can use this to determine the amount of padding that should be applied to the content.
this will return correct pixel values only if paddings were set using deprecated pixel based APIs, so migrate to using metrics instead
IMPORT_C const TAlfBoxMetric & | PaddingAsMetric | ( | ) | const |
Returns the padding of the visual.
IMPORT_C TAlfRealRect | PaddingInPixels | ( | ) | const |
Returns the padding of the visual, in pixels.
IMPORT_C void | Pause | ( | TInt | aPropertiesBitmask = AlfVisualProperties::EAll | ) |
Pauses selected, basic types of timed properties of this visual
TInt aPropertiesBitmask = AlfVisualProperties::EAll | defines what properties are paused, combination of AlfVisualProperties |
IMPORT_C TAlfTimedPoint | Pos | ( | ) | const |
Returns the position of the visual. This is set by UpdateLayout().
IMPORT_C void | PropertyOwnerExtension | ( | const TUid & | aExtensionUid, |
TAny ** | aExtensionParams | |||
) | [protected, virtual] |
! future proofing
IMPORT_C void | RemoveAndDestroyAllD | ( | ) | [virtual] |
Destroys a hierarchy of visuals, along with this visual. The visuals are first removed from their owner.
IMPORT_C void | RemoveTactileFeedback | ( | TInt | aEventType = KAlfTactileFeedbackEventTypeNone | ) |
Removes tactile feedback for the visual.
TInt aEventType = KAlfTactileFeedbackEventTypeNone | Event type which feedback to remove. If KAlfTactileFeedbackEventTypeNone, all the feedbacks are removed. |
IMPORT_C void | Resume | ( | TInt | aPropertiesBitmask = AlfVisualProperties::EAll | ) |
Resumes selected basic types of timed properties of this visual that were paused using CAlfVisual::Pause() . If a property was not paused before calling Resume, call does not have effect
TInt aPropertiesBitmask = AlfVisualProperties::EAll | defines what properties are paused, combination of AlfVisualProperties |
IMPORT_C void | SetCenteredPosAndSize | ( | const TPoint & | aCenterPoint, |
const TSize & | aSize, | |||
TInt | aTransitionTime = 0 | |||
) |
Use base unit version instead
Sets the position and size of the visual.
IMPORT_C void | SetCenteredPosAndSize | ( | const TAlfRealPoint & | aCenterPoint, |
const TAlfRealSize & | aSize, | |||
TInt | aTransitionTime = 0 | |||
) |
Sets the position and size of the visual.
const TAlfRealPoint & aCenterPoint | New center point of the visual in base units. |
const TAlfRealSize & aSize | New size of the visual in base units. |
TInt aTransitionTime = 0 | Number of milliseconds for transitioning to new values. |
IMPORT_C void | SetClipping | ( | TBool | aClipping = ETrue | ) |
Sets the clipping mode of the layout.
TBool aClipping = ETrue | ETrue to hide children that are outside the layout's real size. |
IMPORT_C void | SetDepthOffset | ( | const TAlfTimedValue & | aDepthOffset | ) |
Sets the depth offset.
const TAlfTimedValue & aDepthOffset | Depth offset. |
void | SetDisplay | ( | CAlfDisplay * | aDisplay | ) |
Sets the display on which the visual is being shown.
CAlfDisplay * aDisplay | Pointer to display onto which to attach the visual |
IMPORT_C void | SetEffectL | ( | const TDesC & | aEffectFile | ) |
const TDesC & aEffectFile |
IMPORT_C void | SetFlag | ( | TAlfVisualFlags | aFlag | ) |
Set a flag that affects the visual's behaviour.
TAlfVisualFlags aFlag | Flag to set. |
IMPORT_C void | SetFlags | ( | TUint | aAnyFlags | ) |
Sets one or more flags that affect the visual's behaviour.
TUint aAnyFlags | One or more flags to set. |
IMPORT_C void | SetGroupEffectL | ( | const TDesC & | aEffectFile, |
TInt | aGroupHandle | |||
) |
void | SetLayout | ( | CAlfLayout * | aLayout | ) |
Sets the layout this visual belongs to.
CAlfLayout * aLayout | Parent layout |
IMPORT_C void | SetMaxSize | ( | const TSize & | aMaxSize | ) |
Use base unit version instead
Sets the maximum size of the visual.
const TSize & aMaxSize | Maximum size of the visual. |
IMPORT_C void | SetMaxSize | ( | const TAlfRealSize & | aMaxSize | ) |
Sets the maximum size of the visual.
const TAlfRealSize & aMaxSize | Maximum size of the visual. |
IMPORT_C void | SetMinSize | ( | const TSize & | aMinSize | ) |
Use base unit version instead
Sets the minimum size of the visual.
const TSize & aMinSize | Minimum size of the visual. |
IMPORT_C void | SetMinSize | ( | const TAlfRealSize & | aMinSize | ) |
Sets the minimum size of the visual.
const TAlfRealSize & aMinSize | Minimum size of the visual in base units. |
IMPORT_C void | SetOpacity | ( | const TAlfTimedValue & | aOpacity | ) |
Set opacity
const TAlfTimedValue & aOpacity | Opacity value. |
IMPORT_C void | SetOrigin | ( | TAlfVisualHOrigin | aHoriz, |
TAlfVisualVOrigin | aVert | |||
) |
Sets the origin of the visual. The origin defines the location of the visual's position in relation to its DisplayRect. By default the visual's position defines its top left corner.
Calling this method is equivalent to setting/clearing the corresponding flags.
TAlfVisualHOrigin aHoriz | |
TAlfVisualVOrigin aVert |
IMPORT_C void | SetOwner | ( | CAlfControl & | aOwner | ) |
Sets the owner of the visual.
CAlfControl & aOwner | New owner of the visual. |
IMPORT_C void | SetPadding | ( | TInt | aPadding | ) |
Sets the number of pixels that the visual uses for padding its contents. Sets both the horizontal and vertical padding.
that the left and right paddings will be the same, and the top and bottom paddings will be the same.
TInt aPadding | Number of padding pixels. |
IMPORT_C void | SetPadding | ( | const TPoint & | aPadding | ) |
Sets the number of pixels that the visual uses for padding its contents. Sets the horizontal and vertical padding separately.
that the left and right paddings will be the same, and the top and bottom paddings will be the same.
const TPoint & aPadding | Number of padding pixels. |
IMPORT_C void | SetPadding | ( | const TAlfBoxMetric & | aPadding | ) |
Sets the amount of padding that the visual uses for padding its contents. The box metric can have a different amount on all sides.
as paddings are relative to the layout visual, if relative units are required, it is advisable to use EAlfUnitRelativeToMySize so that the paddings are relative to the size of this layout visual
const TAlfBoxMetric & aPadding | Amount of padding. |
IMPORT_C void | SetPos | ( | const TAlfRealPoint & | aPos, |
TInt | aTransitionTime = 0 | |||
) |
Sets the position of the visual.
const TAlfRealPoint & aPos | |
TInt aTransitionTime = 0 |
IMPORT_C void | SetPos | ( | const TAlfTimedPoint & | aPos | ) |
Sets the position of the visual.
const TAlfTimedPoint & aPos |
IMPORT_C void | SetRect | ( | const TAlfRealRect & | aRect, |
TInt | aTransitionTime = 0 | |||
) |
Sets the position and size of the visual.
const TAlfRealRect & aRect | Target rectangle. |
TInt aTransitionTime = 0 | Transition timein milliseconds. |
IMPORT_C void | SetSize | ( | const TAlfRealSize & | aSize, |
TInt | aTransitionTime = 0 | |||
) |
Sets the size of the visual.
const TAlfRealSize & aSize | |
TInt aTransitionTime = 0 |
IMPORT_C void | SetSize | ( | const TAlfTimedPoint & | aSize | ) |
Sets the size of the visual.
const TAlfTimedPoint & aSize |
IMPORT_C void | SetTactileFeedbackL | ( | TInt | aEventType, |
TInt | aFeedbackType | |||
) |
Sets an automatic tactile feedback. If this visual is a layout, the feedback affects to the child visuals as well. This can be overridden in child visuals.
TTouchEventType from touchlogicalfeedback.h TTouchLogicalFeedback from touchlogicalfeedback.h
IMPORT_C void | SetTagL | ( | const TDesC8 & | aTag | ) |
Sets the tag of the visual.
The tag is a descriptor, in the form of one or more colon-separated character sequences. By default, visuals have no tag (""). Normally, a visual could have a single tag, for example ("caption"). The tag descriptor of the visual may contain multiple tags, for example: "tag1:tag2:tag3".
Tags can be used for identifying visuals. In a typical use case, a control could identify which of its visuals represent certain elements of the control based on the tag descriptors. In this case, the tags would be set by an outside party that also sets the tags of the visuals.
CAlfVisual::Tag() CAlfVisual::IsTagged() CAlfVisual::FindTag()
const TDesC8 & aTag | Tag descriptor for the visual. |
IMPORT_C const TAlfTimedPoint | Size | ( | ) | const |
Returns the size of the visual. This is set by UpdateLayout().
IMPORT_C const TDesC8 & | Tag | ( | ) | const |
Determines the tag of the visual.
CAlfVisual::SetTagL() CAlfVisual::IsTagged() CAlfVisual::FindTag()
TBool | TagMatches | ( | const TDesC8 & | aTag | ) | const |
const TDesC8 & aTag |
IMPORT_C CAlfTransformation & | Transformation | ( | ) |
Returns the transformation of the control group.
IMPORT_C void | UpdateChildrenLayout | ( | TInt | aTransitionTime = 0 | ) | [virtual] |
Update the layout of all children. Subclasses can call this to recalculate the layout of all children.
TInt aTransitionTime = 0 | Time for layout transition in milliseconds. Any negative value uses value given in CAlfEnv::StaticSetLayoutTransitionTime() |
IMPORT_C TAlfVisualVOrigin | VerticalOrigin | ( | ) | const |
Determines the vertical origin.
IMPORT_C TInt | VerticalPadding | ( | ) | const |
Returns the vertical padding pixels. Visuals can use this to determine the amount of padding that should be applied to the content.
this will return correct pixel values only if paddings were set using deprecated pixel based APIs, so migrate to using metrics instead
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.