use more MooseX::Types and support actionattribute in Action vp to explicitly provide...
[catagits/Reaction.git] / lib / Reaction / UI / ViewPort / Image.pm
1 package Reaction::UI::ViewPort::Image;
2
3 use Reaction::Class;
4 use namespace::clean -except => [ qw(meta) ];
5 extends 'Reaction::UI::ViewPort';
6
7 use MooseX::Types::URI qw/Uri/;
8 use MooseX::Types::Moose qw/Int/;
9
10 has uri => ( is => 'rw', isa => Uri, required => 1);
11 has width => ( is => 'rw', isa => Int);
12 has height => ( is => 'rw', isa => Int);
13
14 __PACKAGE__->meta->make_immutable;
15
16 1;
17
18 __END__;
19
20
21 =head1 NAME
22
23 Reaction::UI::ViewPort::Image
24
25 =head1 DESCRIPTION
26
27 A Viewport to display an image.
28
29 =head1 ATTRIBUTES
30
31 =head2 uri
32
33 Required URI object pointing to the image to be displayed.
34
35 =head2 width
36
37 Optional width in pixels.
38
39 =head2 height
40
41 Optional height in pixels.
42
43 =head1 AUTHORS
44
45 See L<Reaction::Class> for authors.
46
47 =head1 LICENSE
48
49 See L<Reaction::Class> for the license.
50
51 =cut