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


Manual Reference Pages  -  REACTION::UI::FOCUSSTACK (3)

.ds Aq ’

NAME

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

CONTENTS

SYNOPSIS



  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);



DESCRIPTION

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.

METHODS

    new

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

    push_viewport

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.

    pop_viewport

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

    pop_viewports_to

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?

    vp_head

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.

    vp_head

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.

    vp_tail

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.

    vp_count

Arguments: none

    loc_prefix

    apply_events

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.

AUTHORS

See Reaction::Class for authors.

LICENSE

See Reaction::Class for the license.
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 REACTION::UI::FOCUSSTACK (3) 2010-10-29

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