Reference for the Mosaic unit Views

Class Overview
Core::View
Core::LineView
Views::Line
Core::QuadView
Views::WarpView
Views::WarpGroup
Views::WarpImage
Core::RectView
Views::Applet
Views::AttrText
Views::Bevel
Views::Border
Views::FillPath
Views::FilterGroup
Views::FilterImage
Views::FilterScreen
Views::Frame
Views::Group
Views::Image
Views::Rectangle
Views::Shadow
Views::StrokePath
Views::Text
Views::Wallpaper
Enumerations
Views::Orientation
Sets
Views::ImageAlignment
Views::TextAlignment

The unit 'Views' provides a set of primitive visual objects needed to compose GUI components. You will find here objects which are able to show lines, fill rectangles and print text. These views can simply be placed within a GUI component and configured by modifying their properties.

enum Orientation
{
item Normal;
item Rotated_90;
item Rotated_180;
item Rotated_270;
}

The definition Views::Orientation determines the possible options to control the orientation of the content displayed in the Views::Image, Views::Group and Views::Text views. Depending on the selected option the view displays the content rotated.

Items Description
Normal No rotation applied on the view content.
Rotated_180 The view content is rotated by 180 degrees in counter-clockwise direction.
Rotated_270 The view content is rotated by 90 degrees in clockwise direction.
Rotated_90 The view content is rotated by 90 degrees in counter-clockwise direction.

 

set ImageAlignment
{
item AlignHorzLeft;
item AlignHorzCenter;
item AlignHorzRight;
item AlignVertTop;
item AlignVertCenter;
item AlignVertBottom;
item ScaleToFill;
item ScaleToFit;
item StretchToFill;
}

The definition Views::ImageAlignment determines the set of constraints to apply on a bitmap if its size differ from the size of the view where the bitmap is shown. Depending on the active constraints a bitmap can be aligned or stretched within the view's area.

Items Description
AlignHorzCenter The constraint 'AlignHorzCenter' aligns the bitmap horizontally in the middle of the area where the bitmap is displayed.
AlignHorzLeft The constraint 'AlignHorzLeft' aligns the bitmap to the left edge of the area where the bitmap is displayed.
AlignHorzRight The constraint 'AlignHorzRight' aligns the bitmap to the right edge of the area where the bitmap is displayed.
AlignVertBottom The constraint 'AlignVertBottom' aligns the bitmap to the bottom edge of the area where the bitmap is displayed.
AlignVertCenter The constraint 'AlignVertCenter' aligns the bitmap vertically in the middle of the area of the area where the bitmap is displayed.
AlignVertTop The constraint 'AlignVertTop' aligns the bitmap to the top edge of the area where the bitmap is displayed.
ScaleToFill The constraint 'ScaleToFill' scales the bitmap to the size of the view while keeping the bitmap's aspect ratio. The bitmap is scaled until the entire view's area is covered by the bitmap. If the aspect ratio of the bitmap differ to the of the view, the bitmap is clipped on the view's edges.
ScaleToFit The constraint 'ScaleToFit' scales the bitmap to the size of the view while keeping the bitmap's aspect ratio. The bitmap is scaled until the entire bitmap fits within the view's area. If the aspect ratio of the bitmap differ to the of the view, parts of the view remain not covered by the bitmap.
StretchToFill The constraint 'StretchToFill' scales the bitmap to the size of the view without taking in account the bitmaps's aspect ratio. Thus the bitmap may appear distorted.

 

set TextAlignment
{
item AlignHorzLeft;
item AlignHorzCenter;
item AlignHorzRight;
item AlignVertTop;
item AlignVertCenter;
item AlignVertBottom;
item AlignHorzJustified;
item AlignHorzAuto;
item AlignVertCenterBaseline;
}

The definition Views::TextAlignment determines the set of constraints to apply on text rows and blocks if their size differ from the size of the view where the text is shown. Depending on the active constraints the text rows can be aligned horizontally and text blocks vertically.

Items Description
AlignHorzAuto The constraint 'AlignHorzAuto' aligns the text rows depending on its content to the left or right edge of the area where the text is displayed. If the Text view is configured to apply the Unicode Bidirectional Algorithm on the provided text and this text starts with a right-to-left character, the option implies the alignment to the right edge. In all other cases the left alignment is assumed.
AlignHorzCenter The constraint 'AlignHorzCenter' aligns the text rows horizontally in the middle of the area where the text is displayed.
AlignHorzJustified The constraint 'AlignHorzJustified' instructs the Text view to stretch all automatically wrapped text rows to the predetermined wrap width. The stretching takes place on blank signs only and affects multi-line text only. This option can be combined with AlignHorzLeft, AlignHorzCenter, AlignHorzRight or AlignHorzAuto.
AlignHorzLeft The constraint 'AlignHorzLeft' aligns the text rows to the left edge of the area where the text is displayed.
AlignHorzRight The constraint 'AlignHorzRight' aligns the text rows to the right edge of the area where the text is displayed.
AlignVertBottom The constraint 'AlignVertBottom' aligns the row or the entire text block to the bottom edge of the area where the text is displayed.
AlignVertCenter The constraint 'AlignVertCenter' aligns the text row or the entire text block vertically in the middle of the area where the text is displayed.
AlignVertCenterBaseline The constraint 'AlignVertCenterBaseline' aligns the text row or the entire text block vertically in the middle of the area where the text is displayed, similarly to the constraint 'AlignVertCenter'. However, unlike the ordinary 'AlignVertCenter', the text is centered relative to its baselines. In this case, the algorithms adjustes the text, so that the area enclosing the baselines is centered and not the area occupied by the text itself.
AlignVertTop The constraint 'AlignVertTop' aligns the text row or the entire text block to the top edge of the area where the text is displayed.