App-GUI-Juliagraph
view release on metacpan or search on metacpan
lib/App/GUI/Juliagraph.pm view on Meta::CPAN
use Wx;
use utf8;
our $NAME = __PACKAGE__;
our $VERSION = '0.72';
use base qw/Wx::App/;
use App::GUI::Juliagraph::Frame;
sub OnInit {
my $app = shift;
my $frame = App::GUI::Juliagraph::Frame->new( undef, 'Juliagraph '.$VERSION);
$frame->Show(1);
$frame->CenterOnScreen();
$app->SetTopWindow($frame);
1;
}
sub OnQuit { my( $self, $event ) = @_; $self->Close( 1 ); }
sub OnExit { my $app = shift; 1; }
1;
__END__
lib/App/GUI/Juliagraph/Frame/Panel/ColorPicker.pm view on Meta::CPAN
package App::GUI::Juliagraph::Frame::Panel::ColorPicker;
use base qw/Wx::Panel/;
use App::GUI::Juliagraph::Widget::ColorDisplay;
sub new {
my ( $class, $parent, $colors ) = @_;
return unless ref $parent and ref $colors eq 'HASH';
my $self = $class->SUPER::new( $parent, -1 );
$self->{'colors'} = { %$colors }; # $frame->{'config'}->get_value('color')
$self->{'color_names'} = [ sort keys %{$self->{'colors'}} ];
$self->{'color_index'} = 0;
my $btnw = 46; my $btnh = 17;# button width and height
$self->{'select'} = Wx::ComboBox->new( $self, -1, $self->current_color_name, [-1,-1], [170, -1], $self->{'color_names'});
$self->{'<'} = Wx::Button->new( $self, -1, '<', [-1,-1], [ 30, 17] );
$self->{'>'} = Wx::Button->new( $self, -1, '>', [-1,-1], [ 30, 17] );
$self->{'load'} = Wx::Button->new( $self, -1, 'Load', [-1,-1], [$btnw, $btnh] );
$self->{'del'} = Wx::Button->new( $self, -1, 'Del', [-1,-1], [$btnw, $btnh] );
$self->{'save'} = Wx::Button->new( $self, -1, 'Save', [-1,-1], [$btnw, $btnh] );
( run in 2.052 seconds using v1.01-cache-2.11-cpan-e1769b4cff6 )