Reference for the Mosaic class Core::Outline

Core::Outline
ClipViews
Formation
OnUpdate
Padding
PaddingBottom
PaddingLeft
PaddingRight
PaddingTop
ScrollOffset
SlideHandler
Space
SpaceHorz
SpaceVert
Visible
WrapSize
AdjustContent()
CountViews()
EnsureVisible()
FindNextView()
FindPrevView()
FindSiblingView()
FindViewAtPosition()
FindViewInDirection()
FindViewWithStackingPriority()
FindViewWithinArea()
GetContentArea()
GetIndexOfView()
GetViewAtIndex()
IsScrollEffectActive()
StopScrollEffect()
Core::RectView
Bounds
Core::View
Layout
Owner
StackingPriority
AdjustDrawingArea()
ArrangeView()
ChangeViewState()
CursorHitTest()
Draw()
GetClipping()
GetExtent()
GetRoot()
HandleEvent()
MoveView()

SEE ALSO

Using the Outline Box to arrange, scroll and clip other views.

The class Core::Outline provides a special kind of a view able to unite and control its sibling views. It acts like a lightweight container for the views without being the owner of them:

The outline itself is invisible except the Embedded Wizard Composer, where all outlines appear as semitransparent rectangles. This allows you to interact with the outlines during the design time.

method void AdjustContent
(
arg Effects::PointEffect aAnimationEffect,
arg slot aOnDoneScroll
);

The method AdjustContent() scrolls the content of the outline in order to ensure that the entire view's area is filled as much as possible. The method is useful, if the outline is configured to automatically arrange the views in a formation (Formation) and some views change their state to hidden or the size of outline (Bounds) have been changed at the runtime.

This scroll operation can optionally be animated by an effect passed in the parameter aAnimationEffect. If aAnimationEffect == null, no animation is used and the scrolling is executed immediately. After the operation is done, a signal is sent to the optional slot method specified in the parameter aOnDoneScroll.

Please note, calling the method AdjustContent() while an animation is running will terminate it abruptly without the slot method aOnDoneScroll being notified. More flexible approach to stop an activate animation is to use the method StopScrollEffect(). Whether an animation is currently running can be queried by using the method IsScrollEffectActive().

property bool ClipViews = true;

The property 'ClipViews' determines how views controlled by this outline box should appear when the views lie outside the outlines's clipping area. This is usually the case when the views are intended to display some shadows or blur effects which cross the borders of the outline box.

Per default, the property is 'true' having the effect of all views controlled by the outline box being clipped at the edges of the outline's clipping area. The clipping area is determined by the property Bounds.

Initializing this property with the value 'false' deactivates the clipping for the outline box. Now, views lying outside the clipping area are visible. Please note, that deactivating the clipping may impact the screen update performance. Therefore, use this feature with prudence.

Please note, parts of views displayed outside the boundary area of the outline are not responsible for touch or mouse inputs.

method int32 CountViews();

The method CountViews() returns the total number of views controlled by this outline. In case of an empty outline without any views, 0 is returned.

Please note, this method is limited to the views embedded within the outline. Other sibling views not belonging to the outline are simply ignored.

method void EnsureVisible
(
arg Core::View aView,
arg bool aFullyVisible,
arg Effects::PointEffect aAnimationEffect,
arg slot aOnDoneScroll
);

The method EnsureVisible() scrolls the content of the outline until the given view aView is partially or fully within the outline boundary area Bounds. The respective mode is determined by the parameter aFullyVisible.

This scroll operation can optionally be animated by an effect passed in the parameter aAnimationEffect. If aAnimationEffect == null, no animation is used and the scrolling is executed immediately. After the operation is done, a signal is sent to the optional slot method specified in the parameter aOnDoneScroll.

Please note, calling the method EnsureVisible() while an animation is running will terminate it abruptly without the slot method aOnDoneScroll being notified. More flexible approach to stop an activate animation is to use the method StopScrollEffect(). Whether an animation is currently running can be queried by using the method IsScrollEffectActive().

method Core::View FindNextView
(
arg Core::View aView,
arg Core::ViewState aFilter
);

The method FindNextView() searches for the view lying in front of the view specified in the parameter aView - aView itself will be excluded from the search operation. This allows you to enumerate all affected views, view by view from the background to the front. If the parameter aView == null, the search operations will start with the first view of the outline.

The additional parameter aFilter can be used to limit the search operation to special views only, e.g. to visible and touchable views.

