| 1 | package Padre::Plugin::Moose::FBP::Preferences; | ||
| 2 | |||
| 3 | ## no critic | ||
| 4 | |||
| 5 | # This module was generated by Padre::Plugin::FormBuilder::Perl. | ||
| 6 | # To change this module edit the original .fbp file and regenerate. | ||
| 7 | # DO NOT MODIFY THIS FILE BY HAND! | ||
| 8 | |||
| 9 | use 5.008005; | ||
| 10 | use utf8; | ||
| 11 | use strict; | ||
| 12 | use warnings; | ||
| 13 | use Padre::Wx (); | ||
| 14 | use Padre::Wx::Role::Main (); | ||
| 15 | |||
| 16 | our $VERSION = '0.21'; | ||
| 17 | our @ISA = 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 | Wx::gettext("Preferences"), | ||
| 30 | Wx::DefaultPosition, | ||
| 31 | [ 247, 204 ], | ||
| 32 | Wx::DEFAULT_DIALOG_STYLE, | ||
| 33 | ); | ||
| 34 | |||
| 35 | my $options_labels = Wx::StaticText->new( | ||
| 36 | $self, | ||
| 37 | -1, | ||
| 38 | Wx::gettext("Code Generation Options:"), | ||
| 39 | ); | ||
| 40 | $options_labels->SetFont( Wx::Font->new( Wx::NORMAL_FONT->GetPointSize, 70, 90, 92, 0, "" ) ); | ||
| 41 | |||
| 42 | $self->{generated_code_label} = Wx::StaticText->new( | ||
| 43 | $self, | ||
| 44 | -1, | ||
| 45 | Wx::gettext("Type:"), | ||
| 46 | ); | ||
| 47 | |||
| 48 | $self->{generated_code_combo} = Wx::ComboBox->new( | ||
| 49 | $self, -1, "Moose", | ||
| 50 | Wx::DefaultPosition, | ||
| 51 | Wx::DefaultSize, | ||
| 52 | [ "Moose", | ||
| 53 | "Mouse", | ||
| 54 | "MooseX::Declare", | ||
| 55 | ], | ||
| 56 | Wx::CB_READONLY, | ||
| 57 | ); | ||
| 58 | |||
| 59 | $self->{namespace_autoclean_checkbox} = Wx::CheckBox->new( | ||
| 60 | $self, | ||
| 61 | -1, | ||
| 62 | Wx::gettext("Use namespace::autoclean?"), | ||
| 63 | Wx::DefaultPosition, | ||
| 64 | Wx::DefaultSize, | ||
| 65 | ); | ||
| 66 | |||
| 67 | $self->{comments_checkbox} = Wx::CheckBox->new( | ||
| 68 | $self, | ||
| 69 | -1, | ||
| 70 | Wx::gettext("Generate Comments?"), | ||
| 71 | Wx::DefaultPosition, | ||
| 72 | Wx::DefaultSize, | ||
| 73 | ); | ||
| 74 | |||
| 75 | $self->{sample_code_checkbox} = Wx::CheckBox->new( | ||
| 76 | $self, | ||
| 77 | -1, | ||
| 78 | Wx::gettext("Generate Sample code?"), | ||
| 79 | Wx::DefaultPosition, | ||
| 80 | Wx::DefaultSize, | ||
| 81 | ); | ||
| 82 | |||
| 83 | $self->{static_line} = Wx::StaticLine->new( | ||
| 84 | $self, | ||
| 85 | -1, | ||
| 86 | Wx::DefaultPosition, | ||
| 87 | Wx::DefaultSize, | ||
| 88 | Wx::LI_HORIZONTAL, | ||
| 89 | ); | ||
| 90 | |||
| 91 | $self->{ok_button} = Wx::Button->new( | ||
| 92 | $self, | ||
| 93 | Wx::ID_OK, | ||
| 94 | Wx::gettext("&OK"), | ||
| 95 | Wx::DefaultPosition, | ||
| 96 | Wx::DefaultSize, | ||
| 97 | ); | ||
| 98 | |||
| 99 | $self->{cancel_button} = Wx::Button->new( | ||
| 100 | $self, | ||
| 101 | Wx::ID_CANCEL, | ||
| 102 | Wx::gettext("&Cancel"), | ||
| 103 | Wx::DefaultPosition, | ||
| 104 | Wx::DefaultSize, | ||
| 105 | ); | ||
| 106 | |||
| 107 | my $generated_code_sizer = Wx::BoxSizer->new(Wx::HORIZONTAL); | ||
| 108 | $generated_code_sizer->Add( $self->{generated_code_label}, 0, Wx::ALIGN_CENTER_VERTICAL | Wx::ALL, 5 ); | ||
| 109 | $generated_code_sizer->Add( $self->{generated_code_combo}, 0, Wx::ALL, 5 ); | ||
| 110 | |||
| 111 | my $button_sizer = Wx::BoxSizer->new(Wx::HORIZONTAL); | ||
| 112 | $button_sizer->Add( 0, 0, 1, Wx::EXPAND, 5 ); | ||
| 113 | $button_sizer->Add( $self->{ok_button}, 0, Wx::ALL, 5 ); | ||
| 114 | $button_sizer->Add( $self->{cancel_button}, 0, Wx::ALL, 5 ); | ||
| 115 | |||
| 116 | my $sizer = Wx::BoxSizer->new(Wx::VERTICAL); | ||
| 117 | $sizer->Add( $options_labels, 0, Wx::EXPAND | Wx::LEFT | Wx::RIGHT | Wx::TOP, 5 ); | ||
| 118 | $sizer->Add( $generated_code_sizer, 0, Wx::EXPAND, 5 ); | ||
| 119 | $sizer->Add( $self->{namespace_autoclean_checkbox}, 0, Wx::ALL, 5 ); | ||
| 120 | $sizer->Add( $self->{comments_checkbox}, 0, Wx::ALIGN_CENTER_VERTICAL | Wx::ALL | Wx::EXPAND, 5 ); | ||
| 121 | $sizer->Add( $self->{sample_code_checkbox}, 0, Wx::ALIGN_CENTER_VERTICAL | Wx::ALL | Wx::EXPAND, 5 ); | ||
| 122 | $sizer->Add( $self->{static_line}, 0, Wx::EXPAND | Wx::ALL, 5 ); | ||
| 123 | $sizer->Add( $button_sizer, 0, Wx::EXPAND, 5 ); | ||
| 124 | |||
| 125 | $self->SetSizer($sizer); | ||
| 126 | $self->Layout; | ||
| 127 | |||
| 128 | return $self; | ||
| 129 | } | ||
| 130 | |||
| 131 | 1; | ||
| 132 | |||
| 133 | # Copyright 2008-2012 The Padre development team as listed in Padre.pm. | ||
| 134 | # LICENSE | ||
| 135 | # This program is free software; you can redistribute it and/or | ||
| 136 | # modify it under the same terms as Perl 5 itself. | ||
| 137 |