NAME
Prima::Widget::Fader - fading- in/out functions
DESCRIPTION
The role implements fading effects in widgets
SYNOPSIS
use base qw(Prima::Widget Prima::Widget::Fader);
{
my %RNT = (
	%{Prima::Widget-> notification_types()},
	%{Prima::Widget::Fader-> notification_types()},
);
sub notification_types { return \%RNT; }
}
sub on_mouseenter { shift-> fader_in_mouse_enter }
sub on_mouseleave { shift-> fader_out_mouse_leave }
sub on_paint
{
	my ( $self, $canvas ) = @_;
	$canvas->backColor( $self-> fader_prelight_color( $self-> hiliteBackColor ));
	$canvas->clear;
}
API
The API is currently under design so the parts that are documented are those that expected to be staying intact.
Methods
- fader_in_mouse_enter
 - 
Initiates a fade-in transition, calls repaint on each step.
 - fader_out_mouse_leave
 - 
Initiates a fade-out transition, calls repaint on each step.
 - fader_current_value
 - 
Returns the current fader value in the range from 0 to 1. Returns
undefif there is no current fading transition in effect - fader_prelight_color $COLOR [, $MULTIPLIER ]
 - 
Given a base
$COLOR, increases (or decreases) its brightness according tofader_current_valueand an eventual$MULTIPLIERthat is expected to be in the range from 0 to 1. 
Events
- FadeIn $ENDS_OK
 - 
Called when
fader_in_mouse_enterfinishes the fading, the$ENDS_OKflag is set to 0 if the process was overridden by another fader call, 1 otherwise. - FadeOut $ENDS_OK
 - 
Called when
fader_out_mouse_leavefinishes the fading, the$ENDS_OKflag is set to 0 if the process was overridden by another fader call, 1 otherwise. - FadeRepaint
 - 
By default repaints the whole widget, but can be overloaded if only some widget parts need to reflect the fader effect.
 
AUTHOR
Dmitry Karasik, <dmitry@karasik.eu.org>.