If there is no other view lying above the start view aView, the method returns 'null'.

Please note, this method is limited to the views embedded within the outline. Other sibling views not belonging to the outline are simply ignored.

method Core::View FindPrevView
(
arg Core::View aView,
arg Core::ViewState aFilter
);

The method FindPrevView() searches for the view lying behind the view specified in the parameter aView - aView itself will be excluded from the search operation. This allows you to enumerate all affected views, view by view from the front to the background. If the parameter aView == null, the search operations will start with the top most view.

The additional parameter aFilter can be used to limit the search operation to special views only, e.g. to visible and touchable views.

If there is no other view lying behind the start view aView, the method returns 'null'.

Please note, this method is limited to the views embedded within the outline. Other sibling views not belonging to the outline are simply ignored.

method Core::View FindSiblingView
(
arg Core::View aView,
arg Core::ViewState aFilter
);

The method FindSiblingView() searches for a sibling view of the view specified in the parameter aView - aView itself will be excluded from the search operation.

The method combines the functionality of FindNextView() and FindPrevView() and tries to find any neighbor view (regarding the Z-order not the position).

The additional parameter aFilter can be used to limit the search operation to special views only, e.g. to visible and touchable views.

If there are no other views complying the filter condition, the method returns 'null'. In contrast to other find methods, FindSiblingView() will fail, if it has been invoked with aView == 'null'.

Please note, this method is limited to the views embedded within the outline. Other sibling views not belonging to the outline are simply ignored.

method Core::View FindViewAtPosition
(
arg Core::View aView,
arg point aPosition,
arg Core::ViewState aFilter
);

The method FindViewAtPosition() searches within the embedded views for a view lying at the given position aPosition.

The search operation starts with the view lying behind the view specified in the parameter aView - aView itself will be excluded from the search operation. This allows you to enumerate all affected views, view by view from the front to the background. If the parameter aView == null, the search operations will start with the top most view.

Beside the position, the additional parameter aFilter can be used to limit the search operation to special views only, e.g. to visible and touchable views.

If there is no other view at the given position lying behind the start view aView, the method returns 'null'.

Please note, this method is limited to the views embedded within the outline. Other sibling views not belonging to the outline are simply ignored.

method Core::View FindViewInDirection
(
arg Core::View aView,
arg Core::Direction aDirection,
arg Core::ViewState aFilter
);

The method FindViewInDirection() searches within the views for a view lying in the direction aDirection relative to the center of the origin view aView. For example, invoked with the parameter aDirection == Core::Direction.Right the method tries to find a view placed on the right hand side to the origin view.

Beside the direction, the additional parameter aFilter can be used to limit the search operation to special views only, e.g. to visible and touchable views.

If more than one view does meet the search condition, the method selects the view with the shortest distance to the origin view. If no view could be found the method return 'null'.

This method is useful e.g. to navigate between GUI components of a complex menu or panel by the left, right, up and down keyboard keys.

Please note, this method is limited to the views embedded within the outline. Other sibling views not belonging to the outline are simply ignored.

method Core::View FindViewWithStackingPriority
(
arg Core::View aView,
arg int32 aMinStackingPriority,
arg int32 aMaxStackingPriority,
arg Core::ViewState aFilter
);

The method FindViewWithStackingPriority() searches for a view configured with StackingPriority property in the given range aMinStackingPriority .. aMaxStackingPriority.

The search operation starts with the view lying behind the view specified in the parameter aView. aView itself will be excluded from the search operation. This allows you to enumerate all affected views, view by view from the front to the background. If the parameter aView == null, the search operations will start with the top most view .

The additional parameter aFilter can be used to limit the search operation to special views only, e.g. to visible and touchable views.

If there is no other view lying behind the start view aView and matching the search condition, the method returns 'null'.

Please note, this method is limited to the views embedded within the outline. Other sibling views not belonging to the outline are simply ignored.

method Core::View FindViewWithinArea
(
arg Core::View aView,
arg rect aArea,
arg bool aFullyEnclosed,
arg Core::ViewState aFilter
);

The method FindViewWithinArea() searches within the embedded views for a view lying completely or partially within the designated area aArea. The respective mode is determined by the parameter aFullyEnclosed.

The search operation starts with the embedded view lying behind the view specified in the parameter aView - aView itself will be excluded from the search operation. This allows you to enumerate all affected views, view by view from the front to the background. If the parameter aView == null, the search operations will start with the top most view.

