X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FReaction%2FUI%2FView.pm;h=bdd04a2a56c4daa17b692c7baa123f74a6d8101d;hb=7ea45b2aff36dd61953b1517a1cfb079dcea230c;hp=db95e7bdc3509a792e064a2499279360d015a378;hpb=8139388160b0a38002b22ff95c3fee3d8380f156;p=catagits%2FReaction.git diff --git a/lib/Reaction/UI/View.pm b/lib/Reaction/UI/View.pm index db95e7b..bdd04a2 100644 --- a/lib/Reaction/UI/View.pm +++ b/lib/Reaction/UI/View.pm @@ -27,6 +27,13 @@ has 'skin' => ( has 'layout_set_class' => (is => 'ro', lazy_build => 1); has 'rendering_context_class' => (is => 'ro', lazy_build => 1); + +# default view doesn't localize +sub localize { + my($self, $value) = @_; + return $value; +} + sub _build_layout_set_class { my ($self) = @_; return $self->find_related_class('LayoutSet'); @@ -125,5 +132,104 @@ sub layout_set_args_for { __PACKAGE__->meta->make_immutable; +=pod + +=head1 NAME + +Reaction::UI::View - Render the UI. + +=head1 SYNOPSIS + + package MyApp::View::TT; + use base 'Reaction::UI::View::TT'; + + __PACKAGE__->config( + skin_name => 'MyApp', + ); + + ## In the Window class: + $res->body($self->view->render_window($self)); + +=head1 DESCRIPTION + +Render the viewports in the current window using the chosen skin and +layoutset, via the matching widgets. + +See also: + +=over + +=item L +=item L +=item L +=item L +=item L + +=back + +=head1 ATTRIBUTES + +=head2 app + +=over + +=item Arguments: $app? + +=back + +The application L class. This is set at +L time for you. + +=head2 skin_name + +=over + +=item Arguments: $skinname? + +=back + +The name of the skin to use to render the pages. This should be the +name of a subdirectory under the F in your application +directory. The default skin name is C, the default skin is +provided with Reaction. + +See also: L + +=head2 skin + +=over + +=item Arguments: $skin? + +=back + +A L object based on the L. It will be +created for you if not provided. + +=head2 layout_set_class + +The class of the L used to layout the +view. Defaults to searching down the precedence tree of the View class +looking for a class of the same name with C replaced with +C. + +=head2 rendering_context_class + +The class of the L used to layout the +view. Defaults to searching down the precedence tree of the View class +looking for a class of the same name with C replaced with +C. + +=head1 METHODS + +=head1 AUTHORS + +See L for authors. + +=head1 LICENSE + +See L for the license. + +=cut 1;