Reference for the Mosaic unit Views
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.
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 view's area. |
AlignHorzLeft | The constraint 'AlignHorzLeft' aligns the bitmap to the view's left edge. |
AlignHorzRight | The constraint 'AlignHorzRight' aligns the bitmap to the view's right edge. |
AlignVertBottom | The constraint 'AlignVertBottom' aligns the bitmap to the view's bottom edge. |
AlignVertCenter | The constraint 'AlignVertCenter' aligns the bitmap vertically in the middle of the view's area. |
AlignVertTop | The constraint 'AlignVertTop' aligns the bitmap to the view's top edge. |
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;
}
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 |
---|---|
AlignHorzCenter | The constraint 'AlignHorzCenter' aligns the text rows horizontally in the middle of the view's area. |
AlignHorzJustified | The constraint 'AlignHorzJustified' aligns the text rows to the view's left edge. Automatically wrapped text rows are additionally stretched to the predetermined wrap width. The stretching takes place on blank signs only and affects multi-line text only. |
AlignHorzLeft | The constraint 'AlignHorzLeft' aligns the text rows to the view's left edge. |
AlignHorzRight | The constraint 'AlignHorzRight' aligns the text rows to the view's right edge. |
AlignVertBottom | The constraint 'AlignVertBottom' aligns the row or the entire text block to the view's bottom edge. |
AlignVertCenter | The constraint 'AlignVertCenter' aligns the text row or the entire text block vertically in the middle of the view's area. |
AlignVertTop | The constraint 'AlignVertTop' aligns the text row or the entire text block to the view's top edge. |