class CHuiVisual : public CBase |
Visuals are graphical entities visible on a display. They are responsible for maintaining their state independently.
Visuals use a hierarchical coordinate system. All coordinate values are specified in the base unit of the parent layout, relative to the parent visual's upper left corner. This is called the local coordinate system of the visual. Visuals that have no parent are relative to the upper left corner of the HuiDisplay.
In practice, this means that when a layout is moved 10 pixels to the right, all of its children are automatically also moved 10 pixels to the right on the screen.
Visuals can be tagged with human-readable descriptors. SetTagL()Note that all layouts are derived from CHuiVisual. Layout visuals are used for building visual trees. CHuiLayout
Protected Member Functions | |
---|---|
void | ApplyMirroring(THuiRealPoint &, THuiReferenceState) |
void | ConvertMetricLengthToPixels(TReal32 &, const THuiMetric &, TReal32) |
void | ConvertPixelsToMetricLength(THuiMetric &, TReal32, TReal32) |
IMPORT_C void | ExpandRectWithContent(TRect &) |
TBool | IsDelayedEffectSource() |
IMPORT_C void | Transform(CHuiGc &, TBool, const THuiRealRect *) |
IMPORT_C void | VisualExtension(const TUid &, TAny **) |
Private Member Functions | |
---|---|
THuiRealPoint | DisplayToLocal(const THuiRealPoint &, THuiReferenceState) |
void | HandleFlagsChanged(TInt) |
TBool | IsTransformed() |
THuiRealPoint | LocalToDisplay(const THuiRealPoint &, THuiReferenceState) |
TBool | ParentChanged() |
CHuiTransformation * | Transformation() |
Public Attributes | |
---|---|
THuiTimedValue | iDepthOffset |
THuiTimedValue | iOpacity |
Protected Attributes | |
---|---|
MHuiVisualOwner * | iOwner |
TRect | iPreviousDrawn |
TInt | iSessionId |
TBool | iTrackVisual |
Private Attributes | |
---|---|
CHuiBrushArray * | iBrushes |
CHuiDisplay * | iDisplay |
THuiRealRect | iDisplayRect |
TUint | iDisplayRectFrameNumber |
THuiRealRect | iDisplayRectTarget |
TUint | iDisplayRectTargetFrameNumber |
TInt | iFlags |
CHuiLayout * | iLayout |
TBool | iLoadingEffect |
THuiRealSize | iMaxSize |
THuiRealSize | iMinSize |
THuiBoxMetric | iPadding |
THuiTimedPoint | iPos |
THuiTimedPoint | iSize |
HBufC8 * | iTag |
CHuiTransformation * | iTransform |
THuiVisualPrivateData * | iVisualData |
IMPORT_C | CHuiVisual | ( | MHuiVisualOwner & | aOwner | ) |
Constructor.
MHuiVisualOwner & aOwner | Owner control. |
IMPORT_C CHuiVisual * | AddNewL | ( | CHuiControl & | aOwnerControl, |
CHuiLayout * | aParentLayout = 0 | |||
) | [static] |
Constructs and appends a new visual to the owner control.
CHuiControl & aOwnerControl | Control that will own the new visual. |
CHuiLayout * aParentLayout = 0 |
IMPORT_C void | AlignByOrigin | ( | THuiRealPoint & | aPoint, |
TBool | aUndo = EFalse | |||
) | const |
Moves a point according to the visual's origin position. If this is called on both the iTl and iBr corners of a rectangle, the result is that the rectangle is aligned by the origin. This method is used during the calculations to determine a visual's display rectangle.
THuiRealPoint & aPoint | Point to move. |
TBool aUndo = EFalse | Which way to offset the point (apply or undo the alignment). |
void | ApplyMirroring | ( | THuiRealPoint & | aPixels, |
THuiReferenceState | aReferenceState | |||
) | const [protected] |
Applies mirroring to a coordinate point according to the base unit of the local coordinate system.
THuiRealPoint & aPixels | Point to mirror in pixels. The mirrored result is returned here. |
THuiReferenceState aReferenceState | Defines whether now or target value is used in case there are metrics transformations taking place |
IMPORT_C void | BoxMetricToPixelRect | ( | const THuiBoxMetric & | aBox, |
THuiRealRect & | aRectInPixels | |||
) | const |
const THuiBoxMetric & aBox | |
THuiRealRect & aRectInPixels |
IMPORT_C void | BoxMetricToPixelRect | ( | const THuiBoxMetric & | aBox, |
THuiRealRect & | aRectInPixels, | |||
THuiReferenceState | aReferenceState | |||
) | const |
Converts a box metric to a pixel rectangle. This method is used for converting visual padding boxes to pixels.
const THuiBoxMetric & aBox | Box metric to be interpreted in the context of this visual. |
THuiRealRect & aRectInPixels | Resulting rectangle in pixels. Note that the width and height of this box are meaningless, because each of the four sides is defined independently of each other. |
THuiReferenceState aReferenceState | Defines whether now or target value is used in case there are metrics transformations taking place |
THuiRealRect | CachedDisplayRect | ( | ) | const |
Gets the visual's bounding rectangle in display coordinates that were calculated during previous frame. 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. The rect is always in pixels.
IMPORT_C TBool | Changed | ( | ) | const [virtual] |
Determines if the visual has changed since the last change notification. Changed means becoming dirty, so that the area of the visual has to be redrawn.
IMPORT_C void | ClearChanged | ( | ) | [virtual] |
Clears the changed status of the visual. This is called automatically by the refresh loop after a frame has been drawn.
IMPORT_C void | ClearFlag | ( | THuiVisualFlags | aFlag | ) |
Unset flags that affect the visual's behaviour.
THuiVisualFlags aFlag | Flag to clear. |
IMPORT_C void | ClearFlags | ( | TInt | aAnyFlags | ) |
Clear one or more flags that affect the visual's behaviour.
TInt aAnyFlags | One or more flags to clear. |
IMPORT_C void | ConstructL | ( | ) | [virtual] |
Second-phase constructor, must be called in deriving class.
void | ConvertMetricLengthToPixels | ( | TReal32 & | aResult, |
const THuiMetric & | aMetric, | |||
TReal32 | aReference | |||
) | [protected, static] |
TReal32 & aResult | |
const THuiMetric & aMetric | |
TReal32 aReference |
void | ConvertPixelsToMetricLength | ( | THuiMetric & | aResult, |
TReal32 | aPixels, | |||
TReal32 | aReference | |||
) | [protected, static] |
THuiMetric & aResult | |
TReal32 aPixels | |
TReal32 aReference |
IMPORT_C THuiRealRect | 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. The rect is always in pixels.
IMPORT_C THuiRealRect | DisplayRectTarget | ( | ) | const |
Calculates the visual's bounding rectangle animation target in display coordinates. Display coordinates are defined relative to the display's visible area. Uses the target values of the rectangle position and size, which means transitions are always immediate in the returned rectangle. Only calculated once per frame. The rect is always in pixels.
IMPORT_C TPoint | DisplayToLocal | ( | const TPoint & | aPoint | ) | const |
Converts display coordinates to local coordinates. This method can be used when determining where a particular point on the display is in the local coordinate system of a layout, for instance when handling pointer input events. Display coordinates are defined relative to the display's visible area.
const TPoint & aPoint | Point in the display coordinate system. |
IMPORT_C THuiRealPoint | DisplayToLocal | ( | const THuiRealPoint & | aPoint | ) | const |
Converts display coordinates to local coordinates. This method can be used when determining where a particular point on the display is in the local coordinate system of a layout, for instance when handling pointer input events. Display coordinates are defined relative to the display's visible area.
const THuiRealPoint & aPoint | Point in the display coordinate system. |
THuiRealPoint | DisplayToLocal | ( | const THuiRealPoint & | aPoint, |
THuiReferenceState | aReferenceState | |||
) | const [private] |
Converts display coordinates to local coordinates. This method can be used when determining where a particular point on the display is in the local coordinate system of a layout, for instance when handling pointer input events. Display coordinates are defined relative to the display's visible area.
const THuiRealPoint & aPoint | Point in the display coordinate system. |
THuiReferenceState aReferenceState | Defines whether now or target value is used in case there are metrics transformations taking place |
IMPORT_C void | Draw | ( | CHuiGc & | aGc | ) | const [virtual] |
Draws the visual.
This default implementation applies local transformation, draws foreground brushes (over the content), background brushes (under the content) and content itself (by calling DrawSelf()) with clipping.
DrawSelf() should bee overridden by subclasses to draw the content of the visual.
CHuiGc & aGc |
IMPORT_C void | DrawBrushes | ( | CHuiGc & | aGc, |
THuiBrushLayer | aLayer | |||
) | const |
Draws a layer of brushes for the visual.
CHuiGc & aGc | Graphics context. |
THuiBrushLayer aLayer | Brush layer. |
IMPORT_C void | DrawSelf | ( | CHuiGc & | aGc, |
const TRect & | aDisplayRect | |||
) | const [virtual] |
Overridden by subclasses to draw the content of the visual. By default the base class DrawSelf does not draw anything.
IMPORT_C CHuiDropShadow * | DropShadowHandler | ( | ) | const |
Returns the drop shadow parameter handler.
IMPORT_C void | DumpTree | ( | ) | const [virtual] |
Debug method for dumping the structure of a visual tree into the console.
IMPORT_C CHuiFxEffect * | Effect | ( | ) | const |
Returns the currently active effect for the visual or NULL if no effect is active.
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 visual.
TBool aIsTransformed = ETrue |
IMPORT_C void | EnterLocalProjection | ( | CHuiGc & | aGc, |
TBool | aApply, | |||
TReal32 | aExtraOffset = 0.0, | |||
const THuiRealRect * | aVisibleRect = 0 | |||
) | const |
Applies or restores the local projection of the visual.
IMPORT_C void | ExpandRectWithContent | ( | TRect & | aRect | ) | const [protected, virtual] |
Expands the dirty region of the visual depending on the content of the visual. This includes any brushes attached to the visual. Used during dirty region reporting.
TRect & aRect | Dirty region. |
TInt | FindTacticon | ( | TInt | aEventType | ) | const |
Finds a tacticon from this visual.
TInt aEventType | Event type to match |
IMPORT_C CHuiVisual * | FindTag | ( | const TDesC8 & | aTag | ) | [virtual] |
Finds a visual whose tag descriptor contains a specific tag.
CHuiVisual::FindTag() is the basic implementation that checks if this visual's tag matches the specified tag. CHuiLayout::FindTag() extends the search into child visuals, covering recursively entire visual hierarchies.
CHuiVisual::Tag() CHuiVisual::SetTagL() CHuiVisual::IsTagged() CHuiLayout::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 void | GetClassName | ( | TDes & | aName | ) | const [virtual] |
Returns the name of the class.
TDes & aName | Name of the visual class. |
IMPORT_C void | GetDualAlpha | ( | TReal32 | aOpacity, |
TReal32 | aSecondary, | |||
TInt & | aPrimaryAlpha, | |||
TInt & | aSecondaryAlpha | |||
) | [static] |
Calculate dual alpha levels. Used when crossfading images.
IMPORT_C void | GetInstanceName | ( | TDes & | aName | ) | const [virtual] |
TDes & aName |
void | HandleFlagsChanged | ( | TInt | aOldFlags | ) | [private] |
Handle flags changes.
TInt aOldFlags | flags previous to the changes. |
IMPORT_C TBool | HasTactileFeedback | ( | TInt | aEventType = KHuiTactileFeedbackEventTypeNone | ) | const |
Checks whether a tactile feedback has been assigned. Eventhough, this returns EFalse the layout may have feedback defined.
TInt aEventType = KHuiTactileFeedbackEventTypeNone | Event type which needs to match If KHuiTactileFeedbackEventTypeNone, the event type is irrelevant. |
IMPORT_C THuiVisualHOrigin | HorizontalOrigin | ( | ) | const |
Determines the horizontal origin.
IMPORT_C TBool | IsTagged | ( | ) | const |
Determines if the visual has a tag.
CHuiVisual::Tag() CHuiVisual::SetTagL() CHuiVisual::FindTag()
IMPORT_C THuiXYMetric | LocalBaseUnit | ( | ) | const |
Determines the base unit of the local coordinate system, in which this visual's position and size are stored. The position and size of the visual are multiplied by this metric to get the actual position and size.
IMPORT_C THuiRealPoint | LocalPointInPixels | ( | const THuiRealPoint & | aLocalPoint | ) | const |
! deprecated, use method with THuiReferenceState instead
const THuiRealPoint & aLocalPoint |
IMPORT_C THuiRealPoint | LocalPointInPixels | ( | const THuiRealPoint & | aLocalPoint, |
THuiReferenceState | aReferenceState | |||
) | const |
Converts a point in the local coordinate system to pixels in the local coordinate system. The local coordinate system is relative to the top left corner of the parent. This method only does a unit conversion from the base units to pixels.
const THuiRealPoint & aLocalPoint | Point to convert, which is using the local base unit. |
THuiReferenceState aReferenceState | Defines whether now or target value is used in case there are metrics transformations taking place |
IMPORT_C TPoint | LocalToDisplay | ( | const TPoint & | aPoint | ) | const |
Converts local coordinates to display coordinates. This method is used for calculating the position of the visual on the display when the visual is about to be drawn. Display coordinates are defined relative to the display's visible area.
const TPoint & aPoint | Point in the local coordinate system. This might be, for example, the position or size of this visual. |
IMPORT_C THuiRealPoint | LocalToDisplay | ( | const THuiRealPoint & | aPoint | ) | const |
Converts local coordinates to display coordinates. This method is used for calculating the position of the visual on the display when the visual is about to be drawn. Display coordinates are defined relative to the display's visible area.
const THuiRealPoint & aPoint | Point in the local coordinate system. This might be, for example, the position or size of this visual. |
THuiRealPoint | LocalToDisplay | ( | const THuiRealPoint & | aPoint, |
THuiReferenceState | aReferenceState | |||
) | const [private] |
Converts local coordinates to display coordinates. This method is used for calculating the position of the visual on the display when the visual is about to be drawn. Display coordinates are defined relative to the display's visible area.
const THuiRealPoint & aPoint | Point in the local coordinate system. This might be, for example, the position or size of this visual. |
THuiReferenceState aReferenceState | Defines whether now or target value is used in case there are metrics transformations taking place |
IMPORT_C TSize | MaxSize | ( | ) | const |
Use base unit version instead
Returns the maximum size of the visual.
IMPORT_C THuiRealSize | MaxSizeInBaseUnits | ( | ) | const |
Returns the maximum size of the visual in base units.
IMPORT_C THuiRealPoint | MetricReferenceInPixels | ( | const THuiXYMetric & | aMetric | ) | const |
! deprecated, use method with THuiReferenceState instead
const THuiXYMetric & aMetric |
IMPORT_C THuiRealPoint | MetricReferenceInPixels | ( | const THuiXYMetric & | aMetric, |
THuiReferenceState | aReferenceState | |||
) | const |
Calculates the reference size for a metric. The reference size is, for example, the size of the parent layout in the case of the EHuiUnitNormalized unit.
const THuiXYMetric & aMetric | Metric whose reference size is to be determined. |
THuiReferenceState aReferenceState | Defines whether now or target value is used in case there are metrics transformations taking place |
IMPORT_C THuiRealPoint | MetricToPixels | ( | const THuiXYMetric & | aMetric | ) | const |
! deprecated, use method with THuiReferenceState instead
const THuiXYMetric & aMetric |
IMPORT_C THuiRealPoint | MetricToPixels | ( | const THuiXYMetric & | aMetric, |
THuiReferenceState | aReferenceState | |||
) | const |
Converts an XY metric to a pixel point.
const THuiXYMetric & aMetric | Metric to convert. |
THuiReferenceState aReferenceState | Defines whether now or target value is used in case there are metrics transformations taking place |
IMPORT_C void | Mimic | ( | const CHuiVisual & | aVisual, |
TInt | aTransitionTime = 0 | |||
) |
Positions and sizes this visual to match another.
This method should be used only when doing manual layouting. If the visuals are under a layout, then the layout class's facilities should be used instead.
If you want to move or otherwise layout the visual manually, you should set the EHuiVisualFlagManualLayout flag using SetFlag() method.
Even if the visual has no parent -- the roster will automatically lay it out to cover the entire display, so the EHuiVisualFlagManualLayout will be needed if you want to mimic other visuals.
const CHuiVisual & 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 THuiRealSize | 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.
Move() should be used only when doing manual layouting (same goes for SetPos() and SetSize()). If the visuals are under a layout that defines positions for its children (such as CHuiGridLayout), then the layout class's facilities should be used instead.
If you want to move or otherwise layout the visual manually, you should set the EHuiVisualFlagManualLayout flag using SetFlag() method.
Even if the visual has no parent -- the roster will automatically lay it out to cover the entire display, so the EHuiVisualFlagManualLayout will be needed if you want to move this visual.
IMPORT_C void | Move | ( | const THuiRealPoint & | aOffset, |
TInt | aTransitionTime = 0 | |||
) |
Moves the visual's position.
Move() should be used only when doing manual layouting (same goes for SetPos() and SetSize()). If the visuals are under a layout that defines positions for its children (such as CHuiGridLayout), then the layout class's facilities should be used instead.
If you want to move or otherwise layout the visual manually, you should set the EHuiVisualFlagManualLayout flag using SetFlag() method.
Even if the visual has no parent -- the roster will automatically lay it out to cover the entire display, so the EHuiVisualFlagManualLayout will be needed if you want to move this visual.
const THuiRealPoint & aOffset | Offset from the current target. |
TInt aTransitionTime = 0 | Transition time in milliseconds. |
IMPORT_C void | MoveToFront | ( | TInt | aTransitionTime = 0 | ) |
Converts a box metric to a rectangle in local coordinates. This method is used for converting visual padding boxes to local coordinate units when doing layout.
TInt aTransitionTime = 0 |
IMPORT_C void | NotifySkinChangedL | ( | ) | [virtual] |
Notifies the visual that the environment's skin has been changed or updated. The visual should update its state (e.g., fonts) accordingly.
IMPORT_C THuiRealRect | PaddingInPixels | ( | ) | const |
! deprecated, use method with THuiReferenceState instead
IMPORT_C THuiRealRect | PaddingInPixels | ( | THuiReferenceState | aReferenceState | ) | const |
Returns the padding of the visual, in pixels.
THuiReferenceState aReferenceState | Defines whether now or target value is used in case there are metrics transformations taking place |
TBool | ParentChanged | ( | ) | const [private] |
Determines if the visuals parent has changed since the last change notification so that it may require also this visual to report itself as changed.
IMPORT_C THuiRealPoint | PixelPointInLocal | ( | const THuiRealPoint & | aPixelPoint | ) | const |
! deprecated, use method with THuiReferenceState instead
const THuiRealPoint & aPixelPoint |
IMPORT_C THuiRealPoint | PixelPointInLocal | ( | const THuiRealPoint & | aPixelPoint, |
THuiReferenceState | aReferenceState | |||
) | const |
Converts a pixel point in the local coordinate system to a point that uses the base unit of the local coordinate system. The local coordinate system is relative to the top left corner of the parent. This method only does a unit conversion from pixels to the base units.
const THuiRealPoint & aPixelPoint | Point to convert, which is in pixels. |
THuiReferenceState aReferenceState | Defines whether now or target value is used in case there are metrics transformations taking place |
THuiRealPoint | PixelPointInUnits | ( | const THuiRealPoint & | aPixelPoint, |
const THuiXYMetric & | aUnit, | |||
THuiReferenceState | aReferenceState | |||
) | const |
Converts a pixel point to a specific unit.
const THuiRealPoint & aPixelPoint | Point to convert, in pixels. |
const THuiXYMetric & aUnit | Unit to which the point is to be converted. |
THuiReferenceState aReferenceState | Defines whether now or target value is used in case there are metrics transformations taking place |
IMPORT_C void | PixelsToMetric | ( | const THuiRealPoint & | aPixels, |
THuiXYMetric & | aMetric | |||
) | const |
! deprecated, use method with THuiReferenceState instead
const THuiRealPoint & aPixels | |
THuiXYMetric & aMetric |
IMPORT_C void | PixelsToMetric | ( | const THuiRealPoint & | aPixels, |
THuiXYMetric & | aMetric, | |||
THuiReferenceState | aReferenceState | |||
) | const |
Converts a pixel point to an XY metric. The destination unit of the conversion is taken from the aMetric parameter.
const THuiRealPoint & aPixels | Pixel point to convert. |
THuiXYMetric & aMetric | The result is written here. Only the magnitudes of the metric are modified. The iUnit of the conversion is read from this metric. |
THuiReferenceState aReferenceState |
IMPORT_C const THuiTimedPoint & | Pos | ( | ) | const |
Returns the position of the visual. This is set by UpdateLayout().
IMPORT_C TBool | PrepareDrawL | ( | ) | [virtual] |
PrepareDrawL prepares the visual for drawing (screen refresh). Can be used to update the visual or execute any Leaving operations such as resource allocation needed for the actual drawing.
By default the base class PrepareDrawL does not do anything.
TBool | QueryExternalContentDrawingEnabled | ( | ) |
Checks if external content drawing is enabled for this visual, returns result
TBool | QueryHasDrawableContent | ( | ) |
Checks if visual has something to draw, returns result
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 = KHuiTactileFeedbackEventTypeNone | ) |
Removes tactile feedback for the visual.
TInt aEventType = KHuiTactileFeedbackEventTypeNone | Event type which feedback to remove. If KHuiTactileFeedbackEventTypeNone, all the feedbacks are removed. |
IMPORT_C void | ReportChanged | ( | ) | [virtual] |
Called to inform the display that a dirty region has to be defined.
void | ReportLayoutUpdate | ( | ) |
Reports a layout update to the owner. The owner is notified of the layout update if the layout update notification flag is set for the visual.
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.
This method should be used only when doing manual layouting. If the visuals are under a layout, then the layout class's facilities should be used instead.
If you want to move or otherwise layout the visual manually, you should set the EHuiVisualFlagManualLayout flag using SetFlag() method.
Even if the visual has no parent -- the roster will automatically lay it out to cover the entire display, so the EHuiVisualFlagManualLayout will be needed if you want to assign the position and size yourself.
IMPORT_C void | SetCenteredPosAndSize | ( | const THuiRealPoint & | aCenterPoint, |
const THuiRealSize & | aSize, | |||
TInt | aTransitionTime = 0 | |||
) |
Sets the position and size of the visual.
This method should be used only when doing manual layouting. If the visuals are under a layout, then the layout class's facilities should be used instead.
If you want to move or otherwise layout the visual manually, you should set the EHuiVisualFlagManualLayout flag using SetFlag() method.
Even if the visual has no parent -- the roster will automatically lay it out to cover the entire display, so the EHuiVisualFlagManualLayout will be needed if you want to assign the position and size yourself.
const THuiRealPoint & aCenterPoint | New center point of the visual in metric units. |
const THuiRealSize & aSize | New size of the visual in metric units. |
TInt aTransitionTime = 0 | Number of milliseconds for transitioning to new values. |
IMPORT_C void | SetChanged | ( | ) | [virtual] |
Raises the change flag for this visual. Visual will be updated as soon as possible.
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. |
void | SetDisplay | ( | CHuiDisplay * | aDisplay | ) |
Sets the display on which the visual is being shown.
CHuiDisplay * aDisplay |
IMPORT_C void | SetEffect | ( | CHuiFxEffect * | aEffect | ) |
Assign an effect for the visual. The ownership of the effect is transferred to the visual.
CHuiFxEffect * aEffect | Effect instance. |
void | SetEffectParser | ( | CHuiFxEffectParser * | aEffectParser | ) |
Assign the effect parser to the visual. The ownership is transferred to the visual This must be done because the parsing is asynchronous, and we must be sure that the visual is still alive when the parsing completes.
CHuiFxEffectParser * aEffectParser | Effect parser instance |
IMPORT_C void | SetFlag | ( | THuiVisualFlags | aFlag | ) |
Set a flag that affects the visual's behaviour.
THuiVisualFlags aFlag | Flag to set. |
IMPORT_C void | SetFlags | ( | TInt | aAnyFlags | ) |
Sets one or more flags that affect the visual's behaviour.
TInt aAnyFlags | One or more flags to set. |
void | SetLayout | ( | CHuiLayout * | aLayout | ) |
Sets the layout this visual belongs to.
CHuiLayout * aLayout |
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 THuiRealSize & | aMaxSize | ) |
Sets the maximum size of the visual.
const THuiRealSize & aMaxSize | Maximum size of the visual in base units. |
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 THuiRealSize & | aMinSize | ) |
Sets the minimum size of the visual.
const THuiRealSize & aMinSize | Minimum size of the visual in base units. |
IMPORT_C void | SetOrigin | ( | THuiVisualHOrigin | aHoriz, |
THuiVisualVOrigin | 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.
THuiVisualHOrigin aHoriz | |
THuiVisualVOrigin aVert |
IMPORT_C void | SetOwner | ( | MHuiVisualOwner & | aOwner | ) |
Sets the owner of the visual.
MHuiVisualOwner & 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.
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.
const TPoint & aPadding | Number of padding pixels. |
IMPORT_C void | SetPadding | ( | const THuiBoxMetric & | 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 visual, if relative units are required for a layout, it is advisable to use EHuiUnitRelativeToMySize so that the paddings are relative to the size of this layout visual
const THuiBoxMetric & aPadding | Amount of padding. |
IMPORT_C void | SetPos | ( | const THuiRealPoint & | aPos, |
TInt | aTransitionTime = 0 | |||
) | [virtual] |
Sets the position of the visual.
This method should be used only when doing manual layouting. If the visuals are under a layout that defines positions for its children (such as CHuiGridLayout), then the layout class's facilities should be used instead.
If you want to move or otherwise layout the visual manually, you should set the EHuiVisualFlagManualLayout flag using the SetFlag() method.
Even if the visual has no parent -- the roster will automatically lay it out to cover the entire display, so the EHuiVisualFlagManualLayout will be needed if you want to assign the position yourself.
const THuiRealPoint & aPos | Target position, in the local coordinate system as defined by the parent layout (or the display, if there is no parent). |
TInt aTransitionTime = 0 | Transition time in milliseconds. |
IMPORT_C void | SetRect | ( | const THuiRealRect & | aRect, |
TInt | aTransitionTime = 0 | |||
) |
Sets the position and size of the visual.
This method should be used only when doing manual layouting. If the visuals are under a layout that defines positions and sizes for its children (such as CHuiGridLayout), then the layout class's facilities should be used instead.
If you want to move or otherwise layout the visual manually, you should set the EHuiVisualFlagManualLayout flag using SetFlag() method.
Even if the visual has no parent -- the roster will automatically lay it out to cover the entire display, so the EHuiVisualFlagManualLayout will be needed if you want to assign the rectangle yourself.
const THuiRealRect & aRect | Target rectangle, in the local coordinate system as defined by the parent layout (or the display, if there is no parent). |
TInt aTransitionTime = 0 | Transition time in milliseconds. |
IMPORT_C void | SetSessionId | ( | TInt | aSessionId | ) |
Sets the session id for object.
TInt aSessionId |
IMPORT_C void | SetSize | ( | const THuiRealSize & | aSize, |
TInt | aTransitionTime = 0 | |||
) | [virtual] |
Sets the size of the visual.
This method should be used only when doing manual layouting. If the visuals are under a layout that defines sizes for its children (such as CHuiGridLayout), then the layout class's facilities should be used instead.
If you want to move or otherwise layout the visual manually, you should set the EHuiVisualFlagManualLayout flag using SetFlag() method.
Even if the visual has no parent -- the roster will automatically lay it out to cover the entire display, so the EHuiVisualFlagManualLayout will be needed if you want to assign the size yourself.
const THuiRealSize & aSize | New size for this visual, in the local coordinate system as defined by the parent layout (or the display, if there is no parent). |
TInt aTransitionTime = 0 | Transition time in milliseconds. |
IMPORT_C void | SetStoredRenderBuffer | ( | CHuiCanvasRenderBuffer * | aRenderBuffer | ) |
CHuiCanvasRenderBuffer * aRenderBuffer |
IMPORT_C void | SetStoredRenderBufferModificationsEnabled | ( | TBool | aEnabled | ) |
TBool aEnabled |
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.
CHuiVisual::Tag() CHuiVisual::IsTagged() CHuiVisual::FindTag()
const TDesC8 & aTag | Tag descriptor for the visual. |
IMPORT_C const THuiTimedPoint & | Size | ( | ) | const |
Returns the size of the visual. This is set by UpdateLayout().
TInt | TactileFeedback | ( | TInt | aEventType | ) | const |
Return tactile feedback of the event. Checks the parent layouts if this visual has not defined a feedback.
TInt aEventType | Event type |
IMPORT_C const TDesC8 & | Tag | ( | ) | const |
Determines the tag of the visual.
CHuiVisual::SetTagL() CHuiVisual::IsTagged() CHuiVisual::FindTag()
IMPORT_C void | Transform | ( | CHuiGc & | aGc, |
TBool | aApply, | |||
const THuiRealRect * | aVisibleRect = 0 | |||
) | const [protected] |
Applies or restores the local transformation matrix of the visual. Should be called before and after drawing the visual.
IMPORT_C CHuiTransformation & | Transformation | ( | ) |
Returns the transformation of the visual.
CHuiTransformation * | Transformation | ( | ) | const [private] |
Retruns pointer to transformation if this visual is transformed. Otherwise NULL is returned.
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.
CHuiStatic::LayoutTransitionTime()
TInt aTransitionTime = 0 | Time for layout transition. CHuiStatic::LayoutTransitionTime() should be used as the default value, if an immediate transition is not required. |
IMPORT_C void | UpdateSiblingLayout | ( | TInt | aTransitionTime = 0 | ) |
For convenience. Updates the layout of the siblings of this visual. In other words, asks the parent layout to do a children layout.
TInt aTransitionTime = 0 | Time for layout transition. |
IMPORT_C CHuiVisual & | Visual | ( | TInt | aIndex | ) | const [virtual] |
Returns a child visual.
TInt aIndex | Index of the child visual. |
IMPORT_C void | VisualExtension | ( | const TUid & | aExtensionUid, |
TAny ** | aExtensionParams | |||
) | [protected, virtual] |
THuiTimedValue | iDepthOffset |
! Position / order / size of public variables must not change Depth offset.
CHuiDisplay * | iDisplay | [private] |
The display on which the visual is being shown.
THuiRealRect | iDisplayRect | [private] |
Cached display rectangle for the current frame. Defines Calculates the visual's bounding rectangle in display coordinates. The rect is always in pixels. DisplayRect()
TUint | iDisplayRectFrameNumber | [private] |
Describes during which frame the display rectance cache (iDisplayRect) is valid.
THuiRealRect | iDisplayRectTarget | [private] |
Cached visual's bounding rectangle animation target in display coordinates. Uses the target values of the position and size, which means transitions are always immediate in the returned rectangle.
TUint | iDisplayRectTargetFrameNumber | [private] |
Describes during which frame the display rectance target cache (iDisplayRectTarget) is valid.
TInt | iFlags | [private] |
Their location (at the beginning of member data) must not change
Their order and size must not change Flags.
TBool | iLoadingEffect | [private] |
If effect is still being loaded (parsing), visual may need to be hided
THuiRealSize | iMaxSize | [private] |
Maximum allowed size for the visual. Layouts will respect this value when layout is being updated.
THuiRealSize | iMinSize | [private] |
Minimum allowed size for the visual. Layouts will respect this value when layout is being updated.
THuiTimedValue | iOpacity |
Opacity of this visual. The interpolation style of opacity values by default is linear. A value of 0 is fully transparent, a value of 1 is fully opaque.
THuiBoxMetric | iPadding | [private] |
Padding between visual edges and content. The box metric can have a different amount of padding on each of the four sides.
TRect | iPreviousDrawn | [protected] |
Display area that was in effect during the previous draw operation. This will be included in the dirty rectangle.
TBool | iTrackVisual | [protected] |
Used for tracking the visual in different stages of rendering
CHuiTransformation * | iTransform | [private] |
If not NULL, this transformation is used when the content visual is drawn.
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.