#!/usr/bin/perl -w -- 
#
# generated by wxGlade
#
# To get wxPerl visit http://www.wxperl.it
#

use Wx;
use strict;

# begin wxGlade: dependencies
# end wxGlade

# begin wxGlade: extracode
# end wxGlade

package MyFrame;

use Wx qw[:everything];
use base qw(Wx::Frame);
use strict;

sub new {
    my( $self, $parent, $id, $title, $pos, $size, $style, $name ) = @_;
    $parent = undef              unless defined $parent;
    $id     = -1                 unless defined $id;
    $title  = ""                 unless defined $title;
    $pos    = wxDefaultPosition  unless defined $pos;
    $size   = wxDefaultSize      unless defined $size;
    $name   = ""                 unless defined $name;

    # begin wxGlade: MyFrame::new
    $style = wxDEFAULT_FRAME_STYLE
        unless defined $style;

    $self = $self->SUPER::new( $parent, $id, $title, $pos, $size, $style, $name );
    $self->SetSize(Wx::Size->new(400, 300));
    $self->SetTitle("frame");
    
    $self->{panel_1} = Wx::Panel->new($self, wxID_ANY);
    
    $self->{sizer_1} = Wx::BoxSizer->new(wxVERTICAL);
    
    $self->{button_1} = Wx::Button->new($self->{panel_1}, wxID_ANY, "button_1");
    $self->{sizer_1}->Add($self->{button_1}, 0, 0, 0);
    
    $self->{grid_1} = Wx::Grid->new($self->{panel_1}, wxID_ANY);
    $self->{grid_1}->CreateGrid(10, 4);
    $self->{grid_1}->SetSelectionMode(wxGridSelectRows);
    $self->{sizer_1}->Add($self->{grid_1}, 1, wxEXPAND, 0);
    
    $self->{panel_1}->SetSizer($self->{sizer_1});
    
    $self->Layout();
    Wx::Event::EVT_LEFT_DOWN($self, $self->{panel_1}->GetId, $self->can('on_left_down_panel'));
    Wx::Event::EVT_BUTTON($self, $self->{button_1}->GetId, $self->can('on_button'));
    Wx::Event::EVT_LEFT_DOWN($self, $self->{button_1}->GetId, $self->can('on_left_down'));
    Wx::Event::EVT_MOUSE_EVENTS($self, $self->{button_1}->GetId, $self->can('on_mouse_events'));
    Wx::Event::EVT_GRID_CMD_CELL_CHANGED($self, $self->{grid_1}->GetId, $self->can('on_grid_cmd_cell_changed'));
    Wx::Event::EVT_TEXT_ENTER($self, $self->{grid_1}->GetId, $self->can('on_grid_text_enter'));
    Wx::Event::EVT_LEFT_DOWN($self, $self->GetId, $self->can('on_left_down_frame'));

    # end wxGlade
    return $self;

}


sub on_left_down_panel {
    my ($self, $event) = @_;
    # wxGlade: MyFrame::on_left_down_panel <event_handler>
    warn "Event handler (on_left_down_panel) not implemented";
    $event->Skip;
    # end wxGlade
}


sub on_button {
    my ($self, $event) = @_;
    # wxGlade: MyFrame::on_button <event_handler>
    warn "Event handler (on_button) not implemented";
    $event->Skip;
    # end wxGlade
}


sub on_left_down {
    my ($self, $event) = @_;
    # wxGlade: MyFrame::on_left_down <event_handler>
    warn "Event handler (on_left_down) not implemented";
    $event->Skip;
    # end wxGlade
}


sub on_mouse_events {
    my ($self, $event) = @_;
    # wxGlade: MyFrame::on_mouse_events <event_handler>
    warn "Event handler (on_mouse_events) not implemented";
    $event->Skip;
    # end wxGlade
}


sub on_grid_cmd_cell_changed {
    my ($self, $event) = @_;
    # wxGlade: MyFrame::on_grid_cmd_cell_changed <event_handler>
    warn "Event handler (on_grid_cmd_cell_changed) not implemented";
    $event->Skip;
    # end wxGlade
}


sub on_grid_text_enter {
    my ($self, $event) = @_;
    # wxGlade: MyFrame::on_grid_text_enter <event_handler>
    warn "Event handler (on_grid_text_enter) not implemented";
    $event->Skip;
    # end wxGlade
}


sub on_left_down_frame {
    my ($self, $event) = @_;
    # wxGlade: MyFrame::on_left_down_frame <event_handler>
    warn "Event handler (on_left_down_frame) not implemented";
    $event->Skip;
    # end wxGlade
}


# end of class MyFrame

1;

package MyApp;

use base qw(Wx::App);
use strict;

sub OnInit {
    my( $self ) = shift;

    Wx::InitAllImageHandlers();

    my $frame = MyFrame->new();

    $self->SetTopWindow($frame);
    $frame->Show(1);

    return 1;
}
# end of class MyApp

package main;

my $app = MyApp->new();
$app->MainLoop();
