1=pod
2
3=head1 NAME
4
5examples/cv.pl - Standard color dialog
6
7=head1 FEATURES
8
9Demonstrates usage of a standard color dialog.
10Note the left-button drag effect from the color wheel with
11compbinations of Shift,Alt,and Control.
12
13=cut
14
15use strict;
16use warnings;
17use Prima 'Dialog::ColorDialog', 'Application';
18
19my $p = Prima::Dialog::ColorDialog-> create(
20	value => 0x3030F0,
21	visible => 1,
22	quality => 1,
23);
24
25my $banner = $p-> {wheel}-> insert( Label =>
26	text => <<MSG,
27Drag colors from the color wheel by left mouse button together with combinations of Alt, Shift, and Control
28MSG
29	autoHeight => 1,
30	wordWrap   => 1,
31	transparent => 1,
32	alignment => ta::Center,
33	left  => $p-> {wheel}-> width * 0.125,
34	top => 0,
35	width => $p-> {wheel}-> width * 0.75,
36	textJustify => 1,
37);
38
39$p-> insert( Timer =>
40	timeout => 100,
41	onTick  => sub {
42		if ( $banner-> bottom > $p->{wheel}-> height) {
43			$_[0]-> destroy;
44		} else {
45			$banner-> bottom( $banner-> bottom + 2);
46		}
47	},
48)-> start;
49
50$p-> execute;
51