AAC-Pvoice
view release on metacpan or search on metacpan
lib/AAC/Pvoice/Dialog.pm view on Meta::CPAN
package AAC::Pvoice::Dialog;
use strict;
use warnings;
our $VERSION = sprintf("%d.%02d", q$Revision: 1.1 $=~/(\d+)\.(\d+)/);
use Wx qw(:everything);
use Wx::Event qw(EVT_CLOSE);
use base 'Wx::Dialog';
sub new
{
my $class = shift;
my $self = $class->SUPER::new(@_);
my ($x, $y) = ($self->GetClientSize->GetWidth,
$self->GetClientSize->GetHeight);
$self->{margin} = 10;
$self->{ITEMSPACING} = 4;
$self->{selectionborder} = 3;
$self->{backgroundcolour} = Wx::Colour->new(220,220,220);
$self->SetBackgroundColour(wxWHITE);
$self->{panel} = AAC::Pvoice::Panel->new( $self, # parent
-1, # id
[$self->{margin},
$self->{margin}], # position
[$x-2*$self->{margin},
$y-2*$self->{margin}],# size
wxNO_3D|wxWANTS_CHARS, # style
1, # disabletextrow
$self->{ITEMSPACING}, # rowspacing
$self->{selectionborder}, # selectionborderwidth
1); # disabletitle
$self->{panel}->BackgroundColour($self->{backgroundcolour});
$self->WarpPointer($self->{margin}+1,$self->{margin}+1);
$self->SetFocus();
EVT_CLOSE($self, \&OnClose);
return $self;
}
sub Append
{
my $self = shift;
$self->{panel}->Append(@_);
}
sub OnClose
{
my $self = shift;
$self->Destroy();
}
sub Show
{
my $self = shift;
my $bool = shift;
$self->{panel}->Finalize();
$self->SUPER::Show($bool);
}
sub ShowModal
{
( run in 1.492 second using v1.01-cache-2.11-cpan-f56aa216473 )