The software provides a container to render UI elements within.
```my $window = Reaction::UI::Window->new(
ctx => $ctx,
view_name => $view_name,
content_type => $content_type,
title => $window_title,
);```
Commonly, however, the Root Controller creates a Window object for you:
```my $window = $ctx->stash->{window};```
Once you have created or retrieved a Window object, you can resolve current events and render the view of UI elements by calling the `flush()` function.
If you only want to resolve events, you can call `flush_events()`, and if you only want to render the top ViewPort in the FocusStack of the Window, you can call `flush_view()`.
If you want to render a specific ViewPort, you can use this function:
```$window->render_viewport($viewport);```
You can also add a ViewPort to the UI using:
```$window->focus_stack->push_viewport('Reaction::UI::ViewPort');```
Overall, the Window object is designed to contain all the ViewPorts and UI elements and can be easily rendered in the end action of the Root Controller to create a complete web page.
Version 0.001001: N/A