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 Thu Jan 19 16:56:16 2017
2             #
3             # To get wxPerl visit http://www.wxperl.it
4             #
5              
6 1     1   210 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             my $wxglade_tmp_menu;
47             $wxglade_tmp_menu = Wx::Menu->new();
48             $wxglade_tmp_menu->Append(wxID_NEW, _T("New"), _T("Create a new ChordPro document"));
49             $wxglade_tmp_menu->Append(wxID_OPEN, _T("Open... Ctrl-O"), _T("Open an existing ChordPro file"));
50             $wxglade_tmp_menu->AppendSeparator();
51             $wxglade_tmp_menu->Append(wxID_PREVIEW, _T("Preview Ctrl-P"), _T("Format and preview"));
52             $wxglade_tmp_menu->Append(wxID_SAVE, _T("Save... Ctrl-S"), _T("Save the current ChordPro file"));
53             $wxglade_tmp_menu->AppendSeparator();
54             $wxglade_tmp_menu->Append(wxID_EXIT, _T("Exit"), "");
55             $self->{main_menubar}->Append($wxglade_tmp_menu, _T("File"));
56             $wxglade_tmp_menu = Wx::Menu->new();
57             $wxglade_tmp_menu->Append(wxID_UNDO, _T("Undo"), "");
58             $wxglade_tmp_menu->Append(wxID_REDO, _T("Redo"), "");
59             $wxglade_tmp_menu->AppendSeparator();
60             $wxglade_tmp_menu->Append(wxID_CUT, _T("Cut"), "");
61             $wxglade_tmp_menu->Append(wxID_COPY, _T("Copy"), "");
62             $wxglade_tmp_menu->Append(wxID_PASTE, _T("Paste"), "");
63             $wxglade_tmp_menu->Append(wxID_DELETE, _T("Delete"), "");
64             $wxglade_tmp_menu->AppendSeparator();
65             $wxglade_tmp_menu->Append(wxID_PREFERENCES, _T("Preferences..."), _T("Preferences"));
66             $self->{main_menubar}->Append($wxglade_tmp_menu, _T("Edit"));
67             $wxglade_tmp_menu = Wx::Menu->new();
68             $wxglade_tmp_menu->Append(wxID_HELP_ChordPro, _T("ChordPro file format"), _T("Help about the ChordPro file format"));
69             $wxglade_tmp_menu->Append(wxID_HELP_Config, _T("ChordPro config files"), _T("Help about the config files"));
70             $wxglade_tmp_menu->AppendSeparator();
71             $wxglade_tmp_menu->Append(wxID_ABOUT, _T("About"), _T("About WxChordPro"));
72             $self->{main_menubar}->Append($wxglade_tmp_menu, _T("Help"));
73             $self->SetMenuBar($self->{main_menubar});
74            
75             # Menu Bar end
76              
77             $self->{f_main_statusbar} = $self->CreateStatusBar(1);
78             $self->{t_source} = Wx::TextCtrl->new($self, wxID_ANY, "", wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE);
79              
80             $self->__set_properties();
81             $self->__do_layout();
82              
83             Wx::Event::EVT_MENU($self, wxID_NEW, $self->can('OnNew'));
84             Wx::Event::EVT_MENU($self, wxID_OPEN, $self->can('OnOpen'));
85             Wx::Event::EVT_MENU($self, wxID_PREVIEW, $self->can('OnPreview'));
86             Wx::Event::EVT_MENU($self, wxID_SAVE, $self->can('OnSave'));
87             Wx::Event::EVT_MENU($self, wxID_EXIT, $self->can('OnQuit'));
88             Wx::Event::EVT_MENU($self, wxID_UNDO, $self->can('OnUndo'));
89             Wx::Event::EVT_MENU($self, wxID_REDO, $self->can('OnRedo'));
90             Wx::Event::EVT_MENU($self, wxID_CUT, $self->can('OnCut'));
91             Wx::Event::EVT_MENU($self, wxID_COPY, $self->can('OnCopy'));
92             Wx::Event::EVT_MENU($self, wxID_PASTE, $self->can('OnPaste'));
93             Wx::Event::EVT_MENU($self, wxID_DELETE, $self->can('OnDelete'));
94             Wx::Event::EVT_MENU($self, wxID_PREFERENCES, $self->can('OnPreferences'));
95             Wx::Event::EVT_MENU($self, wxID_HELP_ChordPro, $self->can('OnHelp_ChordPro'));
96             Wx::Event::EVT_MENU($self, wxID_HELP_Config, $self->can('OnHelp_Config'));
97             Wx::Event::EVT_MENU($self, wxID_ABOUT, $self->can('OnAbout'));
98              
99             # end wxGlade
100             return $self;
101              
102             }
103              
104              
105             sub __set_properties {
106             my $self = shift;
107             # begin wxGlade: App::Music::ChordPro::Wx::Main_wxg::__set_properties
108             $self->SetTitle(_T("ChordPro"));
109             $self->SetSize($self->ConvertDialogSizeToPixels(Wx::Size->new(401, 311)));
110             $self->{f_main_statusbar}->SetStatusWidths(-1);
111              
112             # statusbar fields
113             my( @f_main_statusbar_fields ) = (
114             _T("f_main_statusbar"),
115             );
116              
117             if( @f_main_statusbar_fields ) {
118             $self->{f_main_statusbar}->SetStatusText($f_main_statusbar_fields[$_], $_)
119             for 0 .. $#f_main_statusbar_fields ;
120             }
121             # end wxGlade
122             }
123              
124             sub __do_layout {
125             my $self = shift;
126             # begin wxGlade: App::Music::ChordPro::Wx::Main_wxg::__do_layout
127             $self->{sz_outer} = Wx::BoxSizer->new(wxVERTICAL);
128             $self->{sz_main} = Wx::BoxSizer->new(wxVERTICAL);
129             $self->{sz_source} = Wx::StaticBoxSizer->new(Wx::StaticBox->new($self, wxID_ANY, ""), wxHORIZONTAL);
130             $self->{sz_source}->Add($self->{t_source}, 1, wxALL|wxEXPAND, 5);
131             $self->{sz_main}->Add($self->{sz_source}, 1, wxALL|wxEXPAND, 5);
132             $self->{sz_outer}->Add($self->{sz_main}, 1, wxEXPAND, 0);
133             $self->SetSizer($self->{sz_outer});
134             $self->Layout();
135             # end wxGlade
136             }
137              
138             sub OnNew {
139             my ($self, $event) = @_;
140             # wxGlade: App::Music::ChordPro::Wx::Main_wxg::OnNew
141             warn "Event handler (OnNew) not implemented";
142             $event->Skip;
143             # end wxGlade
144             }
145              
146              
147             sub OnOpen {
148             my ($self, $event) = @_;
149             # wxGlade: App::Music::ChordPro::Wx::Main_wxg::OnOpen
150             warn "Event handler (OnOpen) not implemented";
151             $event->Skip;
152             # end wxGlade
153             }
154              
155              
156             sub OnPreview {
157             my ($self, $event) = @_;
158             # wxGlade: App::Music::ChordPro::Wx::Main_wxg::OnPreview
159             warn "Event handler (OnPreview) not implemented";
160             $event->Skip;
161             # end wxGlade
162             }
163              
164              
165             sub OnSave {
166             my ($self, $event) = @_;
167             # wxGlade: App::Music::ChordPro::Wx::Main_wxg::OnSave
168             warn "Event handler (OnSave) not implemented";
169             $event->Skip;
170             # end wxGlade
171             }
172              
173              
174             sub OnQuit {
175             my ($self, $event) = @_;
176             # wxGlade: App::Music::ChordPro::Wx::Main_wxg::OnQuit
177             warn "Event handler (OnQuit) not implemented";
178             $event->Skip;
179             # end wxGlade
180             }
181              
182              
183             sub OnUndo {
184             my ($self, $event) = @_;
185             # wxGlade: App::Music::ChordPro::Wx::Main_wxg::OnUndo
186             warn "Event handler (OnUndo) not implemented";
187             $event->Skip;
188             # end wxGlade
189             }
190              
191              
192             sub OnRedo {
193             my ($self, $event) = @_;
194             # wxGlade: App::Music::ChordPro::Wx::Main_wxg::OnRedo
195             warn "Event handler (OnRedo) not implemented";
196             $event->Skip;
197             # end wxGlade
198             }
199              
200              
201             sub OnCut {
202             my ($self, $event) = @_;
203             # wxGlade: App::Music::ChordPro::Wx::Main_wxg::OnCut
204             warn "Event handler (OnCut) not implemented";
205             $event->Skip;
206             # end wxGlade
207             }
208              
209              
210             sub OnCopy {
211             my ($self, $event) = @_;
212             # wxGlade: App::Music::ChordPro::Wx::Main_wxg::OnCopy
213             warn "Event handler (OnCopy) not implemented";
214             $event->Skip;
215             # end wxGlade
216             }
217              
218              
219             sub OnPaste {
220             my ($self, $event) = @_;
221             # wxGlade: App::Music::ChordPro::Wx::Main_wxg::OnPaste
222             warn "Event handler (OnPaste) not implemented";
223             $event->Skip;
224             # end wxGlade
225             }
226              
227              
228             sub OnDelete {
229             my ($self, $event) = @_;
230             # wxGlade: App::Music::ChordPro::Wx::Main_wxg::OnDelete
231             warn "Event handler (OnDelete) not implemented";
232             $event->Skip;
233             # end wxGlade
234             }
235              
236              
237             sub OnPreferences {
238             my ($self, $event) = @_;
239             # wxGlade: App::Music::ChordPro::Wx::Main_wxg::OnPreferences
240             warn "Event handler (OnPreferences) not implemented";
241             $event->Skip;
242             # end wxGlade
243             }
244              
245              
246             sub OnHelp_ChordPro {
247             my ($self, $event) = @_;
248             # wxGlade: App::Music::ChordPro::Wx::Main_wxg::OnHelp_ChordPro
249             warn "Event handler (OnHelp_ChordPro) not implemented";
250             $event->Skip;
251             # end wxGlade
252             }
253              
254              
255             sub OnHelp_Config {
256             my ($self, $event) = @_;
257             # wxGlade: App::Music::ChordPro::Wx::Main_wxg::OnHelp_Config
258             warn "Event handler (OnHelp_Config) not implemented";
259             $event->Skip;
260             # end wxGlade
261             }
262              
263              
264             sub OnAbout {
265             my ($self, $event) = @_;
266             # wxGlade: App::Music::ChordPro::Wx::Main_wxg::OnAbout
267             warn "Event handler (OnAbout) not implemented";
268             $event->Skip;
269             # end wxGlade
270             }
271              
272              
273             # end of class App::Music::ChordPro::Wx::Main_wxg
274              
275             1;
276