Skip to content

Instantly share code, notes, and snippets.

@wchristian
Created July 4, 2012 15:07
Show Gist options
  • Save wchristian/3047819 to your computer and use it in GitHub Desktop.
Save wchristian/3047819 to your computer and use it in GitHub Desktop.
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;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment