SpellCheck/FBP/Checker.pm untested

filter: Statementstmt 0.0% 0 / 90 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 18 Podpod 0.0% 0 / 12 totaltotal 0.0% 0 / 120 CC 1 SCAR 6.9
CC
1
Cov
0%
new
2.0
labeltext
2.0
label
2.0
CRAP 2.0
1 package Padre::Plugin::SpellCheck::FBP::Checker;
2  
3 ## no critic
4  
5 # This module was generated by Padre::Plugin::FormBuilder::Perl.
6 # To change this module edit the original .fbp file and regenerate.
7 # DO NOT MODIFY THIS FILE BY HAND!
8  
9 use 5.008005;
10 use utf8;
11 use strict;
12 use warnings;
13 use Padre::Wx ();
14 use Padre::Wx::Role::Main ();
15  
16 our $VERSION = '1.33';
17 our @ISA = qw{
18 Padre::Wx::Role::Main
19 Wx::Dialog
20 };
21  
22 sub new {
23 my $class = shift;
24 my $parent = shift;
25  
26 my $self = $class->SUPER::new(
27 $parent,
28 -1,
29 Wx::gettext("Padre-Plugin-SpellCheck"),
30 Wx::DefaultPosition,
31 Wx::DefaultSize,
32 Wx::DEFAULT_DIALOG_STYLE,
33 );
34  
35 $self->{labeltext} = Wx::StaticText->new(
36 $self,
37 -1,
38 Wx::gettext("Spell check finished:"),
39 );
40 $self->{labeltext}->SetMinSize( [ 124, -1 ] );
41  
42 $self->{label} = Wx::StaticText->new(
43 $self,
44 -1,
45 Wx::gettext("Click Close"),
46 );
47 $self->{label}->SetMinSize( [ 96, -1 ] );
48  
49 $self->{list} = Wx::ListCtrl->new(
50 $self,
51 -1,
52 Wx::DefaultPosition,
53 Wx::DefaultSize,
54 Wx::LC_LIST,
55 );
56  
57 Wx::Event::EVT_LIST_ITEM_ACTIVATED(
58 $self,
59 $self->{list},
60 sub {
61 shift->_on_replace_clicked(@_);
62 },
63 );
64  
65 $self->{m_button1} = Wx::Button->new(
66 $self,
67 -1,
68 Wx::gettext("&Add to dictionary"),
69 Wx::DefaultPosition,
70 Wx::DefaultSize,
71 );
72 $self->{m_button1}->Disable;
73  
74 $self->{replace} = Wx::Button->new(
75 $self,
76 -1,
77 Wx::gettext("&Replace"),
78 Wx::DefaultPosition,
79 Wx::DefaultSize,
80 );
81 $self->{replace}->SetToolTip(
82 Wx::gettext("Replace the highlighted word in Padre Editor.\nwith your selected word")
83 );
84  
85 Wx::Event::EVT_BUTTON(
86 $self,
87 $self->{replace},
88 sub {
89 shift->_on_replace_clicked(@_);
90 },
91 );
92  
93 $self->{replace_all} = Wx::Button->new(
94 $self,
95 -1,
96 Wx::gettext("R&eplace all"),
97 Wx::DefaultPosition,
98 Wx::DefaultSize,
99 );
100 $self->{replace_all}->SetToolTip(
101 Wx::gettext("Same as Replace\nbut also every future occurance\nin current Check")
102 );
103  
104 Wx::Event::EVT_BUTTON(
105 $self,
106 $self->{replace_all},
107 sub {
108 shift->_on_replace_all_clicked(@_);
109 },
110 );
111  
112 $self->{ignore} = Wx::Button->new(
113 $self,
114 -1,
115 Wx::gettext("&Ignore"),
116 Wx::DefaultPosition,
117 Wx::DefaultSize,
118 );
119 $self->{ignore}->SetToolTip(
120 Wx::gettext("Ignore the highlighted word in Padre Editor.")
121 );
122  
123 Wx::Event::EVT_BUTTON(
124 $self,
125 $self->{ignore},
126 sub {
127 shift->_on_ignore_clicked(@_);
128 },
129 );
130  
131 $self->{ignore_all} = Wx::Button->new(
132 $self,
133 -1,
134 Wx::gettext("I&gnore all"),
135 Wx::DefaultPosition,
136 Wx::DefaultSize,
137 );
138 $self->{ignore_all}->SetToolTip(
139 Wx::gettext("Same as Ignore\nbut also every future occurance\nin current Check")
140 );
141  
142 Wx::Event::EVT_BUTTON(
143 $self,
144 $self->{ignore_all},
145 sub {
146 shift->_on_ignore_all_clicked(@_);
147 },
148 );
149  
150 $self->{m_button6} = Wx::Button->new(
151 $self,
152 Wx::ID_CANCEL,
153 Wx::gettext("&Close"),
154 Wx::DefaultPosition,
155 Wx::DefaultSize,
156 );
157 $self->{m_button6}->SetDefault;
158  
159 $self->{status_info} = Wx::StaticBoxSizer->new(
160 Wx::StaticBox->new(
161 $self,
162 -1,
163 Wx::gettext("Status Info."),
164 ),
165 Wx::HORIZONTAL,
166 );
167 $self->{status_info}->Add( $self->{labeltext}, 0, Wx::ALL | Wx::EXPAND, 5 );
168 $self->{status_info}->Add( $self->{label}, 0, Wx::ALL | Wx::EXPAND, 5 );
169  
170 my $bSizer21 = Wx::BoxSizer->new(Wx::VERTICAL);
171 $bSizer21->Add( $self->{status_info}, 1, Wx::ALL | Wx::EXPAND, 5 );
172  
173 my $sbSizer2 = Wx::StaticBoxSizer->new(
174 Wx::StaticBox->new(
175 $self,
176 -1,
177 Wx::gettext("Suggestions"),
178 ),
179 Wx::VERTICAL,
180 );
181 $sbSizer2->Add( $self->{list}, 1, Wx::ALL | Wx::EXPAND, 5 );
182  
183 my $bSizer22 = Wx::BoxSizer->new(Wx::VERTICAL);
184 $bSizer22->Add( $sbSizer2, 1, Wx::ALL | Wx::EXPAND, 5 );
185  
186 my $bSizer2 = Wx::BoxSizer->new(Wx::VERTICAL);
187 $bSizer2->Add( $bSizer21, 0, Wx::ALL | Wx::EXPAND, 5 );
188 $bSizer2->Add( $bSizer22, 1, Wx::ALL | Wx::EXPAND, 5 );
189  
190 my $bSizer3 = Wx::BoxSizer->new(Wx::VERTICAL);
191 $bSizer3->Add( $self->{m_button1}, 0, Wx::ALL | Wx::EXPAND, 5 );
192 $bSizer3->Add( $self->{replace}, 0, Wx::ALL | Wx::EXPAND, 5 );
193 $bSizer3->Add( $self->{replace_all}, 0, Wx::ALL | Wx::EXPAND, 5 );
194 $bSizer3->Add( $self->{ignore}, 0, Wx::ALL | Wx::EXPAND, 5 );
195 $bSizer3->Add( $self->{ignore_all}, 0, Wx::ALL | Wx::EXPAND, 5 );
196 $bSizer3->Add( $self->{m_button6}, 0, Wx::ALL | Wx::EXPAND, 5 );
197  
198 my $bSizer1 = Wx::BoxSizer->new(Wx::HORIZONTAL);
199 $bSizer1->Add( $bSizer2, 1, Wx::ALL | Wx::EXPAND, 5 );
200 $bSizer1->Add( $bSizer3, 0, Wx::ALL | Wx::EXPAND, 5 );
201  
202 $self->SetSizerAndFit($bSizer1);
203 $self->Layout;
204  
205 return $self;
206 }
207  
208 sub labeltext {
209 $_[0]->{labeltext};
210 }
211  
212 sub label {
213 $_[0]->{label};
214 }
215  
216 sub list {
217 $_[0]->{list};
218 }
219  
220 sub replace {
221 $_[0]->{replace};
222 }
223  
224 sub replace_all {
225 $_[0]->{replace_all};
226 }
227  
228 sub ignore {
229 $_[0]->{ignore};
230 }
231  
232 sub ignore_all {
233 $_[0]->{ignore_all};
234 }
235  
236 sub _on_replace_clicked {
237 $_[0]->main->error('Handler method _on_replace_clicked for event list.OnListItemActivated not implemented');
238 }
239  
240 sub _on_replace_all_clicked {
241 $_[0]->main->error('Handler method _on_replace_all_clicked for event replace_all.OnButtonClick not implemented');
242 }
243  
244 sub _on_ignore_clicked {
245 $_[0]->main->error('Handler method _on_ignore_clicked for event ignore.OnButtonClick not implemented');
246 }
247  
248 sub _on_ignore_all_clicked {
249 $_[0]->main->error('Handler method _on_ignore_all_clicked for event ignore_all.OnButtonClick not implemented');
250 }
251  
252 1;
253  
254 # Copyright 2008-2013 The Padre development team as listed in Padre.pm.
255 # LICENSE
256 # This program is free software; you can redistribute it and/or
257 # modify it under the same terms as Perl 5 itself.
258