public
Created

  • Download Gist
prima_test.pl
Perl
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
use strict;
use warnings;
 
package prima_test;
 
use Prima qw (Application ComboBox);
 
my $mw = Prima::MainWindow->create(
 
# here there are some options, mainly that more common:
size => [ 400, 400 ],
menuItems => [
[
"~File" => [
[], # division line
[ "E~xit" => "Exit" ]
]
]
],
 
# events
onPaint => sub {
my ( $self, $canvas ) = @_;
$canvas->clear;
$canvas->color( cl::Red );
$canvas->line( 0, 0, 800, 800 );
}
);
 
$mw->insert(
'ComboBox',
name => 'ComboBox',
size => [ 100, 100 ],
 
# other options as needed
);
 
Prima->run;

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.