App-Music-ChordPro
view release on metacpan or search on metacpan
lib/ChordPro/Wx/RenderDialog_wxg.pm view on Meta::CPAN
# generated by wxGlade 1.1.1 on Mon Mar 16 09:12:56 2026
#
# To get wxPerl visit http://www.wxperl.it
#
use Wx;
use strict;
# begin wxGlade: dependencies
# end wxGlade
# begin wxGlade: extracode
# end wxGlade
package ChordPro::Wx::RenderDialog_wxg;
use Wx qw[:everything];
use base qw(Wx::Dialog);
use strict;
use Wx::Locale gettext => '_T';
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: ChordPro::Wx::RenderDialog_wxg::new
use ChordPro::Wx::Utils;
$style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER
unless defined $style;
$self = $self->SUPER::new( $parent, $id, $title, $pos, $size, $style, $name );
$self->SetTitle(_T("Preview Tasks"));
$self->{sz_prefs_outer} = Wx::BoxSizer->new(wxVERTICAL);
my $label_3 = Wx::StaticText->new($self, wxID_ANY, _T("Preview Tasks"), wxDefaultPosition, wxDefaultSize, wxALIGN_CENTER_HORIZONTAL);
$label_3->SetForegroundColour(Wx::Colour->new(0, 104, 217));
$label_3->SetFont(Wx::Font->new(18, wxDEFAULT, wxNORMAL, wxNORMAL, 0, ""));
$self->{sz_prefs_outer}->Add($label_3, 0, wxALL|wxEXPAND, 5);
$self->{sz_prefs_inner} = Wx::BoxSizer->new(wxVERTICAL);
$self->{sz_prefs_outer}->Add($self->{sz_prefs_inner}, 0, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5);
$self->{sizer_2} = Wx::GridBagSizer->new(5, 5);
$self->{sz_prefs_inner}->Add($self->{sizer_2}, 1, wxEXPAND, 5);
my $label_1 = Wx::StaticText->new($self, wxID_ANY, _T("Tasks"));
$self->{sizer_2}->Add($label_1, Wx::GBPosition->new(0, 0), Wx::GBSpan->new(1, 1), wxLEFT|wxTOP, 5);
$self->{sizer_1} = Wx::BoxSizer->new(wxVERTICAL);
$self->{sizer_2}->Add($self->{sizer_1}, Wx::GBPosition->new(0, 1), Wx::GBSpan->new(1, 1), wxEXPAND|wxTOP, 5);
$self->{cb_task_no_diagrams} = Wx::CheckBox->new($self, wxID_ANY, _T("Suppress the chord diagrams"));
$self->{cb_task_no_diagrams}->SetToolTipString(_T("Do not include the chord diagrams"));
$self->{sizer_1}->Add($self->{cb_task_no_diagrams}, 0, 0, 0);
$self->{cb_task_lyrics_only} = Wx::CheckBox->new($self, wxID_ANY, _T("Only lyrics (no chords, ABC, LilyPond, ...)"));
$self->{cb_task_lyrics_only}->SetToolTipString(_T("Show only the lyrics of the song"));
$self->{sizer_1}->Add($self->{cb_task_lyrics_only}, 0, 0, 0);
$self->{cb_task_decapo} = Wx::CheckBox->new($self, wxID_ANY, _T("Eliminate the capo settings"));
$self->{cb_task_decapo}->SetToolTipString(_T("Show the chords as they sound, eliminating the need for a capo setting"));
$self->{sizer_1}->Add($self->{cb_task_decapo}, 0, 0, 0);
$self->{l_customtasks} = Wx::StaticText->new($self, wxID_ANY, _T("Custom"));
$self->{l_customtasks}->Show(0);
$self->{sizer_2}->Add($self->{l_customtasks}, Wx::GBPosition->new(1, 0), Wx::GBSpan->new(1, 1), wxLEFT, 5);
$self->{sz_customtasks} = Wx::BoxSizer->new(wxVERTICAL);
$self->{sizer_2}->Add($self->{sz_customtasks}, Wx::GBPosition->new(1, 1), Wx::GBSpan->new(1, 1), wxEXPAND, 0);
$self->{sz_customtasks}->Add(0, 0, 0, 0, 0);
my $static_line_5 = Wx::StaticLine->new($self, wxID_ANY);
$self->{sizer_2}->Add($static_line_5, Wx::GBPosition->new(2, 0), Wx::GBSpan->new(1, 2), wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5);
$self->{cb_xpose} = Wx::CheckBox->new($self, wxID_ANY, _T("Transpose"));
$self->{sizer_2}->Add($self->{cb_xpose}, Wx::GBPosition->new(3, 0), Wx::GBSpan->new(1, 1), wxALIGN_CENTER_VERTICAL|wxEXPAND, 0);
$self->{sz_xpose} = Wx::BoxSizer->new(wxHORIZONTAL);
$self->{sizer_2}->Add($self->{sz_xpose}, Wx::GBPosition->new(3, 1), Wx::GBSpan->new(1, 1), wxEXPAND, 5);
$self->{sp_xpose} = Wx::SpinCtrl->new($self, wxID_ANY, "0", wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 12, 0);
$self->{sz_xpose}->Add($self->{sp_xpose}, 0, 0, 0);
$self->{l_semi} = Wx::StaticText->new($self, wxID_ANY, _T("Semitones"));
$self->{sz_xpose}->Add($self->{l_semi}, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5);
$self->{ch_xpose_dir} = Wx::Choice->new($self, wxID_ANY, wxDefaultPosition, wxDefaultSize, [_T("Up"), _T("Down")], );
$self->{ch_xpose_dir}->SetToolTipString(_T("Direction to transpose."));
$self->{ch_xpose_dir}->SetSelection(0);
$self->{sz_xpose}->Add($self->{ch_xpose_dir}, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5);
$self->{sz_xpose}->Add(10, 2, 1, wxEXPAND, 0);
$self->{ch_acc} = Wx::Choice->new($self, wxID_ANY, wxDefaultPosition, wxDefaultSize, [_T("Sharps when transposing up, flats when down"), _T("Always use sharps"), _T("Always use flats"), _T("Use song key")], );
$self->{ch_acc}->SetToolTipString(_T("How to treat chords that need accidentals after transposition.\nAuto is to use sharps when transposing up, and flats when transposing down. Key uses the transposed key of the song."));
$self->{ch_acc}->SetSelection(0);
$self->{sz_xpose}->Add($self->{ch_acc}, 0, wxEXPAND, 5);
$self->{sz_prefs_outer}->Add(1, 5, 1, wxEXPAND, 0);
my $static_line_1 = Wx::StaticLine->new($self, wxID_ANY);
$self->{sz_prefs_outer}->Add($static_line_1, 0, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 10);
$self->{sz_tasks_buttons} = Wx::StdDialogButtonSizer->new();
$self->{sz_prefs_outer}->Add($self->{sz_tasks_buttons}, 0, wxALL|wxEXPAND, 5);
$self->{b_cancel} = Wx::Button->new($self, wxID_CANCEL, "");
$self->{b_cancel}->SetToolTipString(_T("Close the dialog without doing anything"));
$self->{sz_tasks_buttons}->AddButton($self->{b_cancel});
$self->{b_ok} = Wx::Button->new($self, wxID_OK, "");
$self->{b_ok}->SetToolTipString(_T("Generate the preview"));
$self->{b_ok}->SetDefault();
$self->{sz_tasks_buttons}->AddButton($self->{b_ok});
$self->{sz_tasks_buttons}->Realize();
$self->{sizer_2}->AddGrowableRow(1);
$self->{sizer_2}->AddGrowableCol(1);
$self->SetSizer($self->{sz_prefs_outer});
$self->{sz_prefs_outer}->Fit($self);
$self->SetAffirmativeId($self->{b_ok}->GetId());
$self->SetEscapeId($self->{b_cancel}->GetId());
$self->Layout();
Wx::Event::EVT_CHECKBOX($self, $self->{cb_xpose}->GetId, $self->can('OnCbTranspose'));
Wx::Event::EVT_BUTTON($self, $self->{b_cancel}->GetId, $self->can('OnCancel'));
Wx::Event::EVT_BUTTON($self, $self->{b_ok}->GetId, $self->can('OnAccept'));
# end wxGlade
return $self;
}
sub OnCbTranspose {
my ($self, $event) = @_;
# wxGlade: ChordPro::Wx::RenderDialog_wxg::OnCbTranspose <event_handler>
warn "Event handler (OnCbTranspose) not implemented";
$event->Skip;
# end wxGlade
}
sub OnCancel {
my ($self, $event) = @_;
# wxGlade: ChordPro::Wx::RenderDialog_wxg::OnCancel <event_handler>
warn "Event handler (OnCancel) not implemented";
$event->Skip;
# end wxGlade
}
sub OnAccept {
my ($self, $event) = @_;
# wxGlade: ChordPro::Wx::RenderDialog_wxg::OnAccept <event_handler>
warn "Event handler (OnAccept) not implemented";
$event->Skip;
# end wxGlade
}
# end of class ChordPro::Wx::RenderDialog_wxg
1;
( run in 1.587 second using v1.01-cache-2.11-cpan-13bb782fe5a )