The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Devel::ebug::Wx::Service::ViewManager - manage view docking/undocking

SYNOPSIS

  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;

DESCRIPTION

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.

METHODS

active_views_list

  my @views = $vm->active_views_list;

has_view

get_view

  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.

register_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.

unregister_view

  $vm->unregister_view( $view );

Unregisters the view from the view manager.

create_pane

create_pane_and_update

  $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.

show_view

hide_view

  $vm->show_view( $tag );
  $vm->hide_view( $tag );
  my $shown = $vm->is_shown( $tag );

views

    my @view_classes = Devel::ebug::Wx::Service::ViewManager->views;

Returns a list of view classes known to the view manager.