Beside the area, the additional parameter aFilter can be used to limit the search operation to special views only, e.g. to visible and touchable views.

If there is no other view within the area lying behind the start view aView, the method returns 'null'.

property Core::Formation Formation = Core::Formation.None;

The property 'Formation' determines the arrangement mode to apply on all embedded views. Depending on its value, the embedded views can be arranged in rows or/and columns. If Formation == Core::Formation.None, no automatic row/column arrangement is performed and the views are simply aligned inside the outline Bounds area accordingly to their Layout property.

This feature is useful to create lists of vertically or horizontally arranged items, like menu items or scroll list items. The order in which outline arranges the views is determined by their Z-order. For example, if Formation == Core::Formation.LeftToRight, the first view will by arranged at the left edge of the outline. The next following sibling view is placed on its right hand side, and so far. The views are thus arranged in a single row.

The Outline view can automatically break (wrap) long sequences of views in multiple rows or columns. For example, if the property is configured with Core::Formation.LeftToRight_TopToBottom, the views are arranged in multiple rows one below the other. In this case the view which does not fit within the current row is automatically moved to the next row. Per default this automatic row/column wrapping calculates with the size of Outline view. By using the property WrapSize other wrap size can be configured.

In all cases, when views are arragned in rows and/or columns, an additional gap to separate the views vertically and/or horizontally can be specified by using the properties Space, SpaceVert and SpaceHorz. Furthermore, with the properties Padding, PaddingLeft, PaddingTop, PaddingRight and PaddingBottom additional gap around the formation can be reserved.

For more details concerning the supported formations see Core::Formation.

method rect GetContentArea
(
arg Core::ViewState aFilter
);

The method GetContentArea() determines a rectangular area occupied by the views embedded within the outline. The additional parameter aFilter can be used to limit the operation to special views only, e.g. to visible and touchable views.

If there are no views complying the filter condition, the method returns an empty area.

Please note, this method is limited to the views embedded within the outline. Other sibling views not belonging to the outline are simply ignored.

method int32 GetIndexOfView
(
arg Core::View aView
);

The method GetIndexOfView() returns the Z-order position of the view determined by the parameter aView. The first view has the index 0. The next above view has the index 1, and so far. The total number of views controlled by this outline can be asked by the method CountViews().

If the method has been invoked with 'null' as parameter, or the view doesn't belong to this outline, the method returns the negative index -1.

Please note, this method is limited to the views embedded within the outline. Other sibling views not belonging to the outline are simply ignored.

method Core::View GetViewAtIndex
(
arg int32 aIndex
);

The method GetViewAtIndex() returns the view embedded at the Z-order position aIndex within the outline. The first view has the index 0. The next above view has the index 1, and so far. The total number of views controlled by this outline can be asked by the method CountViews().

If the passed index is negative or the desired view doesn't exist, the method returns 'null'.

Please note, this method is limited to the views embedded within the outline. Other sibling views not belonging to the outline are simply ignored.

method bool IsScrollEffectActive();

The method IsScrollEffectActivate() returns 'true' if the outline is currently performing a scroll animation initiated by a preceding invocation of the EnsureVisible() or AdjustContent() method.

The active animation can be stopped in a controlled way by using the method StopScrollEffect().

property slot OnUpdate = null;

The property 'OnUpdate' can refer to a slot method, which should be invoked by the outline view each time the displayed content is scrolled or the arrangement of the embedded views is altered. This method is intended to update the position of decorations, like list headers or footers. It's up to you to provide the slot method and to fill it with the desired behavior.

property int32 Padding = 0;

The property 'Padding' determines additional gap at all four edges of the area enclosing all the views controlled by this Outline. This padding is assumed as an empty part of the Outline which allows you to enlarge the scrolling range of the Outline view (see propert SlideHandler).

If the Outline view is configured to automatically arrange and wrap the embedded views in multiple rows or columns (see property Formation) and there is no explicit WrapSize specified, the padding reduces the space available for a row or a column - it reduces the available wrap size.

Please note, with the properties PaddingLeft, PaddingTop, PaddingRight and PaddingBottom additional gap values for the four edges can be configured.

property int32 PaddingBottom = 0;

The property 'PaddingBottom' determines additional gap at the bottom edge of the area enclosing all the views controlled by this Outline. This padding is assumed as an empty part of the Outline which allows you to enlarge the scrolling range of the Outline view (see propert SlideHandler).

