Reference for the Mosaic class Steel::Indicator

Steel::Indicator
Active
Flashing
Outlet
Type
outletSlot
Core::Group
AlphaBlended
Buffered
Embedded
Enabled
Focus
Opacity
Visible
Add()
AddBehind()
BroadcastEvent()
BroadcastEventAtPosition()
CountViews()
DispatchEvent()
FindNextView()
FindPrevView()
FindSiblingView()
FindViewAtPosition()
FindViewInDirection()
FindViewWithinArea()
GetContentArea()
GetIndexOfView()
GetViewAtIndex()
GlobalPosition()
HasViewState()
Init()
InvalidateArea()
InvalidateViewState()
LocalPosition()
ObtainFocus()
Remove()
Restack()
RestackBack()
RestackBehind()
RestackTop()
UpdateLayout()
UpdateViewState()
Core::RectView
Bounds
Core::View
Layout
Owner
ArrangeView()
ChangeViewState()
CursorHitTest()
Draw()
GetExtent()
GetRoot()
HandleEvent()
MoveView()

Indicator widget with a LED design. The widget is used to display a boolean value.

property bool Active = false;

The property 'Active' stores the current state of the indicator. As long as the property is 'false', the widget represents the status 'off' and the LED should appear switched-off. As long as the property is 'true', the widget represents the status 'on' and the LED should appear illuminated.

property bool Flashing = false;

The property 'Flashing' stores the flashing mode of the indicator. If the property is set to true, the simulated LED will flash automatically, as long as the indicator is active.

property ^bool Outlet = null;

The property 'Outlet' provides an interface for the Model-View-Controller (MVC). In the MVC, the widgets (views, controllers) and the application logic (model) are always kept apart. An automatism behind this model ensures, that widgets are notified automatically as soon as the affected model has changed its state. On the other hand, user interactions on a widget cause the affected model to execute the application logic. Usually, a model is a simple Chora object containing several properties and the implementation of onget/onset method.

By assigning a property reference, Outlet establishes a connection between the widget and the model object, the affected property belongs to. After this, the widget is able to read and modify the referred property in response to the user interactions. It is also able to adapt the widget appearance, if the value of the referred property has been modified by another widget or by the application logic itself.

property Steel::LedType Type = Steel::LedType.Red;

The property 'Type' determines the graphical appearance of the indicator widget: a red, green, yellow or blue LED can be selected.

slot outletSlot;

This slot method will receive a signal, if the value of the property assigned to Outlet has been changed by another widget or by the application logic. In response to this notification, the widget will update itself.