CVS-Metrics
view release on metacpan or search on metacpan
bin/cvs_wxlog view on Meta::CPAN
my $self = $class->SUPER::new(undef, -1, $title,
wxDefaultPosition, wxDefaultSize);
$self->SetIcon(Wx::GetWxPerlIcon());
eval 'use Wx::ActiveX::IE';
die $@ if ($@);
my $IE = Wx::ActiveX::IE->new($self, -1, wxDefaultPosition, wxDefaultSize);
$IE->LoadUrl($url);
my $top_s = Wx::BoxSizer->new(wxVERTICAL);
$top_s->Add($IE, 1, wxGROW|wxALL, 0);
$self->SetSizer($top_s);
$self->SetAutoLayout(1);
return $self;
}
#######################################################################
package MyHtmlFrame;
use strict;
use base qw(Wx::Frame);
use Wx::Html;
use Wx qw(:sizer);
use Wx qw(wxDefaultPosition wxDefaultSize);
sub new {
my $class = shift;
my ($title, $file) = @_;
my $self = $class->SUPER::new(undef, -1, $title,
wxDefaultPosition, wxDefaultSize);
$self->SetIcon(Wx::GetWxPerlIcon());
my $BROWSER = Wx::HtmlWindow->new($self, -1, wxDefaultPosition, wxDefaultSize);
$BROWSER->LoadPage($file);
my $top_s = Wx::BoxSizer->new(wxVERTICAL);
$top_s->Add($BROWSER, 1, wxGROW|wxALL, 0);
$self->SetSizer($top_s);
$self->SetAutoLayout(1);
return $self;
}
#######################################################################
package MyFrame;
use strict;
use base qw(Wx::Frame);
use File::Basename;
use Wx::Event qw(EVT_MENU EVT_BUTTON EVT_COMBOBOX EVT_TREE_SEL_CHANGED);
use Wx qw(:window :sizer :treectrl :bitmap :button :combobox :statictext :icon :color);
use Wx qw(wxDefaultPosition wxDefaultSize wxOK);
use constant ID_QUIT => 10000;
sub new {
my $class = shift;
my $model = shift;
my $self = $class->SUPER::new(@_);
$self->{model} = $model;
$self->CreateStatusBar(1);
$self->SetBackgroundColour(wxLIGHT_GREY);
$self->SetIcon(Wx::GetWxPerlIcon());
$self->CreateMyMenuBar();
$self->CreateMyTreeCtrl();
my $rightsizer = Wx::BoxSizer->new(wxVERTICAL);
my $bottomsizer = Wx::BoxSizer->new(wxHORIZONTAL);
my $topsizer = Wx::BoxSizer->new(wxHORIZONTAL);
if (scalar(@{$model->{tags}}) >= 2) {
my $b_audit = Wx::Button->new($self, -1, 'Audit :');
my @tags_from = @{$model->{tags}};
pop @tags_from;
my @tags_to = @{$model->{tags}};
shift @tags_to;
my $cb_from = Wx::ComboBox->new($self, -1, $model->{tag_from},
wxDefaultPosition, wxDefaultSize,
\@tags_from, wxCB_READONLY);
my $cb_to = Wx::ComboBox->new($self, -1, $model->{tag_to},
wxDefaultPosition, wxDefaultSize,
\@tags_to, wxCB_READONLY);
my $l_from = Wx::StaticText->new($self, -1, 'from',
wxDefaultPosition, wxDefaultSize, wxST_NO_AUTORESIZE );
my $l_to = Wx::StaticText->new($self, -1, 'to',
wxDefaultPosition, wxDefaultSize, wxST_NO_AUTORESIZE );
EVT_BUTTON($self, $b_audit, \&OnAudit);
EVT_COMBOBOX($self, $cb_from, \&OnComboFrom);
EVT_COMBOBOX($self, $cb_to, \&OnComboTo);
$bottomsizer->Add($b_audit, 0, wxALL, 2);
$bottomsizer->Add($l_from, 0, wxALL, 2);
$bottomsizer->Add($cb_from, 0, wxALL, 2);
$bottomsizer->Add($l_to, 0, wxALL, 2);
$bottomsizer->Add($cb_to, 0, wxALL, 2);
}
$self->{bmp} = Wx::StaticBitmap->new($self, -1, Wx::Bitmap->new(600, 400, -1));
$rightsizer->Add($self->{bmp}, 0, wxALL|wxALIGN_CENTER, 1);
$rightsizer->Add($bottomsizer, 0, wxALL|wxALIGN_CENTER, 8);
$topsizer->Add($self->{tree}, 1, wxEXPAND);
$topsizer->Add($rightsizer, 0, wxALL);
( run in 1.086 second using v1.01-cache-2.11-cpan-5b529ec07f3 )