| 1 | package Padre::Plugin::Cookbook::Recipe04::FBP::AboutFB; | ||
| 2 | |||
| 3 | # This module was generated by Padre::Plugin::FormBuilder::PerlX. | ||
| 4 | # To change this module, edit the original .fbp file and regenerate. | ||
| 5 | # DO NOT MODIFY BY HAND! | ||
| 6 | |||
| 7 | 2 | ▶ | use v5.10.1; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 8 | 2 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 9 | 2 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 10 | # use diagnostics; | ||
| 11 | # use utf8; | ||
| 12 | # use autodie; | ||
| 13 | 0 | ▶ | use Padre::Wx (); |
|
Subroutine
BEGIN: called CC=1 SCAR=2.6
| |||
| 14 | use Padre::Wx::Role::Main (); | ||
| 15 | |||
| 16 | our $VERSION = '0.24'; | ||
| 17 | use parent -norequire, qw( | ||
| 18 | Padre::Wx::Role::Main | ||
| 19 | Wx::Dialog | ||
| 20 | ); | ||
| 21 | |||
| 22 | sub new { | ||
| 23 | my $class = shift; | ||
| 24 | my $parent = shift; | ||
| 25 | |||
| 26 | my $self = $class->SUPER::new( | ||
| 27 | $parent, | ||
| 28 | -1, | ||
| 29 | "About", | ||
| 30 | Wx::wxDefaultPosition, | ||
| 31 | Wx::wxDefaultSize, | ||
| 32 | Wx::wxDEFAULT_DIALOG_STYLE, | ||
| 33 | ); | ||
| 34 | |||
| 35 | my $package_name = Wx::StaticText->new( | ||
| 36 | $self, | ||
| 37 | -1, | ||
| 38 | "Padre Plug-in", | ||
| 39 | ); | ||
| 40 | $package_name->SetFont( Wx::Font->new( Wx::wxNORMAL_FONT->GetPointSize, 70, 90, 92, 0, "" ) ); | ||
| 41 | |||
| 42 | my $m_staticline1 = Wx::StaticLine->new( | ||
| 43 | $self, | ||
| 44 | -1, | ||
| 45 | Wx::wxDefaultPosition, | ||
| 46 | Wx::wxDefaultSize, | ||
| 47 | Wx::wxLI_HORIZONTAL, | ||
| 48 | ); | ||
| 49 | |||
| 50 | my $name_version = Wx::StaticText->new( | ||
| 51 | $self, | ||
| 52 | -1, | ||
| 53 | "name_version", | ||
| 54 | ); | ||
| 55 | $name_version->SetFont( Wx::Font->new( 14, 70, 90, 90, 0, "" ) ); | ||
| 56 | |||
| 57 | my $developed_by = Wx::StaticText->new( | ||
| 58 | $self, | ||
| 59 | -1, | ||
| 60 | "developed_by", | ||
| 61 | ); | ||
| 62 | |||
| 63 | my $m_staticline2 = Wx::StaticLine->new( | ||
| 64 | $self, | ||
| 65 | -1, | ||
| 66 | Wx::wxDefaultPosition, | ||
| 67 | Wx::wxDefaultSize, | ||
| 68 | Wx::wxLI_HORIZONTAL, | ||
| 69 | ); | ||
| 70 | |||
| 71 | my $credits = Wx::Button->new( | ||
| 72 | $self, | ||
| 73 | -1, | ||
| 74 | "Credits", | ||
| 75 | ); | ||
| 76 | |||
| 77 | Wx::Event::EVT_BUTTON( | ||
| 78 | $self, $credits, | ||
| 79 | sub { | ||
| 80 | shift->credits_clicked(@_); | ||
| 81 | }, | ||
| 82 | ); | ||
| 83 | |||
| 84 | my $licence = Wx::Button->new( | ||
| 85 | $self, | ||
| 86 | -1, | ||
| 87 | "Licence", | ||
| 88 | ); | ||
| 89 | |||
| 90 | Wx::Event::EVT_BUTTON( | ||
| 91 | $self, $licence, | ||
| 92 | sub { | ||
| 93 | shift->licence_clicked(@_); | ||
| 94 | }, | ||
| 95 | ); | ||
| 96 | |||
| 97 | my $Close = Wx::Button->new( | ||
| 98 | $self, | ||
| 99 | Wx::wxID_CANCEL, | ||
| 100 | "Close", | ||
| 101 | ); | ||
| 102 | $Close->SetDefault; | ||
| 103 | |||
| 104 | my $m_staticline3 = Wx::StaticLine->new( | ||
| 105 | $self, | ||
| 106 | -1, | ||
| 107 | Wx::wxDefaultPosition, | ||
| 108 | Wx::wxDefaultSize, | ||
| 109 | Wx::wxLI_HORIZONTAL, | ||
| 110 | ); | ||
| 111 | |||
| 112 | my $bSizer2 = Wx::BoxSizer->new(Wx::wxHORIZONTAL); | ||
| 113 | $bSizer2->Add( $package_name, 1, Wx::wxALL, 5 ); | ||
| 114 | |||
| 115 | my $bSizer3 = Wx::BoxSizer->new(Wx::wxVERTICAL); | ||
| 116 | $bSizer3->Add( $name_version, 0, Wx::wxALIGN_CENTER | Wx::wxALL, 5 ); | ||
| 117 | $bSizer3->Add( $developed_by, 0, Wx::wxALIGN_CENTER | Wx::wxALL, 5 ); | ||
| 118 | |||
| 119 | my $bSizer4 = Wx::BoxSizer->new(Wx::wxHORIZONTAL); | ||
| 120 | $bSizer4->Add( $credits, 0, Wx::wxALL, 3 ); | ||
| 121 | $bSizer4->Add( $licence, 0, Wx::wxALL, 3 ); | ||
| 122 | $bSizer4->Add( $Close, 0, Wx::wxALL, 3 ); | ||
| 123 | |||
| 124 | my $bSizer1 = Wx::BoxSizer->new(Wx::wxVERTICAL); | ||
| 125 | $bSizer1->Add( $bSizer2, 0, Wx::wxEXPAND, 5 ); | ||
| 126 | $bSizer1->Add( $m_staticline1, 0, Wx::wxEXPAND | Wx::wxALL, 3 ); | ||
| 127 | $bSizer1->Add( $bSizer3, 1, Wx::wxEXPAND, 5 ); | ||
| 128 | $bSizer1->Add( $m_staticline2, 0, Wx::wxEXPAND | Wx::wxALL, 3 ); | ||
| 129 | $bSizer1->Add( $bSizer4, 0, Wx::wxEXPAND, 5 ); | ||
| 130 | $bSizer1->Add( $m_staticline3, 0, Wx::wxEXPAND | Wx::wxALL, 3 ); | ||
| 131 | |||
| 132 | $self->SetSizer($bSizer1); | ||
| 133 | $self->Layout; | ||
| 134 | $bSizer1->Fit($self); | ||
| 135 | |||
| 136 | $self->{package_name} = $package_name->GetId; | ||
| 137 | $self->{name_version} = $name_version->GetId; | ||
| 138 | $self->{developed_by} = $developed_by->GetId; | ||
| 139 | |||
| 140 | return $self; | ||
| 141 | } | ||
| 142 | |||
| 143 | =pod | ||
| 144 | |||
| 145 | =over 4 | ||
| 146 | |||
| 147 | =item package_name () | ||
| 148 | |||
| 149 | Public Accessor package_name Auto-generated. | ||
| 150 | |||
| 151 | =back | ||
| 152 | |||
| 153 | =cut | ||
| 154 | |||
| 155 | sub package_name { | ||
| 156 | my $self = shift; | ||
| 157 | return Wx::Window::FindWindowById( $self->{package_name} ); | ||
| 158 | } | ||
| 159 | |||
| 160 | =pod | ||
| 161 | |||
| 162 | =over 4 | ||
| 163 | |||
| 164 | =item name_version () | ||
| 165 | |||
| 166 | Public Accessor name_version Auto-generated. | ||
| 167 | |||
| 168 | =back | ||
| 169 | |||
| 170 | =cut | ||
| 171 | |||
| 172 | sub name_version { | ||
| 173 | my $self = shift; | ||
| 174 | return Wx::Window::FindWindowById( $self->{name_version} ); | ||
| 175 | } | ||
| 176 | |||
| 177 | =pod | ||
| 178 | |||
| 179 | =over 4 | ||
| 180 | |||
| 181 | =item developed_by () | ||
| 182 | |||
| 183 | Public Accessor developed_by Auto-generated. | ||
| 184 | |||
| 185 | =back | ||
| 186 | |||
| 187 | =cut | ||
| 188 | |||
| 189 | sub developed_by { | ||
| 190 | my $self = shift; | ||
| 191 | return Wx::Window::FindWindowById( $self->{developed_by} ); | ||
| 192 | } | ||
| 193 | |||
| 194 | =pod | ||
| 195 | |||
| 196 | =over 4 | ||
| 197 | |||
| 198 | =item credits_clicked () | ||
| 199 | |||
| 200 | Event Handler for credits.OnButtonClick (Required). Auto-generated. | ||
| 201 | You must implement this Method in your calling class. | ||
| 202 | |||
| 203 | =back | ||
| 204 | |||
| 205 | =cut | ||
| 206 | |||
| 207 | sub credits_clicked { | ||
| 208 | my $self = shift; | ||
| 209 | return $self->main->error('Handler method credits_clicked for event credits.OnButtonClick not implemented'); | ||
| 210 | } | ||
| 211 | |||
| 212 | =pod | ||
| 213 | |||
| 214 | =over 4 | ||
| 215 | |||
| 216 | =item licence_clicked () | ||
| 217 | |||
| 218 | Event Handler for licence.OnButtonClick (Required). Auto-generated. | ||
| 219 | You must implement this Method in your calling class. | ||
| 220 | |||
| 221 | =back | ||
| 222 | |||
| 223 | =cut | ||
| 224 | |||
| 225 | sub licence_clicked { | ||
| 226 | my $self = shift; | ||
| 227 | return $self->main->error('Handler method licence_clicked for event licence.OnButtonClick not implemented'); | ||
| 228 | } | ||
| 229 | |||
| 230 | 1; | ||
| 231 | |||
| 232 | =pod | ||
| 233 | |||
| 234 | =over 4 | ||
| 235 | |||
| 236 | =item new () | ||
| 237 | |||
| 238 | Constructor. Auto-generated by Padre::Plugin::FormBuilder. | ||
| 239 | |||
| 240 | =back | ||
| 241 | |||
| 242 | =head1 AUTHOR | ||
| 243 | |||
| 244 | Adam Kennedy E<lt>adamk@cpan.orgE<gt> | ||
| 245 | |||
| 246 | =head1 SEE ALSO | ||
| 247 | |||
| 248 | L<Padre> | ||
| 249 | |||
| 250 | =head1 LICENSE AND COPYRIGHT | ||
| 251 | |||
| 252 | Copyright (c) 2008-2013 The Padre development team as listed in Padre.pm. | ||
| 253 | |||
| 254 | This module is free software; you can redistribute it and/or | ||
| 255 | modify it under the same terms as Perl itself. | ||
| 256 | |||
| 257 | =cut | ||
| 258 | |||
| 259 | |||