Reference for the Mosaic class Views::Group

Views::Group
Alignment
AlphaBlended
AutoSize
Embedded
Group
Opacity
OpacityBL
OpacityBR
OpacityTL
OpacityTR
Orientation
Quality
RelayCursorEvents
ScrollOffset
SlideHandler
Visible
GetContentArea()
Core::RectView
Bounds
Core::View
Layout
Owner
StackingPriority
AdjustDrawingArea()
ArrangeView()
ChangeViewState()
CursorHitTest()
Draw()
GetClipping()
GetExtent()
GetRoot()
HandleEvent()
MoveView()

SEE ALSO

Using the Group view to display, scale and stretch the image (the appearance) of another GUI component.

The class Views::Groups provides a kind of view specialized to show the aspect of a foreign GUI component. In this manner several copies of the component can be shown on the screen. Even the aspect of an invisible component. This is very useful for fancy fade or mirror effects. To work, the component has to be buffered. For this purpose set its property Buffered to the value 'true'. Not buffered components will not appear in this view.

The GUI component to show its aspect is referred by the property Group. The position and the size of the area where the component's aspect is shown is determined by the property Bounds. If the size of this area differs from the size of the component the displayed content can be aligned or scaled within this area. This is controlled by the property Alignment. With the property Orientation the displayed content can be rotated. The properties Opacity, OpacityTL, OpacityTR, OpacityBL and OpacityBR can be used to modulate the transparency. For each view's corner different opacity can be set, so the component's aspect can be shown with fancy opacity gradients.

The property SlideHandler permits the view to be connected together with an interactive Core::SlideTouchHandler. In this manner the user can scroll the displayed content by simply touching the slide handler on the screen. Alternatively, the scroll position can be controlled by the value of the property ScrollOffset. This view is also able to relay touch events to the associated GUI component. This is determined by the property RelayCursorEvent.

The visibility of the view is controlled by the properties Visible, AlphaBlended 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 superior GUI component itself. Very useful for any kind of scrollable lists, menus, etc.

property Views::ImageAlignment Alignment = Views::ImageAlignment[AlignHorzCenter, AlignVertCenter];

The property 'Alignment' determines how the view should display the component if its size differ from the size of the view. Depending on the value of this property the component's aspect can be aligned or stretched within the view's Bounds area. The origin component is not affected by this operation.

Please note, the orientation of the area in context of which the displayed content is aligned is affected by the property Orientation. For example, if the view is configured to rotate the displayed content 90 degrees counter-clockwise and to align it to the left edge, the content will be arranged consequently at the bottom edge of the view.

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 AutoSize = false;

The property 'AutoSize' determines whether Bounds of the view should be adjusted automatically in response to size changes of the associated component Group. If AutoSize is 'true', the view will adapt its bounds area correspondingly to the current size of the component.

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.

method rect GetContentArea();

The method GetContentArea() returns the position and the size of an area where the view will show the aspect of the associated component aGroup. This area is expressed in coordinates relative to the top-left corner of the view's Owner. The method takes in account all properties which do affect the position and the alignment of the displayed component, e.g. Alignment or ScrollOffset.

property Core::Group Group = null;

The property 'Group' refers to a component whose aspect should be displayed within this view. In this manner several copies of a component can be shown on the screen. This is useful for fancy fade or mirror effects. Don't forget to activate the Buffered property of the component. Not buffered components can't be shown by this view.

property int32 Opacity = 255;

The property 'Opacity' controls the opacity of the entire view. Thus this property is useful if no gradients are desired. 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 view. The resulting opacity can additionally be modulated by the values specified in the properties OpacityTL, OpacityTR, OpacityBL and OpacityBR.

property int32 OpacityBL = 255;

The property 'OpacityBL' controls the translucence of the view at its bottom-left corner. This property can take values in range of 0 .. 255. If the value is 255, the corner will appear with its full opacity. The value equal to zero results in a fully transparent corner. Other values in the range 1 .. 254 show a semitransparent view. This opacity value can additionally be modulated by the common opacity value stored in the property Opacity.

property int32 OpacityBR = 255;

The property 'OpacityBR' controls the translucence of the view at its bottom-right corner. This property can take values in range of 0 .. 255. If the value is 255, the corner will appear with its full opacity. The value equal to zero results in a fully transparent corner. Other values in the range 1 .. 254 show a semitransparent view. This opacity value can additionally be modulated by the common opacity value stored in the property Opacity.

property int32 OpacityTL = 255;

The property 'OpacityTL' controls the translucence of the view at its top-left corner. This property can take values in range of 0 .. 255. If the value is 255, the corner will appear with its full opacity. The value equal to zero results in a fully transparent corner. Other values in the range 1 .. 254 show a semitransparent view. This opacity value can additionally be modulated by the common opacity value stored in the property Opacity.

property int32 OpacityTR = 255;

The property 'OpacityTR' controls the translucence of the view at its top-right corner. This property can take values in range of 0 .. 255. If the value is 255, the corner will appear with its full opacity. The value equal to zero results in a fully transparent corner. Other values in the range 1 .. 254 show a semitransparent view. This opacity value can additionally be modulated by the common opacity value stored in the property Opacity.

property Views::Orientation Orientation = Views::Orientation.Normal;

The property 'Orientation' determines whether the component should be displayed with normal or rotated orientation.

property bool Quality = true;

The property 'Quality' determines whether the image scale or stretch operations should be performed with an additional bi-linear filter or not. The usage of the filter may produce smooth outputs. Without the filter the image may appear with ugly steps. Depending on the underlying graphics system, the filter may impact the resulting performance. Therefore it's up to you to decide which part of the GUI should appear with the higher quality. To activate the filter assign 'true' to this property.

property bool RelayCursorEvents = false;

The property 'RelayCursorEvents' determines, whether the view should react to cursor events and relay them to the associated component Group. If this property is set 'true', the view converts all received touch screen events in the coordinate space of the associated component and relays the events to this component.

property point ScrollOffset = <0,0>;

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

property Core::SlideTouchHandler SlideHandler = null;

The property 'SlideHandler' provides an interface, where a slide handler can be attached. In this manner the handler can control the view and the user can scroll the view's content by simply touching the slide handler on the screen.

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.