If the Outline view is configured to automatically arrange and wrap the embedded views in multiple columns (see property Formation) and there is no explicit WrapSize specified, the padding reduces the space available for a column - it reduces the available wrap height.

Please note, with the property Padding additional gap for all four edges can be specified.

property int32 PaddingLeft = 0;

The property 'PaddingLeft' determines additional gap at the left edge of the area enclosing all the views controlled by this Outline. This padding is assumed as an empty part of the Outline which allows you to enlarge the scrolling range of the Outline view (see propert SlideHandler).

If the Outline view is configured to automatically arrange and wrap the embedded views in multiple rows (see property Formation) and there is no explicit WrapSize specified, the padding reduces the space available for a row - it reduces the available wrap width.

Please note, with the property Padding additional gap for all four edges can be specified.

property int32 PaddingRight = 0;

The property 'PaddingRight' determines additional gap at the right edge of the area enclosing all the views controlled by this Outline. This padding is assumed as an empty part of the Outline which allows you to enlarge the scrolling range of the Outline view (see propert SlideHandler).

If the Outline view is configured to automatically arrange and wrap the embedded views in multiple rows (see property Formation) and there is no explicit WrapSize specified, the padding reduces the space available for a row - it reduces the available wrap width.

Please note, with the property Padding additional gap for all four edges can be specified.

property int32 PaddingTop = 0;

The property 'PaddingTop' determines additional gap at the top edge of the area enclosing all the views controlled by this Outline. This padding is assumed as an empty part of the Outline which allows you to enlarge the scrolling range of the Outline view (see propert SlideHandler).

If the Outline view is configured to automatically arrange and wrap the embedded views in multiple columns (see property Formation) and there is no explicit WrapSize specified, the padding reduces the space available for a column - it reduces the available wrap height.

Please note, with the property Padding additional gap for all four edges can be specified.

property point ScrollOffset = <0,0>;

The property 'ScrollOffset' stores the displacement of the outline content. Changing of this property automatically causes the outline to move all its embedded views accordingly. It is very useful for scrollable lists, etc.

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 outline and the user can scroll the outline content by simply touching the slide handler on the screen.

property int32 Space = 0;

The property 'Space' stores the size of a gap in pixel to separate the embedded views vertically and/or horizontally when the outline arranges them in rows or columns. The arrangement mode is controlled by the property Formation. Please note, with the properties SpaceVert and SpaceHorz additional vertical or horizontal gap can be specified.

property int32 SpaceHorz = 0;

The property 'SpaceHorz' stores the size of a gap in pixel to separate the embedded views horizontally when the outline arranges them in columns. The arrangement mode is controlled by the property Formation. Please note, with the property Space additional gap for both, horizontal and vertical displacement can be specified.

property int32 SpaceVert = 0;

The property 'SpaceVert' stores the size of a gap in pixel to separate the embedded views vertically when the outline arranges them in rows. The arrangement mode is controlled by the property Formation. Please note, with the property Space additional gap for both, horizontal and vertical displacement can be specified.

method void StopScrollEffect
(
arg bool aSetEndValue,
arg bool aSignalOnDoneScroll
);

The method StopScrollEffect() stops the actually active scroll animation effect initiated by the preceding invocation of the method EnsureVisible() or AdjustContent()

If the parameter aSetEndValue is 'true' the scroll position of the outline is set to the end value of the actually active animation effect as if the effect had reached its end position. If this parameter is 'false' the latest scroll position remains unchanged.

If the parameter aSignalOnDoneScroll is 'true' a signal is sent to the slot method passed in the parameter aOnDoneScroll in the invocation of EnsureVisible() or AdjustContent() as if the animation had been finished regularly. If this parameter is 'false' the actual animation is stopped without notifying the slot method.

property bool Visible = true;

The property 'Visible' determines the visibility state of the Outline view and thus the visibility of the views embedded inside it. Invisible Outline views will hide the embedded views. Whether a view is really visible depends on the visibility of its Owner and the position of the view within the owners boundary area.

property int32 WrapSize = 0;

The property 'WrapSize' determines the maximum width of rows or maximum height of columns when the Outline view is configured with its Formation property to automatically arrange the embedded views in rows or columns.

If this property is zero, the maximum width (or in case of views arranged in columns, the maximum height) corresponds to the current size of the view's area minus the eventually specified padding (see Padding, PaddingLeft, PaddingRight, PaddingTop, PaddingBottom).