Bundle-PBib
view release on metacpan or search on metacpan
lib/PBibTk/Main.pm view on Meta::CPAN
sub initMenu {
my ($self, $mf, $win) = @_;
$self->initFileMenu($mf, $win);
$self->initBiblioMenu($mf, $win);
$self->initPaperMenu($mf, $win);
}
sub initFileMenu {
my ($self, $mf, $win, $model) = @_;
my $cmd;
$model = $self unless defined $model;
my $mb = $mf->cascade(-label => '~File'); ###, -tearoff => 0);
$cmd = [ $model, 'browsePaperFile' ];
$mb->command(-label => "~Open New Paper", -command => $cmd,
-accelerator => 'Ctrl-O' );
$win->bind('<Control-Key-o>' => $cmd);
$mb->separator();
$cmd = [ $model, 'importBiblioRefs' ];
$mb->command(-label => "~Import References ...", -command => $cmd );
lib/PBibTk/Main.pm view on Meta::CPAN
$cmd = sub { Tk::exit(0); };
$mb->command(-label => '~Quit', -command => $cmd,
-accelerator => 'Ctrl-Q');
$win->bind('<Control-q>' => $cmd);
}
sub initBiblioMenu {
my ($self, $mf, $win, $model) = @_;
my $cmd;
$model = $self unless defined $model;
my $mb = $mf->cascade(-label => '~Biblio'); ###, -tearoff => 0);
# $cmd = sub { $model->showSelectedBiblioReference(); };
$cmd = [$model, 'showSelectedBiblioReference'];
$mb->command(-label => 'Show ~Reference', -command => $cmd,
-accelerator => 'Ctrl-R' );
$win->bind('<Control-r>' => $cmd);
# $win->bind('<Return>' => $cmd);
$cmd = [ $model, 'clipboardSelectedBiblioReferenceId'];
$mb->command(-label => '~Copy CiteKey to Clipboard', -command => $cmd,
lib/PBibTk/Main.pm view on Meta::CPAN
$cmd = sub{$model->updateBiblioRefs()};
$mb->command(-label => "~Update from database",
-command => $cmd,
-accelerator => 'Ctrl-N' );
$win->bind('<Control-n>' => $cmd);
}
sub initPaperMenu {
my ($self, $mf, $win) = @_;
my $cmd;
my $mb = $mf->cascade(-label => '~Paper');
$cmd = sub { $self->showSelectedPaperReference(); };
$mb->command(-label => 'Show ~Reference', -command => $cmd,
-accelerator => 'Ctrl-T' );
$win->bind('<Control-Key-t>' => $cmd);
$cmd = sub { $self->clipboardSelectedPaperReferenceId(); };
$mb->command(-label => '~Copy CiteKey to Clipboard', -command => $cmd,
-accelerator => 'Ctrl-X' );
$win->bind('<Control-Key-x>' => $cmd);
lib/PBibTk/RefDialog.pm view on Meta::CPAN
/);
}
sub initMenu {
my ($self, $mf, $win) = @_;
my $cmd;
# ref menu
# my $mbr = $mf->Menubutton(-text => 'References');
# $mbr->grid(-row => 0, -column => 0, -sticky => 'w');
my $mbr = $mf->cascade(-label => '~References'); ###, -tearoff => 0);
$mbr->command(-label => 'Insert Fields', -command => [ $self, 'addPaperFields' ] );
$mbr->command(-label => 'Insert All Fields', -command => [ $self, 'addPaperFields', undef, 1 ] );
$mbr->command(-label => 'Insert CSCW Ref.', -command => [ $self, 'addPaperRefCSCW' ] );
$mbr->command(-label => 'Insert IEEE Ref.', -command => [ $self, 'addPaperRef', undef, 'IEEE' ] );
$mbr->command(-label => 'Insert IEEETR Ref.', -command => [ $self, 'addPaperRef', undef, 'IEEETR' ] );
$mbr->command(-label => 'Insert ElsevierJSS Ref.', -command => [ $self, 'addPaperRef', undef, 'ElsevierJSS' ] );
$mbr->separator;
$mbr->command(-label => 'Close', -command => sub {$win->destroy();});
# Biblio::BP format menu
my $mb = $mf->cascade(-label => '~Format'); ###, -tearoff => 0);
$cmd = [ $self, 'importText' ];
$mb->command(-label => "~Store reference", -command => $cmd,
-accelerator => 'Ctrl-S' );
$win->bind('<Control-Key-S>' => $cmd);
$mb->separator();
my %unsupported_export = qw(
auto 1 canon 1
cstra 1
( run in 0.549 second using v1.01-cache-2.11-cpan-49f99fa48dc )