App-PerlTidy-Tk
view release on metacpan or search on metacpan
lib/App/PerlTidy/Tk.pm view on Meta::CPAN
);
}
}
sub load_config {
my ($self) = @_;
}
sub zoom {
my ($self, $number) = @_;
my $font_info = $self->{text}->configure('-font');
#print "${$font_info->[4]}\n"; # 'fixed 20';
my ($font, $size) = split / /, ${$font_info->[4]};
$size += $number;
$self->{text}->configure(-font => ['fixed', $size]);
}
sub create_config_panel {
my ($self) = @_;
$self->{table} = $self->{top}->Table(-columns => 2, -rows => 1, -fixedrows => 1, -scrollbars => '');
$self->{table}->pack(-expand=> 1, -fill => 'both');
my $row = -1;
#my $name = 'line-up-parentheses';
#print $self->{flags}{$name}, "\n";
#my $cb = $self->{top}->Checkbutton(
# -text => $name,
# -variable => \$self->{flags}{$name},
# -font => ['fixed', 10]
#);
#$cb->pack(-side => 'left');
for my $name (@options) {
$row++;
my $label = $self->{table}->Label(
-text => $name,
);
$self->{table}->put($row, 0, $label);
lib/App/PerlTidy/Tk.pm view on Meta::CPAN
my ($self) = @_;
#my $name = 'indent-columns';
#$self->{config}{$name} = $self->{widgets}{$name}->get;
}
sub create_text_widget {
my ($self) = @_;
$self->{text} = $self->{top}->Text(
-state => 'normal',
-font => ['fixed', 12],
);
$self->{text}->pack(-fill => 'both', -expand => 1);
}
sub show_open {
my ($self) = @_;
my $start_dir = getcwd();
my $file_selector = $self->{top}->FileSelect(-directory => $start_dir);
my $filename = $file_selector->Show;
( run in 0.930 second using v1.01-cache-2.11-cpan-ceb78f64989 )