Devel::ebug::Wx::Service::ViewManager - manage view docking/undocking
my $vm = ...->get_service( 'view_manager' ); my $bool = $vm->has_view( $tag ); $vm->register_view( $view ); $vm->unregister_view( $view ); # both create_* methods don't call ->register_view() $vm->create_pane( $view, { name => $tag, caption => 'Displayed name', float => 1, } ); $vm->create_pane_and_update( ... ); # like ->create_pane() my @view_classes = Devel::ebug::Wx::Service::ViewManager->views;
The view_manager service manages windows (views) using the wxWidgets Advanced User Interface (AUI). The service automatically manages saving/restoring the state and layout of registered views. Unregistered views are allowed but their state is not preserved between sessions.
view_manager
my @views = $vm->active_views_list;
my $is_active = $vm->has_view( $tag ); my $view = $vm->get_view( $tag );
has_view returns true if a view vith the given tag is currently shown and managed by the view manager; in this case get_view can be used to retrieve the view.
has_view
true
get_view
$vm->register_view( $view );
Registers a view with the view manager. Please notice that at any given time only one view can be registered with the service with a given tag.
$vm->unregister_view( $view );
Unregisters the view from the view manager.
$vm->create_pane( $view, { name => 'view_tag', caption => 'Pane title', float => 1, } ); $vm->create_pane_and_update( ... );
Both functions create a floatable pane containing $window; create_pane_and_update also causes the pane to be shown. Neither function calls register_view to register the view with the view manager.
$window
create_pane_and_update
register_view
$vm->show_view( $tag ); $vm->hide_view( $tag ); my $shown = $vm->is_shown( $tag );
my @view_classes = Devel::ebug::Wx::Service::ViewManager->views;
Returns a list of view classes known to the view manager.
To install Devel::ebug::Wx, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Devel::ebug::Wx
CPAN shell
perl -MCPAN -e shell install Devel::ebug::Wx
For more information on module installation, please visit the detailed CPAN module installation guide.