Reference for the Mosaic class XFlat::VarianceDisplay

XFlat::VarianceDisplay
BarColor
CurrentValue
Indicator
IndicatorAngle
MaxValue
MinValue
Needle
NeedleAngle
NominalValue
OutletCurrent
OutletNominal
Unit
drawIndicator()
drawNeedle()
outletCurrentSlot
outletNominalSlot
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()

Special widget to show the variance between a current value and a nominal value. The widget illustrates a nominal value by using a needle and the current value by using a colored circular bar.

property color BarColor = XFlat::ColorXFlatYellow;

The property 'BarColor' defines the color of the rotating bar.

property int32 CurrentValue = 50;

The property 'CurrentValue' stores the momentary value of the widget. The value is limited automatically to the range from MinValue to MaxValue.

var Resources::Bitmap Indicator = XFlat::WheelSmallIndicator;

The variable 'Indicator' contains the bitmap resource, that is used to draw the rotating indicator bar. The image has to contain the top left quarter of a circular object.

var float IndicatorAngle = 0.0;

Current angle of indicator.

property int32 MaxValue = 100;

The property 'MaxValue' defines the upper boundary of the widgets value range.

property int32 MinValue = 0;

The property 'MinValue' defines the lower boundary of the widgets value range.

var Resources::Bitmap Needle = XFlat::Needle;

The variable 'Needle' contains the bitmap resource, that is used to draw the rotating needle over the bar.

var float NeedleAngle = 0.0;

Current angle of needle.

property int32 NominalValue = 80;

The property 'NominalValue' stores the nominal (set) value of the widget. The rotation angle of the needle corresponds to the nominal value. The value is limited automatically to the range from MinValue to MaxValue.

property ^int32 OutletCurrent = 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 ^int32 OutletNominal = 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 string Unit = "xy";

The property 'Unit' stores the text to display in combination with the NominalValue.

method void drawIndicator
(
arg Graphics::Canvas aCanvas,
arg rect aClip,
arg int32 aX,
arg int32 aY,
arg float aAngle,
arg color aColor,
arg int32 aOpacity,
arg bool aBlend
);

The method 'drawIndicator' is used to draw the colored indicator over the background.

method void drawNeedle
(
arg Graphics::Canvas aCanvas,
arg rect aClip,
arg int32 aX,
arg int32 aY,
arg float aAngle,
arg int32 aOpacity,
arg bool aBlend
);

The method 'drawNeedle' is used to draw the needle over the indicator bar.

slot outletCurrentSlot;

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.

slot outletNominalSlot;

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.