Reference for the Mosaic class Effects::VisibilityFader
The class Effects::VisibilityFader provides functionality for the most primitive fade-in and fade-out transitions affecting the pure visibility of a given GUI component. This fader is thus ideal wherever one GUI component should instantly appear or disappear in context of another component. In fact, this version of a fader does not implement any animation effects to smoothly change the state of the affected component.
With the property Visible you configure, whether the fader should show or hide the GUI component. When you intend to show the GUI component, you can additionally specify in the property Position where it should appear. In such case set the property UseCurrentState to the value 'false'. If the property UseCurrentState is 'true', the GUI component will appear at position, the component stores already in its own Bounds property.
The fader automatically takes care of adding the GUI component to the intended owner, when the component should appear and it is not yet a member within the owner. Moreover, when showing the component, the fader automatically focuses it and restacks it to appear above all other sibling views existing already within the owner component. This behavior can be configured by modifying the properties AssignFocus and RestackTopmost.
The fader automatically removes the GUI component from its owner, when the component disappears. This behavior can be changed by modifying the property RemoveIfHidden.
Please note, when the fader is configured to fade-in (show) the GUI component, the affected operation is performed just at the beginning of all other transitions running simultaneously, in other words, during the start phase of the transition. In turn, if the fader is configured to fade-out (hide) the component, the operation is executed during the end phase of the transition. This behavior can be modified by using the properties ShowAtStart and HideAtStart.
Applying the fade-out transition on a GUI component, which is already invisible has no effect. Similarly, the fade-in transition has no effect if the GUI component is already visible at the specified Position. In both cases the affected component retains its actual state.
In practice, you create an instance of the fader class, configure its properties (in particular the property Visible) according to the desired kind of transition and pass both, the fader instance and the affected GUI component as parameters in the invocation of the method Core::Group.FadeGroup().
property bool HideAtStart = false;
The property 'HideAtStart' determines the transition phase, when the affected GUI component should disappear. Initializing this property with the value 'true' causes the fader to hide the GUI component just at the beginning of the transition. Initializing the property with the value 'false' causes the component to be hidden at the end of the transition. Using this property is essential only when the fader is intended to perform its animation simultaneously with other fader instances. This property has an effect only when the fader is configured to hide the component (property Visible is 'false').
property point Position = <0,0>;
The property 'Position' determines the position relative to the top-left corner of Owner where to show the affected GUI component Group. This property has an effect only when the fader is configured to show the component (property Visible is 'true') and the fader is not configured to use the actual state of the affected GUI component (the property UseCurrentState is 'false'). If the property UseCurrentState is 'true', the GUI component will appear at position, stored already in its property Bounds.
property bool ShowAtStart = true;
The property 'ShowAtStart' determines the transition phase, when the affected GUI component should appear. Initializing this property with the value 'true' causes the fader to show the GUI component just at the beginning of the transition. Initializing the property with the value 'false' causes the component to be shown at the end of the transition. Using this property is essential only when the fader is intended to perform its animation simultaneously with other fader instances. This property has an effect only when the fader is configured to show the component (property Visible is 'true').