9
9
use Padre::Wx::Icon ();
11
our $VERSION = '0.36';
11
our $VERSION = '0.42';
12
12
our @ISA = 'Wx::Dialog';
14
14
use Class::XSAccessor accessors => {
15
_action => '_action', # action of default button
16
_button => '_button', # general-purpose button
17
_butprefs => '_butprefs', # preferences button
18
_currow => '_currow', # current list row number
19
_curplugin => '_curplugin', # current plugin selected
20
_hbox => '_hbox', # the window hbox sizer
21
_imagelist => '_imagelist', # image list for the listctrl
22
_label => '_label', # label at top of right pane
23
_list => '_list', # list on the left of the pane
24
_manager => '_manager', # ref to plugin manager
25
_plugin_names => '_plugin_names', # mapping of short/full plugin names
26
_sortcolumn => '_sortcolumn', # column used for list sorting
27
_sortreverse => '_sortreverse', # list sorting is reversed
28
_whtml => '_whtml', # html space for plugin doc
15
_action => '_action', # action of default button
16
_button => '_button', # general-purpose button
17
_butprefs => '_butprefs', # preferences button
18
_currow => '_currow', # current list row number
19
_curplugin => '_curplugin', # current plugin selected
20
_hbox => '_hbox', # the window hbox sizer
21
_imagelist => '_imagelist', # image list for the listctrl
22
_label => '_label', # label at top of right pane
23
_list => '_list', # list on the left of the pane
24
_manager => '_manager', # ref to plugin manager
25
_plugin_names => '_plugin_names', # mapping of short/full plugin names
26
_sortcolumn => '_sortcolumn', # column used for list sorting
27
_sortreverse => '_sortreverse', # list sorting is reversed
28
_whtml => '_whtml', # html space for plugin doc
157
158
my $fullname = $event->GetLabel;
158
159
my $name = $self->_plugin_names->{$fullname};
159
160
my $plugin = $self->_manager->plugins->{$name};
160
$self->_curplugin($plugin); # storing selected plugin
161
$self->_currow( $event->GetIndex ); # storing selected row
161
$self->_curplugin($plugin); # storing selected plugin
162
$self->_currow( $event->GetIndex ); # storing selected row
163
164
# updating plugin name in right pane
164
165
$self->_label->SetLabel( $plugin->plugin_name );
169
170
my $class = $plugin->class;
170
171
my $doc = $browser->resolve($class);
171
172
my $output = eval { $browser->browse($doc) };
174
175
? sprintf( Wx::gettext("Error loading pod for class '%s': %s"), $class, $@ )
176
177
$self->_whtml->SetPage($html);
440
440
$list->SetColumnWidth( $_, Wx::wxLIST_AUTOSIZE ) for 0 .. 2;
442
442
# making sure the list can show all columns
443
my $width = 15; # taking vertical scrollbar into account
443
my $width = 15; # taking vertical scrollbar into account
444
444
$width += $list->GetColumnWidth($_) for 0 .. 2;
445
445
$list->SetMinSize( [ $width, -1 ] );