Reference for the Mosaic class Core::Outline

Core::Outline
Formation
OnUpdate
ScrollOffset
SlideHandler
Space
SpaceHorz
SpaceVert
Visible
AdjustContent()
CountViews()
EnsureVisible()
FindNextView()
FindPrevView()
FindSiblingView()
FindViewAtPosition()
FindViewInDirection()
FindViewWithinArea()
GetContentArea()
GetIndexOfView()
GetViewAtIndex()
IsScrollEffectActive()
StopScrollEffect()
Core::RectView
Bounds
Core::View
Layout
Owner
StackingPriority
ArrangeView()
ChangeViewState()
CursorHitTest()
Draw()
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().

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 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 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. If the property is configured with Core::Formation.LeftToRight_TopToBottom, the views are arranged in rows one below the other. The additional Space can be used to separate the views vertically and/or horizontally.

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 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 padding 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 padding 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 padding 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.