Created
July 4, 2012 15:07
-
-
Save wchristian/3047819 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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