package Padre::Plugin::Cookbook::Recipe02::FBP::MainFB;
# This module was generated by Padre::Plugin::FormBuilder::PerlX.
# To change this module, edit the original .fbp file and regenerate.
# DO NOT MODIFY BY HAND!
use v5.10.1;
use strict;
use warnings;
# use diagnostics;
# use utf8;
# use autodie;
use Padre::Wx ();
use Padre::Wx::Role::Main ();
our $VERSION = '0.24';
use parent -norequire, qw(
Padre::Wx::Role::Main
Wx::Dialog
);
sub new {
my $class = shift;
my $parent = shift;
my $self = $class->SUPER::new(
$parent,
-1,
"Main",
Wx::wxDefaultPosition,
Wx::wxDefaultSize,
Wx::wxDEFAULT_DIALOG_STYLE,
);
my $heading = Wx::StaticText->new(
$self,
-1,
"heading is a public",
);
$heading->SetFont( Wx::Font->new( Wx::wxNORMAL_FONT->GetPointSize, 70, 90, 92, 0, "" ) );
my $m_staticline1 = Wx::StaticLine->new(
$self,
-1,
Wx::wxDefaultPosition,
Wx::wxDefaultSize,
Wx::wxLI_HORIZONTAL,
);
my $ttennis = Wx::CheckBox->new(
$self,
-1,
"TTennis",
Wx::wxDefaultPosition,
Wx::wxDefaultSize,
);
Wx::Event::EVT_CHECKBOX(
$self, $ttennis,
sub {
shift->ttennis_checked(@_);
},
);
my $ping = Wx::CheckBox->new(
$self,
-1,
"ping",
Wx::wxDefaultPosition,
Wx::wxDefaultSize,
);
$ping->Disable;
Wx::Event::EVT_CHECKBOX(
$self, $ping,
sub {
shift->ping_checked(@_);
},
);
my $pong = Wx::CheckBox->new(
$self,
-1,
"pong",
Wx::wxDefaultPosition,
Wx::wxDefaultSize,
);
$pong->Disable;
Wx::Event::EVT_CHECKBOX(
$self, $pong,
sub {
shift->pong_checked(@_);
},
);
my $m_staticText2 = Wx::StaticText->new(
$self,
-1,
"Static Text\nPadre Config DB\nuser defined\nattributes",
);
my $user_name = Wx::RadioBox->new(
$self, -1,
"User * Name",
Wx::wxDefaultPosition,
Wx::wxDefaultSize,
[ "nick",
"cpan",
"e-mail",
],
1,
Wx::wxRA_SPECIFY_COLS,
);
$user_name->SetSelection(0);
my $m_staticline2 = Wx::StaticLine->new(
$self,
-1,
Wx::wxDefaultPosition,
Wx::wxDefaultSize,
Wx::wxLI_HORIZONTAL,
);
my $name_label = Wx::StaticText->new(
$self,
-1,
"name_label public",
);
my $name_value = Wx::TextCtrl->new(
$self,
-1,
"",
Wx::wxDefaultPosition,
Wx::wxDefaultSize,
);
my $m_staticline3 = Wx::StaticLine->new(
$self,
-1,
Wx::wxDefaultPosition,
Wx::wxDefaultSize,
Wx::wxLI_HORIZONTAL,
);
my $m_staticText4 = Wx::StaticText->new(
$self,
-1,
"Choices:",
);
my $choices = Wx::Choice->new(
$self, -1,
Wx::wxDefaultPosition,
Wx::wxDefaultSize,
[ "CPL",
"CPL",
"BCPL",
"B",
"C",
"PL",
],
);
$choices->SetSelection(0);
my $m_staticline4 = Wx::StaticLine->new(
$self,
-1,
Wx::wxDefaultPosition,
Wx::wxDefaultSize,
Wx::wxLI_HORIZONTAL,
);
my $output = Wx::Button->new(
$self,
-1,
"Output",
);
Wx::Event::EVT_BUTTON(
$self, $output,
sub {
shift->output_clicked(@_);
},
);
my $update = Wx::Button->new(
$self,
-1,
"Update",
);
Wx::Event::EVT_BUTTON(
$self, $update,
sub {
shift->update_clicked(@_);
},
);
my $close_button = Wx::Button->new(
$self,
Wx::wxID_CANCEL,
"Close",
);
$close_button->SetDefault;
my $bSizer2 = Wx::BoxSizer->new(Wx::wxVERTICAL);
$bSizer2->Add( $heading, 0, Wx::wxALL, 5 );
my $fgSizer1 = Wx::FlexGridSizer->new( 0, 2, 0, 0 );
$fgSizer1->SetFlexibleDirection(Wx::wxBOTH);
$fgSizer1->SetNonFlexibleGrowMode(Wx::wxFLEX_GROWMODE_SPECIFIED);
$fgSizer1->Add( $ttennis, 0, Wx::wxALL, 5 );
$fgSizer1->Add( $ping, 0, Wx::wxALL, 5 );
$fgSizer1->Add( 0, 0, 1, Wx::wxEXPAND, 5 );
$fgSizer1->Add( $pong, 0, Wx::wxALL, 5 );
$fgSizer1->Add( $m_staticText2, 0, Wx::wxALL, 5 );
$fgSizer1->Add( $user_name, 0, Wx::wxALL, 5 );
my $bSizer3 = Wx::BoxSizer->new(Wx::wxHORIZONTAL);
$bSizer3->Add( $name_label, 0, Wx::wxALL, 5 );
$bSizer3->Add( $name_value, 1, Wx::wxALL, 5 );
my $fgSizer2 = Wx::FlexGridSizer->new( 0, 2, 0, 0 );
$fgSizer2->SetFlexibleDirection(Wx::wxBOTH);
$fgSizer2->SetNonFlexibleGrowMode(Wx::wxFLEX_GROWMODE_SPECIFIED);
$fgSizer2->Add( $m_staticText4, 0, Wx::wxALL, 5 );
$fgSizer2->Add( $choices, 0, Wx::wxALL, 5 );
my $bSizer4 = Wx::BoxSizer->new(Wx::wxHORIZONTAL);
$bSizer4->Add( $output, 0, Wx::wxALL, 5 );
$bSizer4->Add( $update, 0, Wx::wxALL, 5 );
$bSizer4->Add( $close_button, 0, Wx::wxALL, 5 );
my $bSizer1 = Wx::BoxSizer->new(Wx::wxVERTICAL);
$bSizer1->Add( $bSizer2, 0, Wx::wxEXPAND, 5 );
$bSizer1->Add( $m_staticline1, 0, Wx::wxEXPAND | Wx::wxALL, 5 );
$bSizer1->Add( $fgSizer1, 1, Wx::wxEXPAND, 5 );
$bSizer1->Add( $m_staticline2, 0, Wx::wxEXPAND | Wx::wxALL, 5 );
$bSizer1->Add( $bSizer3, 0, Wx::wxEXPAND, 5 );
$bSizer1->Add( $m_staticline3, 0, Wx::wxEXPAND | Wx::wxALL, 5 );
$bSizer1->Add( $fgSizer2, 0, Wx::wxEXPAND, 5 );
$bSizer1->Add( $m_staticline4, 0, Wx::wxEXPAND | Wx::wxALL, 5 );
$bSizer1->Add( $bSizer4, 0, Wx::wxEXPAND, 5 );
$self->SetSizer($bSizer1);
$self->Layout;
$bSizer1->Fit($self);
$self->{heading} = $heading->GetId;
$self->{ttennis} = $ttennis->GetId;
$self->{ping} = $ping->GetId;
$self->{pong} = $pong->GetId;
$self->{user_name} = $user_name->GetId;
$self->{name_label} = $name_label->GetId;
$self->{name_value} = $name_value->GetId;
$self->{choices} = $choices->GetId;
return $self;
}
=pod
=over 4
=item heading ()
Public Accessor heading Auto-generated.
=back
=cut
sub heading {
my $self = shift;
return Wx::Window::FindWindowById( $self->{heading} );
}
=pod
=over 4
=item ttennis ()
Public Accessor ttennis Auto-generated.
=back
=cut
sub ttennis {
my $self = shift;
return Wx::Window::FindWindowById( $self->{ttennis} );
}
=pod
=over 4
=item ping ()
Public Accessor ping Auto-generated.
=back
=cut
sub ping {
my $self = shift;
return Wx::Window::FindWindowById( $self->{ping} );
}
=pod
=over 4
=item pong ()
Public Accessor pong Auto-generated.
=back
=cut
sub pong {
my $self = shift;
return Wx::Window::FindWindowById( $self->{pong} );
}
=pod
=over 4
=item user_name ()
Public Accessor user_name Auto-generated.
=back
=cut
sub user_name {
my $self = shift;
return Wx::Window::FindWindowById( $self->{user_name} );
}
=pod
=over 4
=item name_label ()
Public Accessor name_label Auto-generated.
=back
=cut
sub name_label {
my $self = shift;
return Wx::Window::FindWindowById( $self->{name_label} );
}
=pod
=over 4
=item name_value ()
Public Accessor name_value Auto-generated.
=back
=cut
sub name_value {
my $self = shift;
return Wx::Window::FindWindowById( $self->{name_value} );
}
=pod
=over 4
=item choices ()
Public Accessor choices Auto-generated.
=back
=cut
sub choices {
my $self = shift;
return Wx::Window::FindWindowById( $self->{choices} );
}
=pod
=over 4
=item ttennis_checked ()
Event Handler for ttennis.OnCheckBox (Required). Auto-generated.
You must implement this Method in your calling class.
=back
=cut
sub ttennis_checked {
my $self = shift;
return $self->main->error('Handler method ttennis_checked for event ttennis.OnCheckBox not implemented');
}
=pod
=over 4
=item ping_checked ()
Event Handler for ping.OnCheckBox (Required). Auto-generated.
You must implement this Method in your calling class.
=back
=cut
sub ping_checked {
my $self = shift;
return $self->main->error('Handler method ping_checked for event ping.OnCheckBox not implemented');
}
=pod
=over 4
=item pong_checked ()
Event Handler for pong.OnCheckBox (Required). Auto-generated.
You must implement this Method in your calling class.
=back
=cut
sub pong_checked {
my $self = shift;
return $self->main->error('Handler method pong_checked for event pong.OnCheckBox not implemented');
}
=pod
=over 4
=item output_clicked ()
Event Handler for output.OnButtonClick (Required). Auto-generated.
You must implement this Method in your calling class.
=back
=cut
sub output_clicked {
my $self = shift;
return $self->main->error('Handler method output_clicked for event output.OnButtonClick not implemented');
}
=pod
=over 4
=item update_clicked ()
Event Handler for update.OnButtonClick (Required). Auto-generated.
You must implement this Method in your calling class.
=back
=cut
sub update_clicked {
my $self = shift;
return $self->main->error('Handler method update_clicked for event update.OnButtonClick not implemented');
}
1;
=pod
=over 4
=item new ()
Constructor. Auto-generated by Padre::Plugin::FormBuilder.
=back
=head1 AUTHOR
Adam Kennedy E<lt>adamk@cpan.orgE<gt>
=head1 SEE ALSO
L<Padre>
=head1 LICENSE AND COPYRIGHT
Copyright (c) 2008-2013 The Padre development team as listed in Padre.pm.
This module is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.
=cut