blib/lib/ChordPro/Wx/RenderDialog_wxg.pm untested

filter: Statementstmt 0.0% 0 / 113 Branchbran 0.0% 0 / 14 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 11 Podpod 0.0% 0 / 4 totaltotal 0.0% 0 / 142 CC 8 SCAR 35.0
CC
8
Cov
0%
new
72.0
OnCbTranspose
2.0
OnCancel
2.0
CRAP 33.1
1 # generated by wxGlade 1.1.1 on Mon Mar 16 09:12:56 2026
2 #
3 # To get wxPerl visit http://www.wxperl.it
4 #
5  
6 use Wx;
7 use strict;
8  
9 # begin wxGlade: dependencies
10 # end wxGlade
11  
12 # begin wxGlade: extracode
13 # end wxGlade
14  
15 package ChordPro::Wx::RenderDialog_wxg;
16  
17 use Wx qw[:everything];
18 use base qw(Wx::Dialog);
19 use strict;
20  
21 use Wx::Locale gettext => '_T';
22 sub new {
23 my( $self, $parent, $id, $title, $pos, $size, $style, $name ) = @_;
24 $parent = undef unless defined $parent;
25 $id = -1 unless defined $id;
26 $title = "" unless defined $title;
27 $pos = wxDefaultPosition unless defined $pos;
28 $size = wxDefaultSize unless defined $size;
29 $name = "" unless defined $name;
30  
31 # begin wxGlade: ChordPro::Wx::RenderDialog_wxg::new
32 use ChordPro::Wx::Utils;
33 $style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER
34 unless defined $style;
35  
36 $self = $self->SUPER::new( $parent, $id, $title, $pos, $size, $style, $name );
37 $self->SetTitle(_T("Preview Tasks"));
38
39 $self->{sz_prefs_outer} = Wx::BoxSizer->new(wxVERTICAL);
40
41 my $label_3 = Wx::StaticText->new($self, wxID_ANY, _T("Preview Tasks"), wxDefaultPosition, wxDefaultSize, wxALIGN_CENTER_HORIZONTAL);
42 $label_3->SetForegroundColour(Wx::Colour->new(0, 104, 217));
43 $label_3->SetFont(Wx::Font->new(18, wxDEFAULT, wxNORMAL, wxNORMAL, 0, ""));
44 $self->{sz_prefs_outer}->Add($label_3, 0, wxALL|wxEXPAND, 5);
45
46 $self->{sz_prefs_inner} = Wx::BoxSizer->new(wxVERTICAL);
47 $self->{sz_prefs_outer}->Add($self->{sz_prefs_inner}, 0, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5);
48
49 $self->{sizer_2} = Wx::GridBagSizer->new(5, 5);
50 $self->{sz_prefs_inner}->Add($self->{sizer_2}, 1, wxEXPAND, 5);
51
52 my $label_1 = Wx::StaticText->new($self, wxID_ANY, _T("Tasks"));
53 $self->{sizer_2}->Add($label_1, Wx::GBPosition->new(0, 0), Wx::GBSpan->new(1, 1), wxLEFT|wxTOP, 5);
54
55 $self->{sizer_1} = Wx::BoxSizer->new(wxVERTICAL);
56 $self->{sizer_2}->Add($self->{sizer_1}, Wx::GBPosition->new(0, 1), Wx::GBSpan->new(1, 1), wxEXPAND|wxTOP, 5);
57
58 $self->{cb_task_no_diagrams} = Wx::CheckBox->new($self, wxID_ANY, _T("Suppress the chord diagrams"));
59 $self->{cb_task_no_diagrams}->SetToolTipString(_T("Do not include the chord diagrams"));
60 $self->{sizer_1}->Add($self->{cb_task_no_diagrams}, 0, 0, 0);
61
62 $self->{cb_task_lyrics_only} = Wx::CheckBox->new($self, wxID_ANY, _T("Only lyrics (no chords, ABC, LilyPond, ...)"));
63 $self->{cb_task_lyrics_only}->SetToolTipString(_T("Show only the lyrics of the song"));
64 $self->{sizer_1}->Add($self->{cb_task_lyrics_only}, 0, 0, 0);
65
66 $self->{cb_task_decapo} = Wx::CheckBox->new($self, wxID_ANY, _T("Eliminate the capo settings"));
67 $self->{cb_task_decapo}->SetToolTipString(_T("Show the chords as they sound, eliminating the need for a capo setting"));
68 $self->{sizer_1}->Add($self->{cb_task_decapo}, 0, 0, 0);
69
70 $self->{l_customtasks} = Wx::StaticText->new($self, wxID_ANY, _T("Custom"));
71 $self->{l_customtasks}->Show(0);
72 $self->{sizer_2}->Add($self->{l_customtasks}, Wx::GBPosition->new(1, 0), Wx::GBSpan->new(1, 1), wxLEFT, 5);
73
74 $self->{sz_customtasks} = Wx::BoxSizer->new(wxVERTICAL);
75 $self->{sizer_2}->Add($self->{sz_customtasks}, Wx::GBPosition->new(1, 1), Wx::GBSpan->new(1, 1), wxEXPAND, 0);
76
77 $self->{sz_customtasks}->Add(0, 0, 0, 0, 0);
78
79 my $static_line_5 = Wx::StaticLine->new($self, wxID_ANY);
80 $self->{sizer_2}->Add($static_line_5, Wx::GBPosition->new(2, 0), Wx::GBSpan->new(1, 2), wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5);
81
82 $self->{cb_xpose} = Wx::CheckBox->new($self, wxID_ANY, _T("Transpose"));
83 $self->{sizer_2}->Add($self->{cb_xpose}, Wx::GBPosition->new(3, 0), Wx::GBSpan->new(1, 1), wxALIGN_CENTER_VERTICAL|wxEXPAND, 0);
84
85 $self->{sz_xpose} = Wx::BoxSizer->new(wxHORIZONTAL);
86 $self->{sizer_2}->Add($self->{sz_xpose}, Wx::GBPosition->new(3, 1), Wx::GBSpan->new(1, 1), wxEXPAND, 5);
87
88 $self->{sp_xpose} = Wx::SpinCtrl->new($self, wxID_ANY, "0", wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 12, 0);
89 $self->{sz_xpose}->Add($self->{sp_xpose}, 0, 0, 0);
90
91 $self->{l_semi} = Wx::StaticText->new($self, wxID_ANY, _T("Semitones"));
92 $self->{sz_xpose}->Add($self->{l_semi}, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5);
93
94 $self->{ch_xpose_dir} = Wx::Choice->new($self, wxID_ANY, wxDefaultPosition, wxDefaultSize, [_T("Up"), _T("Down")], );
95 $self->{ch_xpose_dir}->SetToolTipString(_T("Direction to transpose."));
96 $self->{ch_xpose_dir}->SetSelection(0);
97 $self->{sz_xpose}->Add($self->{ch_xpose_dir}, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5);
98
99 $self->{sz_xpose}->Add(10, 2, 1, wxEXPAND, 0);
100
101 $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")], );
102 $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."));
103 $self->{ch_acc}->SetSelection(0);
104 $self->{sz_xpose}->Add($self->{ch_acc}, 0, wxEXPAND, 5);
105
106 $self->{sz_prefs_outer}->Add(1, 5, 1, wxEXPAND, 0);
107
108 my $static_line_1 = Wx::StaticLine->new($self, wxID_ANY);
109 $self->{sz_prefs_outer}->Add($static_line_1, 0, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 10);
110
111 $self->{sz_tasks_buttons} = Wx::StdDialogButtonSizer->new();
112 $self->{sz_prefs_outer}->Add($self->{sz_tasks_buttons}, 0, wxALL|wxEXPAND, 5);
113
114 $self->{b_cancel} = Wx::Button->new($self, wxID_CANCEL, "");
115 $self->{b_cancel}->SetToolTipString(_T("Close the dialog without doing anything"));
116 $self->{sz_tasks_buttons}->AddButton($self->{b_cancel});
117
118 $self->{b_ok} = Wx::Button->new($self, wxID_OK, "");
119 $self->{b_ok}->SetToolTipString(_T("Generate the preview"));
120 $self->{b_ok}->SetDefault();
121 $self->{sz_tasks_buttons}->AddButton($self->{b_ok});
122
123 $self->{sz_tasks_buttons}->Realize();
124
125 $self->{sizer_2}->AddGrowableRow(1);
126 $self->{sizer_2}->AddGrowableCol(1);
127
128 $self->SetSizer($self->{sz_prefs_outer});
129 $self->{sz_prefs_outer}->Fit($self);
130
131 $self->SetAffirmativeId($self->{b_ok}->GetId());
132 $self->SetEscapeId($self->{b_cancel}->GetId());
133
134 $self->Layout();
135 Wx::Event::EVT_CHECKBOX($self, $self->{cb_xpose}->GetId, $self->can('OnCbTranspose'));
136 Wx::Event::EVT_BUTTON($self, $self->{b_cancel}->GetId, $self->can('OnCancel'));
137 Wx::Event::EVT_BUTTON($self, $self->{b_ok}->GetId, $self->can('OnAccept'));
138  
139 # end wxGlade
140 return $self;
141  
142 }
143  
144  
145 sub OnCbTranspose {
146 my ($self, $event) = @_;
147 # wxGlade: ChordPro::Wx::RenderDialog_wxg::OnCbTranspose <event_handler>
148 warn "Event handler (OnCbTranspose) not implemented";
149 $event->Skip;
150 # end wxGlade
151 }
152  
153  
154 sub OnCancel {
155 my ($self, $event) = @_;
156 # wxGlade: ChordPro::Wx::RenderDialog_wxg::OnCancel <event_handler>
157 warn "Event handler (OnCancel) not implemented";
158 $event->Skip;
159 # end wxGlade
160 }
161  
162  
163 sub OnAccept {
164 my ($self, $event) = @_;
165 # wxGlade: ChordPro::Wx::RenderDialog_wxg::OnAccept <event_handler>
166 warn "Event handler (OnAccept) not implemented";
167 $event->Skip;
168 # end wxGlade
169 }
170  
171  
172 # end of class ChordPro::Wx::RenderDialog_wxg
173  
174 1;
175