diff options
author | phaylon <phaylon@03d0b0b2-0e1a-0410-a411-fdb2f4bd65d7> | 2009-02-16 02:40:11 +0000 |
---|---|---|
committer | phaylon <phaylon@03d0b0b2-0e1a-0410-a411-fdb2f4bd65d7> | 2009-02-16 02:40:11 +0000 |
commit | f9b32c83550e273bec97c9be5b63079addd4846b (patch) | |
tree | c7bdd746379aa8bb3ffd1e2500d86daf32d3b8e0 /lib/Reaction/UI/Widget.pm | |
parent | 63bb30b44346800078dc638dcc484828d89c2ad4 (diff) | |
download | reaction-f9b32c83550e273bec97c9be5b63079addd4846b.tar.gz reaction-f9b32c83550e273bec97c9be5b63079addd4846b.zip |
widget documentation
Diffstat (limited to 'lib/Reaction/UI/Widget.pm')
-rw-r--r-- | lib/Reaction/UI/Widget.pm | 68 |
1 files changed, 67 insertions, 1 deletions
diff --git a/lib/Reaction/UI/Widget.pm b/lib/Reaction/UI/Widget.pm index 07a109f..50085af 100644 --- a/lib/Reaction/UI/Widget.pm +++ b/lib/Reaction/UI/Widget.pm @@ -132,10 +132,76 @@ __PACKAGE__->meta->make_immutable; =head1 NAME -Reaction::UI::Widget +Reaction::UI::Widget - The base widget. =head1 DESCRIPTION +This is the base class for all widgets. It provides common functionality and +fragments. It is also concerned with the rendering of the fragments. + +=head1 FRAGMENTS + +=head2 widget + +This is the root fragment for every widget. + +=head2 viewport + +This fragment is used to render another viewport from inside a fragment. It +assumes the viewport is stored in the C<_> argument. + +=head1 ENVIRONMENT FLAGS + +=over + +=item REACTION_UI_WIDGET_DEBUG_FRAGMENTS + +Log additional debugging output for fragment processing. + +=item REACTION_UI_WIDGET_DEBUUG_LAYOUTS + +Log additional debugging output for layout processing. + +=back + +=head1 ATTRIBUTES + +=head2 view + +The widget's view object. Is required, readonly and must be a L<Reaction::UI::View>. + +=head2 layout_set + +The widget's layout set. Is required, readonly and must be a L<Reaction::UI::LayoutSet>. + +=head2 fragment_names + +List of names of known fragments for the current widget. Lazily computed from all +methods that are named in the pattern C<_fragment_$name>. + +=head2 basic_layout_args + +A lazily built hash reference containing the rendered fragments defined in both the widget and +the layout set, keyed by the fragments' names. + +=head + +=head1 METHODS + +=head2 render + + $widget->render('fragment_name', $reaction_ctx, \%passed_args); + +This method is concerned with rendering a fragment. + +=head1 SEE ALSO + +=over 4 + +=item * L<Reaction::Manual::Widgets> + +=back + =head1 AUTHORS See L<Reaction::Class> for authors. |