Reference for the Mosaic class Views::Wallpaper

Views::Wallpaper
AlphaBlended
Animated
Bitmap
Color
ColorBL
ColorBR
ColorTL
ColorTR
Embedded
Endless
FrameNumber
OnFinished
Opacity
ScrollOffset
Visible
StartAnimation
StopAnimation
Core::RectView
Bounds
Core::View
Layout
Owner
ArrangeView()
ChangeViewState()
CursorHitTest()
Draw()
GetExtent()
GetRoot()
HandleEvent()
MoveView()

SEE ALSO

Using the Wallpaper view to fill a rectangular area with multiple copies of a bitmap.

The class Views::Wallpaper provides a kind of view specialized to fill an area with multiple copies of a bitmap. The bitmap is determined by the property Bitmap. In case of a multi-frame bitmap the desired frame can be selected by the property FrameNumber. The animation of bitmaps containing short video sequences is controlled by the properties Animated and Endless. Alternatively, the animation can be controlled by sending signals to the slot methods StartAnimation and StopAnimation.

The position and the size of the area to fill with the bitmap copies is determined by the property Bounds. The properties Color, ColorTL, ColorTR, ColorBL and ColorBR can be used to tint the copied bitmaps or to modulate their opacity. For each view's corner different color can be set, so the wallpaper can be shown with fancy color or opacity gradients. The particular effect of the colors depends on the type of the bitmap:

The property ScrollOffset scrolls the bitmaps within the view's area. The visibility of the wallpaper is controlled by the properties Visible, AlphaBlended, Opacity and Embedded. In particular the property Embedded can determine whether the corresponding view is limited (== embedded) to the boundary of a sibling Core::Outline view or not. The embedding of views within a Core::Outline allows a kind of sub-groups within the GUI component itself. Very useful for any kind of scrollable lists, menus, etc.

property bool AlphaBlended = true;

The property 'AlphaBlended' determines the drawing mode for the view. Views with disabled alpha-blending will override the affected screen areas. If this mode is enabled, the pixel of the view are combined with the origin screen content by alpha-blending.

property bool Animated = false;

The property 'Animated' determines whether the view may play animated bitmaps. Assigning the value 'true' to this property can cause the view to re-start the animated bitmap with the frame specified in the property FrameNumber. The value 'false' in contrast stops the running animated bitmap at its current position. The animation can also be controlled by sending signals to the slot methods StartAnimation and StopAnimation. Animated bitmaps are a special kind of bitmaps containing short video sequences. The animation can work with an animated bitmap only. See Resources::Bitmap.

property Resources::Bitmap Bitmap = null;

The property 'Bitmap' refers to the bitmap object to display in this view. If the bitmap consists of more than one frame, the desired frame number can be determined by the property FrameNumber. If the bitmap is animated, the animation will start if the property Animated is 'true'.

property color Color = #FFFFFFFF;

The property 'Color' controls the color of the entire wallpaper. Changes of this property will be immediately reflected in the properties ColorTL, ColorTR, ColorBL and ColorBR. Thus this property is useful if no gradients are desired.

The effect of this color value depends on the type of the bitmap specified in the Bitmap property:

property color ColorBL = #FFFFFFFF;

The property 'ColorBL' stores the color at the bottom-left corner of the view's Bounds area. The effect of this color value depends on the type of the bitmap specified in the Bitmap property:

property color ColorBR = #FFFFFFFF;

The property 'ColorBR' stores the color at the bottom-right corner of the view's Bounds area. The effect of this color value depends on the type of the bitmap specified in the Bitmap property:

property color ColorTL = #FFFFFFFF;

The property 'ColorTL' stores the color at the top-left corner of the view's Bounds area. The effect of this color value depends on the type of the bitmap specified in the Bitmap property:

property color ColorTR = #FFFFFFFF;

The property 'ColorTR' stores the color at the top-right corner of the view's Bounds area. The effect of this color value depends on the type of the bitmap specified in the Bitmap property:

property bool Embedded = false;

The property 'Embedded' controls how the view should appear and behave within its superior Owner. If this property == 'true', the affected view will be embedded (limited) to the boundary of a preceding Core::Outline sibling view. This is as if the view had been embedded within this outline. Beside the appearance limitation of the outline boundary, the outline also provides more sophisticated arrangement mechanisms and the content scrolling. It is therefore useful to create scrollable menus or lists.

If this property is 'false', the view is considered as a regular view of its Owner - it doesn't belong to any outline.

property bool Endless = true;

The property 'Endless' determines whether the view should play the animated bitmap endlessly. If this property is 'false', the animation will run only once after it has been started. If it is 'true' the animated bitmap will re-start automatically with the frame specified in the property FrameNumber.

property int32 FrameNumber = 0;

The property 'FrameNumber' determines the bitmap frame to display in this view. Each bitmap consists of either one or more frames (images). The first frame has the number 0, the second frame has the number 1, and so far. Bitmaps containing more than one frame are called multi-frame bitmaps. See Resources::Bitmap.

Changes of this property cause the view to switch the shown frame. If the desired frame is not available in the bitmap, no bitmap is shown. Additionally, the value stored in this property determines the frame to start an animation of an animated bitmap. The animation is controlled by the property Animated.

property slot OnFinished = null;

The property 'OnFinished' can refer to a slot method, which should be invoked when the animation is done. It's up to you to provide the slot method and to fill it with the desired behavior. It makes possible to chain animations together, so the finish of one animation can trigger another animation. To do this simply assign the StartAnimation slot method of the one view to the OnFinished property of the other view.

property int32 Opacity = 255;

The property 'Opacity' controls the translucence of the view. This property can take values in range of 0 .. 255. If the value is 255, the view will appear with its full opacity. The value equal to zero results in a fully transparent view. Other values in the range 1 .. 254 show a semitransparent views.

property point ScrollOffset = <0,0>;

The property 'ScrollOffset' stores an additional displacement in pixel to move the wallpaper content within the view's area. It is useful to create e.g. marquee images.

slot StartAnimation;

The slot method 'StartAnimation' re-starts the animated bitmap if a signal is sent to this slot method. The animation will start with the frame specified in the property FrameNumber. Animated bitmaps are a special kind of bitmaps containing short video sequences. The method has no effect if the bitmap can't be animated. See Resources::Bitmap.

slot StopAnimation;

The slot method 'StopAnimation' stops the running animated bitmap if a signal is sent to this slot method. This causes the animation to pause at its current position. Animated bitmaps are a special kind of bitmaps containing short video sequences. See Resources::Bitmap.

property bool Visible = true;

The property 'Visible' determines the visibility state of the view. Invisible views will not appear on the screen. Whether a view is really visible depends on the visibility of its Owner and the position of the view within the owners boundary area.