File Coverage

blib/lib/App/Music/ChordPro/Wx/Main_wxg.pm
Criterion Covered Total %
statement 1 3 33.3
branch n/a
condition n/a
subroutine 1 1 100.0
pod n/a
total 2 4 50.0


line stmt bran cond sub pod time code
1             # generated by wxGlade 0.7.2 on Mon Jun 5 20:58:44 2017
2             #
3             # To get wxPerl visit http://www.wxperl.it
4             #
5              
6 1     1   211 use Wx 0.15 qw[:allclasses];
  0            
  0            
7             use strict;
8             # begin wxGlade: dependencies
9             use Wx::Locale gettext => '_T';
10             # end wxGlade
11              
12             # begin wxGlade: extracode
13             # end wxGlade
14              
15             package App::Music::ChordPro::Wx::Main_wxg;
16              
17             use Wx qw[:everything];
18             use base qw(Wx::Frame);
19             use strict;
20              
21             # begin wxGlade: dependencies
22             use Wx::Locale gettext => '_T';
23             # end wxGlade
24              
25             sub new {
26             my( $self, $parent, $id, $title, $pos, $size, $style, $name ) = @_;
27             $parent = undef unless defined $parent;
28             $id = -1 unless defined $id;
29             $title = "" unless defined $title;
30             $pos = wxDefaultPosition unless defined $pos;
31             $size = wxDefaultSize unless defined $size;
32             $name = "" unless defined $name;
33              
34             # begin wxGlade: App::Music::ChordPro::Wx::Main_wxg::new
35             $style = wxDEFAULT_FRAME_STYLE
36             unless defined $style;
37              
38             $self = $self->SUPER::new( $parent, $id, $title, $pos, $size, $style, $name );
39            
40              
41             # Menu Bar
42              
43             $self->{main_menubar} = Wx::MenuBar->new();
44             use constant wxID_HELP_ChordPro => Wx::NewId();
45             use constant wxID_HELP_Config => Wx::NewId();
46             use constant wxID_HELP_EXAMPLE => Wx::NewId();
47             my $wxglade_tmp_menu;
48             $wxglade_tmp_menu = Wx::Menu->new();
49             $wxglade_tmp_menu->Append(wxID_NEW, _T("New"), _T("Create a new ChordPro document"));
50             $wxglade_tmp_menu->Append(wxID_OPEN, _T("Open... Ctrl-O"), _T("Open an existing ChordPro file"));
51             $wxglade_tmp_menu->AppendSeparator();
52             $wxglade_tmp_menu->Append(wxID_PREVIEW, _T("Preview Ctrl-P"), _T("Format and preview"));
53             $wxglade_tmp_menu->Append(wxID_SAVE, _T("Save... Ctrl-S"), _T("Save the current ChordPro file"));
54             $wxglade_tmp_menu->AppendSeparator();
55             $wxglade_tmp_menu->Append(wxID_EXIT, _T("Exit"), "");
56             $self->{main_menubar}->Append($wxglade_tmp_menu, _T("File"));
57             $wxglade_tmp_menu = Wx::Menu->new();
58             $wxglade_tmp_menu->Append(wxID_UNDO, _T("Undo"), "");
59             $wxglade_tmp_menu->Append(wxID_REDO, _T("Redo"), "");
60             $wxglade_tmp_menu->AppendSeparator();
61             $wxglade_tmp_menu->Append(wxID_CUT, _T("Cut"), "");
62             $wxglade_tmp_menu->Append(wxID_COPY, _T("Copy"), "");
63             $wxglade_tmp_menu->Append(wxID_PASTE, _T("Paste"), "");
64             $wxglade_tmp_menu->Append(wxID_DELETE, _T("Delete"), "");
65             $wxglade_tmp_menu->AppendSeparator();
66             $wxglade_tmp_menu->Append(wxID_PREFERENCES, _T("Preferences..."), _T("Preferences"));
67             $self->{main_menubar}->Append($wxglade_tmp_menu, _T("Edit"));
68             $wxglade_tmp_menu = Wx::Menu->new();
69             $wxglade_tmp_menu->Append(wxID_HELP_ChordPro, _T("ChordPro file format"), _T("Help about the ChordPro file format"));
70             $wxglade_tmp_menu->Append(wxID_HELP_Config, _T("ChordPro config files"), _T("Help about the config files"));
71             $wxglade_tmp_menu->AppendSeparator();
72             $wxglade_tmp_menu->Append(wxID_HELP_EXAMPLE, _T("Insert song example"), _T("Insert an example song into the editor window"));
73             $wxglade_tmp_menu->AppendSeparator();
74             $wxglade_tmp_menu->Append(wxID_ABOUT, _T("About"), _T("About WxChordPro"));
75             $self->{main_menubar}->Append($wxglade_tmp_menu, _T("Help"));
76             $self->SetMenuBar($self->{main_menubar});
77            
78             # Menu Bar end
79              
80             $self->{f_main_statusbar} = $self->CreateStatusBar(1);
81             $self->{t_source} = Wx::TextCtrl->new($self, wxID_ANY, "", wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE);
82              
83             $self->__set_properties();
84             $self->__do_layout();
85              
86             Wx::Event::EVT_MENU($self, wxID_NEW, $self->can('OnNew'));
87             Wx::Event::EVT_MENU($self, wxID_OPEN, $self->can('OnOpen'));
88             Wx::Event::EVT_MENU($self, wxID_PREVIEW, $self->can('OnPreview'));
89             Wx::Event::EVT_MENU($self, wxID_SAVE, $self->can('OnSave'));
90             Wx::Event::EVT_MENU($self, wxID_EXIT, $self->can('OnQuit'));
91             Wx::Event::EVT_MENU($self, wxID_UNDO, $self->can('OnUndo'));
92             Wx::Event::EVT_MENU($self, wxID_REDO, $self->can('OnRedo'));
93             Wx::Event::EVT_MENU($self, wxID_CUT, $self->can('OnCut'));
94             Wx::Event::EVT_MENU($self, wxID_COPY, $self->can('OnCopy'));
95             Wx::Event::EVT_MENU($self, wxID_PASTE, $self->can('OnPaste'));
96             Wx::Event::EVT_MENU($self, wxID_DELETE, $self->can('OnDelete'));
97             Wx::Event::EVT_MENU($self, wxID_PREFERENCES, $self->can('OnPreferences'));
98             Wx::Event::EVT_MENU($self, wxID_HELP_ChordPro, $self->can('OnHelp_ChordPro'));
99             Wx::Event::EVT_MENU($self, wxID_HELP_Config, $self->can('OnHelp_Config'));
100             Wx::Event::EVT_MENU($self, wxID_HELP_EXAMPLE, $self->can('OnHelp_Example'));
101             Wx::Event::EVT_MENU($self, wxID_ABOUT, $self->can('OnAbout'));
102              
103             # end wxGlade
104             return $self;
105              
106             }
107              
108              
109             sub __set_properties {
110             my $self = shift;
111             # begin wxGlade: App::Music::ChordPro::Wx::Main_wxg::__set_properties
112             $self->SetTitle(_T("ChordPro"));
113             $self->SetSize($self->ConvertDialogSizeToPixels(Wx::Size->new(401, 311)));
114             $self->{f_main_statusbar}->SetStatusWidths(-1);
115              
116             # statusbar fields
117             my( @f_main_statusbar_fields ) = (
118             _T("f_main_statusbar"),
119             );
120              
121             if( @f_main_statusbar_fields ) {
122             $self->{f_main_statusbar}->SetStatusText($f_main_statusbar_fields[$_], $_)
123             for 0 .. $#f_main_statusbar_fields ;
124             }
125             # end wxGlade
126             }
127              
128             sub __do_layout {
129             my $self = shift;
130             # begin wxGlade: App::Music::ChordPro::Wx::Main_wxg::__do_layout
131             $self->{sz_outer} = Wx::BoxSizer->new(wxVERTICAL);
132             $self->{sz_main} = Wx::BoxSizer->new(wxVERTICAL);
133             $self->{sz_source} = Wx::StaticBoxSizer->new(Wx::StaticBox->new($self, wxID_ANY, ""), wxHORIZONTAL);
134             $self->{sz_source}->Add($self->{t_source}, 1, wxALL|wxEXPAND, 5);
135             $self->{sz_main}->Add($self->{sz_source}, 1, wxALL|wxEXPAND, 5);
136             $self->{sz_outer}->Add($self->{sz_main}, 1, wxEXPAND, 0);
137             $self->SetSizer($self->{sz_outer});
138             $self->Layout();
139             # end wxGlade
140             }
141              
142             sub OnNew {
143             my ($self, $event) = @_;
144             # wxGlade: App::Music::ChordPro::Wx::Main_wxg::OnNew
145             warn "Event handler (OnNew) not implemented";
146             $event->Skip;
147             # end wxGlade
148             }
149              
150              
151             sub OnOpen {
152             my ($self, $event) = @_;
153             # wxGlade: App::Music::ChordPro::Wx::Main_wxg::OnOpen
154             warn "Event handler (OnOpen) not implemented";
155             $event->Skip;
156             # end wxGlade
157             }
158              
159              
160             sub OnPreview {
161             my ($self, $event) = @_;
162             # wxGlade: App::Music::ChordPro::Wx::Main_wxg::OnPreview
163             warn "Event handler (OnPreview) not implemented";
164             $event->Skip;
165             # end wxGlade
166             }
167              
168              
169             sub OnSave {
170             my ($self, $event) = @_;
171             # wxGlade: App::Music::ChordPro::Wx::Main_wxg::OnSave
172             warn "Event handler (OnSave) not implemented";
173             $event->Skip;
174             # end wxGlade
175             }
176              
177              
178             sub OnQuit {
179             my ($self, $event) = @_;
180             # wxGlade: App::Music::ChordPro::Wx::Main_wxg::OnQuit
181             warn "Event handler (OnQuit) not implemented";
182             $event->Skip;
183             # end wxGlade
184             }
185              
186              
187             sub OnUndo {
188             my ($self, $event) = @_;
189             # wxGlade: App::Music::ChordPro::Wx::Main_wxg::OnUndo
190             warn "Event handler (OnUndo) not implemented";
191             $event->Skip;
192             # end wxGlade
193             }
194              
195              
196             sub OnRedo {
197             my ($self, $event) = @_;
198             # wxGlade: App::Music::ChordPro::Wx::Main_wxg::OnRedo
199             warn "Event handler (OnRedo) not implemented";
200             $event->Skip;
201             # end wxGlade
202             }
203              
204              
205             sub OnCut {
206             my ($self, $event) = @_;
207             # wxGlade: App::Music::ChordPro::Wx::Main_wxg::OnCut
208             warn "Event handler (OnCut) not implemented";
209             $event->Skip;
210             # end wxGlade
211             }
212              
213              
214             sub OnCopy {
215             my ($self, $event) = @_;
216             # wxGlade: App::Music::ChordPro::Wx::Main_wxg::OnCopy
217             warn "Event handler (OnCopy) not implemented";
218             $event->Skip;
219             # end wxGlade
220             }
221              
222              
223             sub OnPaste {
224             my ($self, $event) = @_;
225             # wxGlade: App::Music::ChordPro::Wx::Main_wxg::OnPaste
226             warn "Event handler (OnPaste) not implemented";
227             $event->Skip;
228             # end wxGlade
229             }
230              
231              
232             sub OnDelete {
233             my ($self, $event) = @_;
234             # wxGlade: App::Music::ChordPro::Wx::Main_wxg::OnDelete
235             warn "Event handler (OnDelete) not implemented";
236             $event->Skip;
237             # end wxGlade
238             }
239              
240              
241             sub OnPreferences {
242             my ($self, $event) = @_;
243             # wxGlade: App::Music::ChordPro::Wx::Main_wxg::OnPreferences
244             warn "Event handler (OnPreferences) not implemented";
245             $event->Skip;
246             # end wxGlade
247             }
248              
249              
250             sub OnHelp_ChordPro {
251             my ($self, $event) = @_;
252             # wxGlade: App::Music::ChordPro::Wx::Main_wxg::OnHelp_ChordPro
253             warn "Event handler (OnHelp_ChordPro) not implemented";
254             $event->Skip;
255             # end wxGlade
256             }
257              
258              
259             sub OnHelp_Config {
260             my ($self, $event) = @_;
261             # wxGlade: App::Music::ChordPro::Wx::Main_wxg::OnHelp_Config
262             warn "Event handler (OnHelp_Config) not implemented";
263             $event->Skip;
264             # end wxGlade
265             }
266              
267              
268             sub OnHelp_Example {
269             my ($self, $event) = @_;
270             # wxGlade: App::Music::ChordPro::Wx::Main_wxg::OnHelp_Example
271             warn "Event handler (OnHelp_Example) not implemented";
272             $event->Skip;
273             # end wxGlade
274             }
275              
276              
277             sub OnAbout {
278             my ($self, $event) = @_;
279             # wxGlade: App::Music::ChordPro::Wx::Main_wxg::OnAbout
280             warn "Event handler (OnAbout) not implemented";
281             $event->Skip;
282             # end wxGlade
283             }
284              
285              
286             # end of class App::Music::ChordPro::Wx::Main_wxg
287              
288             1;
289