GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Reaction::UI::FocusStack(3) User Contributed Perl Documentation Reaction::UI::FocusStack(3)

Reaction::UI::FocusStack - A linked list of ViewPort-based objects

  my $stack = Reaction::UI::FocusStack->new();

  # Or more commonly, in a Reaction::UI::RootController based
  # Catalyst Controller:
  my $stack = $ctx->focus_stack;

  # Add a new basic viewport inside the last viewport on the stack:
  my $vp = $stack->push_viewport('Reaction::UI::ViewPort' => 
                                  layout => 'xhtml'
                                );

  # Fetch the innermost viewport from the stack:
  my $vp = $stack->pop_viewport();

  # Remove all viewports inside a given viewport:
  $stack->pop_viewports_to($vp);

  # Create a named stack as a tangent to an existing viewport:
  my $newstack = $vp->create_tangent('somename');

  # Resolve current events using your stack:
  # This is called by Reaction::UI::RootController in the end action.
  $stack->apply_events($ctx, $param_hash);

A FocusStack represents a list of related ViewPort objects. The Reaction::UI::RootController creates an empty stack for you in it's begin action, which represents the main thread/container of the page. Typically you add new ViewPorts to this stack as the main parts of your page. To add multiple parallel page subparts, create a tangent from the outer viewport, and add more viewports as normal.

Arguments: none

Create a new empty FocusStack. This is done for you in Reaction::UI::RootController.

Arguments: $class, %options

Creates a new Reaction::UI::ViewPort based object and adds it to the stack.

The following attributes of the new ViewPort are set:

outer
Is set to the preceding ViewPort in the stack.
focus_stack
Is set to the FocusStack object that created the ViewPort.
location
Is set to the location of the ViewPort in the stack.

Arguments: none

Removes the last/innermost ViewPort from the stack and returns it.

Arguments: $viewport

Pops all ViewPorts off the stack until the given ViewPort object remains as the last item. If passed a $viewport not on the stack, this will empty the stack completely (and then die complainingly).

TODO: Should pop_viewports_to check $vp->focus_stack eq $self first?

Arguments: none

Retrieve the first ViewPort in this stack. Useful for calling "render_viewport" in Reaction::UI::Window on a "focus_tangent" in Reaction::UI::ViewPort.

Arguments: none

Retrieve the first ViewPort in this stack. Useful for calling "render_viewport" in Reaction::UI::Window on a "focus_tangent" in Reaction::UI::ViewPort.

Arguments: none

Retrieve the last ViewPort in this stack. Useful for calling "render_viewport" in Reaction::UI::Window on a "focus_tangent" in Reaction::UI::ViewPort.

Arguments: none

Arguments: $ctx, $params_hashref

Instruct each of the ViewPorts in the stack to apply the given events to each of it's tangent stacks, and then to itself. These are applied starting with the last/innermost ViewPort first.

See Reaction::Class for authors.

See Reaction::Class for the license.
2010-10-29 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.