AAC-Pvoice
view release on metacpan or search on metacpan
lib/AAC/Pvoice/Panel.pm view on Meta::CPAN
$self->{totalrows} = 0;
$self->{lastrow} = 0;
$self->{currentpage} = 0;
$self->{unfinished} = 1;
$self->RoundCornerRadius(10);
my ($x, $y);
# to get the right dimensions for the items, we maximize the
# frame, show it, get the dimensions, and hide it again
if (ref($self->{parent}) =~ /Frame/)
{
if ($self->{parent}->IsMaximized)
{
($x, $y) = @{$self->{size}};
}
else
{
$self->{parent}->Maximize(1);
$self->{parent}->Show(1);
($x, $y) = ( $self->GetSize()->GetWidth(),
$self->GetSize()->GetHeight() );
$self->{parent}->Show(0);
}
}
else
{
# if our parent isn't a frame, we're not able to maximize
# it, so we just get the dimensions of the parent
($x, $y) = @{$self->{size}};
}
$self->{realx} = $x;
$self->{realy} = $y;
$self->xsize($x);
$self->ysize($y);
unless ($self->{disabletitle})
{
# to be able to calculate the useable y-size, we need to add the
t/001_load.t view on Meta::CPAN
use Test::More tests => 2;
use Wx qw(:everything);
BEGIN { use_ok( 'AAC::Pvoice' ); }
package MyApp;
use base 'Wx::App';
sub OnInit
{
my $frame = MyFrame->new();
return 1;
}
package MyFrame;
use base 'Wx::Frame';
sub new
{
my $class = shift;
my $self = $class->SUPER::new(undef, -1, 'Test');
my $panel = AAC::Pvoice::Panel->new ($self, -1);
( run in 1.323 second using v1.01-cache-2.11-cpan-39bf76dae61 )