#!/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");
    
    

    # Menu Bar

    $self->{frame_menubar} = Wx::MenuBar->new();
    my $wxglade_tmp_menu;
    $wxglade_tmp_menu = Wx::Menu->new();
    $self->{item1} = $wxglade_tmp_menu->Append(wxID_ANY, "My Menu Item 1", "");
    $wxglade_tmp_menu->Append(wxID_ANY, "My Menu Item 1", "without attribute name");
    $self->{frame_menubar}->Append($wxglade_tmp_menu, "Menu 1");
    $self->SetMenuBar($self->{frame_menubar});
    
    # Menu Bar end

    
    
    # Tool Bar
    $self->{frame_toolbar} = Wx::ToolBar->new($self, -1);
    $self->{frame_toolbar}->AddTool(wxID_ANY, "My Tool", Wx::Bitmap->new("..\\..\\icons\\button.png", wxBITMAP_TYPE_ANY), wxNullBitmap, wxITEM_NORMAL, "", "");
    $self->SetToolBar($self->{frame_toolbar});
    $self->{frame_toolbar}->Realize();
    # Tool Bar end
    
    $self->{sizer_1} = Wx::BoxSizer->new(wxVERTICAL);
    
    $self->{sizer_1}->Add(0, 0, 0, 0, 0);
    
    $self->SetSizer($self->{sizer_1});
    
    $self->Layout();
    Wx::Event::EVT_MENU($self, $self->{item1}->GetId, $self->can('on_menu_item1'));
    Wx::Event::EVT_MENU($self, wxID_ANY, $self->can('on_menu_item2'));

    # end wxGlade
    return $self;

}


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


sub on_menu_item2 {
    my ($self, $event) = @_;
    # wxGlade: MyFrame::on_menu_item2 <event_handler>
    warn "Event handler (on_menu_item2) 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();
