CWB-CQI
view release on metacpan or search on metacpan
examples/Tkwic.perl view on Meta::CPAN
}
}
close FILE;
} else {
my $p = basename($0);
print STDERR "$p:$filename: Cannot open file\n";
}
return \@macros;
}
sub update_history_menu {
my ($self) = @_;
my ($menu, $history, $label);
$menu = $self->{history_menu};
$history = $self->{query_history};
$menu->delete(1, 'end');
foreach my $query (@$history) {
$label = substr($query, 0, 40);
$label =~ s/\n/ /go;
$menu->add('command', -label => $label,
examples/Tkwic.perl view on Meta::CPAN
my $state;
if ($type_number == 0) {
$state = 'disabled';
} else {
$state = 'normal';
}
$self->{field2_menu}->configure(-state => $state);
$self->{attr2_menu}->configure(-state => $state);
}
sub update_freq_dialog {
my ($self) = @_;
my ($freq_dialog, $attributes, $default_attribute, $attribute);
$attributes = $self->{positional_attributes};
$default_attribute = $attributes->[0];
$freq_dialog = $self->{freq_dialog};
if (Tk::Exists($freq_dialog)) {
# If the corpus doesn't support the currently selected attributes the
# option menus are reset.
examples/Tkwic.perl view on Meta::CPAN
$scrolled->grid(-sticky => 'nsew');
$close->grid(-sticky => 'ew');
$dialog->gridColumnconfigure(0, -weight => 1);
$dialog->gridRowconfigure(2, -weight => 1);
$self->set_frequency_type(0);
return $dialog;
}
sub update_tag_dialog {
my ($self) = @_;
my ($tag_dialog, $corpus, $hlist, $n, @tags, $id, $freq);
$corpus = $self->{corpus};
$tag_dialog = $self->{tag_dialog};
if (Tk::Exists($tag_dialog)) {
$hlist = $self->{tag_list};
$hlist->delete('all');
$self->{tag_example}->configure(-text => '');
( run in 0.947 second using v1.01-cache-2.11-cpan-4d4bc49f3ae )