1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138
|
#! perl
package main;
use strict;
package EB::Wx::Shell::PreferencesDialog;
use base qw(Wx::Dialog);
use strict;
# begin wxGlade: ::dependencies
use Wx::Locale gettext => '_T';
# end wxGlade
use Wx qw[
wxADJUST_MINSIZE
wxALIGN_CENTER_VERTICAL
wxALL
wxDEFAULT_DIALOG_STYLE
wxDefaultPosition
wxDefaultSize
wxEXPAND
wxHORIZONTAL
wxID_CANCEL
wxID_OK
wxLEFT
wxRIGHT
wxSP_ARROW_KEYS
wxTOP
wxVERTICAL
];
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: EB::Wx::Shell::PreferencesDialog::new
$style = wxDEFAULT_DIALOG_STYLE
unless defined $style;
$self = $self->SUPER::new( $parent, $id, $title, $pos, $size, $style, $name );
$self->{sz_prefs_inner_staticbox} = Wx::StaticBox->new($self, -1, _T("Voorkeuren") );
$self->{cx_repwin} = Wx::CheckBox->new($self, -1, _T("Rapporten in hetzelfde venster"), wxDefaultPosition, wxDefaultSize, );
$self->{cx_errorpopup} = Wx::CheckBox->new($self, -1, _T("Popup window voor foutboodschappen"), wxDefaultPosition, wxDefaultSize, );
$self->{cx_warnpopup} = Wx::CheckBox->new($self, -1, _T("Popup window voor waarschuwingen"), wxDefaultPosition, wxDefaultSize, );
$self->{cx_infopopup} = Wx::CheckBox->new($self, -1, _T("Popup window voor mededelingen"), wxDefaultPosition, wxDefaultSize, );
$self->{l_histlines} = Wx::StaticText->new($self, -1, _T("Aantal te bewaren regels invoer historie:"), wxDefaultPosition, wxDefaultSize, );
$self->{spin_histlines} = Wx::SpinCtrl->new($self, -1, "200", wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 99999, 200);
$self->{b_prefs_cancel} = Wx::Button->new($self, wxID_CANCEL, "");
$self->{b_prefs_ok} = Wx::Button->new($self, wxID_OK, "");
$self->__set_properties();
$self->__do_layout();
Wx::Event::EVT_BUTTON($self, $self->{b_prefs_cancel}->GetId, \&OnCancel);
Wx::Event::EVT_BUTTON($self, $self->{b_prefs_ok}->GetId, \&OnAccept);
# end wxGlade
return $self;
}
sub __set_properties {
my $self = shift;
# begin wxGlade: EB::Wx::Shell::PreferencesDialog::__set_properties
$self->SetTitle(_T("Voorkeursinstellingen"));
$self->{cx_errorpopup}->SetValue(1);
$self->{cx_warnpopup}->SetValue(1);
$self->{cx_infopopup}->SetValue(1);
$self->{b_prefs_ok}->SetDefault();
# end wxGlade
}
sub __do_layout {
my $self = shift;
# begin wxGlade: EB::Wx::Shell::PreferencesDialog::__do_layout
$self->{sz_prefs_outer} = Wx::BoxSizer->new(wxVERTICAL);
$self->{sz_prefs_buttons} = Wx::BoxSizer->new(wxHORIZONTAL);
$self->{sz_prefs_inner}= Wx::StaticBoxSizer->new($self->{sz_prefs_inner_staticbox}, wxVERTICAL);
$self->{sz_prefs} = Wx::BoxSizer->new(wxVERTICAL);
$self->{sz_histlines} = Wx::BoxSizer->new(wxHORIZONTAL);
$self->{sz_prefs}->Add($self->{cx_repwin}, 0, wxADJUST_MINSIZE, 0);
$self->{sz_prefs}->Add($self->{cx_errorpopup}, 0, wxADJUST_MINSIZE, 0);
$self->{sz_prefs}->Add($self->{cx_warnpopup}, 0, wxADJUST_MINSIZE, 0);
$self->{sz_prefs}->Add($self->{cx_infopopup}, 0, wxADJUST_MINSIZE, 0);
$self->{sz_histlines}->Add($self->{l_histlines}, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL|wxADJUST_MINSIZE, 5);
$self->{sz_histlines}->Add($self->{spin_histlines}, 0, wxALIGN_CENTER_VERTICAL|wxADJUST_MINSIZE, 0);
$self->{sz_histlines}->Add(0, 0, 1, wxEXPAND|wxADJUST_MINSIZE, 0);
$self->{sz_prefs}->Add($self->{sz_histlines}, 1, wxEXPAND, 0);
$self->{sz_prefs}->Add(1, 5, 0, wxADJUST_MINSIZE, 0);
$self->{sz_prefs_inner}->Add($self->{sz_prefs}, 1, wxLEFT|wxRIGHT|wxTOP|wxEXPAND, 5);
$self->{sz_prefs_outer}->Add($self->{sz_prefs_inner}, 1, wxLEFT|wxRIGHT|wxTOP|wxEXPAND, 5);
$self->{sz_prefs_buttons}->Add(5, 1, 1, wxEXPAND|wxADJUST_MINSIZE, 0);
$self->{sz_prefs_buttons}->Add($self->{b_prefs_cancel}, 0, wxADJUST_MINSIZE, 0);
$self->{sz_prefs_buttons}->Add($self->{b_prefs_ok}, 0, wxLEFT|wxADJUST_MINSIZE, 5);
$self->{sz_prefs_outer}->Add($self->{sz_prefs_buttons}, 0, wxALL|wxEXPAND, 5);
$self->SetSizer($self->{sz_prefs_outer});
$self->{sz_prefs_outer}->Fit($self);
$self->Layout();
# end wxGlade
}
sub OnCancel {
my ($self, $event) = @_;
# wxGlade: EB::Wx::Shell::PreferencesDialog::OnCancel <event_handler>
$event->Skip;
# end wxGlade
}
sub OnAccept {
my ($self, $event) = @_;
# wxGlade: EB::Wx::Shell::PreferencesDialog::OnAccept <event_handler>
$event->Skip;
# end wxGlade
}
# end of class EB::Wx::Shell::PreferencesDialog
1;
|