Orac-alpha
view release on metacpan or search on metacpan
orac_Base.pm view on Meta::CPAN
my(@lay) = qw/-side bottom -expand no -fill both/;
$$button_bar_ref = $$win_ref->Frame(-relief=>'ridge',
-bd=>2,
)->pack(@lay);
return;
}
=head2 create_balloon_bars
This creates the necessary basic requirements for setting up
message balloons within a status bar.
=cut
sub create_balloon_bars {
my $self = shift;
my ($button_bar_ref,
$balloon_ref,
$win_ref,
) = @_;
$self->balloon_bar($balloon_ref, $win_ref, undef, );
$$button_bar_ref = $$win_ref->Frame(-relief=>'ridge',
-bd=>2,
)->pack( -side => 'bottom',
-fill => 'both',
-expand => 'no',
);
return;
}
=head2 see_sql_but
This creates a basic 'See SQL' button for viewing executed SQL.
=cut
sub see_sql_but {
my $self = shift;
my ($menu_ref, $win_ref, $cm_ref, $use_img, $balloon_ref, ) = @_;
if (!defined($use_img))
{
$use_img = 0;
}
my $b = $$menu_ref->Button(
-command=> sub{
$$win_ref->Busy(-recurse=>1);
$self->see_sql($$win_ref,$$cm_ref);
$$win_ref->Unbusy;
}
)->pack(-side=>'left');
if ($use_img)
{
my $img;
$self->get_img( $win_ref, \$img, 'sql' );
$b->configure(-image=>$img);
if (defined($balloon_ref))
{
$$balloon_ref->attach(
$b,
-msg => $main::ssq,
);
}
}
else
{
$b->configure(-text=>$main::ssq);
}
return \$b;
}
=head2 window_exit_button
This creates a basic 'Exit' button for leaving a window.
It destroys the window it is set upon.
=cut
sub window_exit_button {
my $self = shift;
my ($button_bar_ref,
$win_ref,
$use_image,
$balloon_ref,
) = @_;
if (!defined($use_image))
{
$use_image = 0;
}
my $b = $$button_bar_ref->Button(
-command=>
sub{
$$win_ref->destroy();
},
( run in 2.264 seconds using v1.01-cache-2.11-cpan-5a3173703d6 )