Reference for the Mosaic class Views::Line

Views::Line
AlphaBlended
Color
Color1
Color2
Embedded
Visible
Width
Width1
Width2
Core::LineView
Point1
Point2
Core::View
Layout
Owner
ArrangeView()
ChangeViewState()
CursorHitTest()
Draw()
GetExtent()
GetRoot()
HandleEvent()
MoveView()

SEE ALSO

Using the Line view to display a straight line segment with solid color or gradient.

The class Views::Line provides a kind of view specialized to draw a single straight line segment. The end positions of the line are determined by the properties Point1 and Point2. The color of the line is defined by the property Color. Alternatively, the line can be drawn with a color gradient specified by the properties Color1 and Color2. The thickness of the line is 1 pixel unless the properties Width1 or Width2 have been modified. Lines with the thickness greatest than 1 pixel are drawn as filled polygons.

The visibility of the line 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 GUI component itself. Very useful for any kind of scrollable lists, menus, etc.

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 color Color = #FFFFFFFF;

The property 'Color' controls the color of the entire line. Changes of this property will be immediately reflected in the properties Color1 and Color2. Thus this property is useful if no gradients are desired.

property color Color1 = #FFFFFFFF;

The property 'Color1' stores the color of the line at its start position Point1.

property color Color2 = #FFFFFFFF;

The property 'Color2' stores the color of the line at its end position Point2.

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.

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.

property int32 Width = 1;

The property 'Width' controls the width of the entire line. Changes of this property will be immediately reflected in the properties Width1 and Width2.

property int32 Width1 = 1;

The property 'Width1' stores the width in pixel of the line at its start position Point1.

property int32 Width2 = 1;

The property 'Width2' stores the width in pixel of the line at its end position Point2.