File: 11_twostage.t

package info (click to toggle)
libwx-perl 0.9702-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 3,240 kB
  • ctags: 1,812
  • sloc: cpp: 8,988; perl: 6,366; makefile: 38; ansic: 1
file content (36 lines) | stat: -rwxr-xr-x 690 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/usr/bin/perl -w

use strict;
use Wx;
use lib './t';
use Tests_Helper 'test_frame';

package MyFrame;

use base 'Wx::Frame';
use Test::More 'tests' => 2;

sub new {
my $this = shift->SUPER::new( undef, -1, 'a' );

my $panel2 = Wx::Panel->new( $this, -1 );
like( "$panel2", qr/^Wx::Panel=HASH/ );

my $panel1 = Wx::Panel->new;
like( "$panel1", qr/^Wx::Panel=HASH/ );

$panel1->Create( $this, -1 );
Wx::Event::EVT_IDLE( $this,
                     sub { $this->Destroy } );
$this->Destroy if ( Wx::wxMSW || Wx::wxGTK || Wx::wxMOTIF )
               && Wx::wxVERSION() < 2.005;
};

package main;

test_frame( 'MyFrame' );
Wx::wxTheApp()->MainLoop();

# local variables:
# mode: cperl
# end: