blib/lib/Curses/UI/TextViewer.pm

filter: Statementstmt 78.2% 18 / 23 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 83.3% 5 / 6 Podpod 100% 1 / 1 totaltotal 80.0% 24 / 30 CC 1 SCAR 1.5
CC
1
Cov
78%
new
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.2
« blib/lib/Curses/UI/PasswordEntry.pm ↑ Summary blib/lib/Curses/UI/Checkbox.pm »
1 # ----------------------------------------------------------------------
2 # Curses::UI::TextViewer
3 #
4 # (c) 2001-2002 by Maurice Makaay. All rights reserved.
5 # This file is part of Curses::UI. Curses::UI is free software.
6 # You can redistribute it and/or modify it under the same terms
7 # as perl itself.
8 #
9 # Currently maintained by Marcus Thiesen
10 # e-mail: marcus@cpan.thiesenweb.de
11 # ----------------------------------------------------------------------
12  
13 # TODO: fix dox
14  
15 package Curses::UI::TextViewer;
16  
17 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
18 1 ▶use Curses;
Subroutine BEGIN: called CC=1 SCAR=0.0
19 1 ▶use Curses::UI::Common;
Subroutine BEGIN: called CC=1 SCAR=0.0
20 1 ▶use Curses::UI::TextEditor;
Subroutine BEGIN: called CC=1 SCAR=0.0
21  
22 1 ▶use vars qw(
Subroutine BEGIN: called CC=1 SCAR=0.0
23 $VERSION
24 @ISA
25 1 );
26  
27 1 $VERSION = '1.10';
28  
29 1 @ISA = qw(
30 Curses::UI::TextEditor
31 );
32  
33 sub new ()
34 0 ▶{
Subroutine new: not called CC=1 SCAR=6.9
Pod documented
35 0 my $class = shift;
36  
37 0 my %userargs = @_;
38 0 keys_to_lowercase(\%userargs);
39  
40 0 my %args = (
41 %userargs,
42 -readonly => 1,
43 );
44 0 return $class->SUPER::new( %args);
45 }
46  
47 1 1;
48  
49  
50 =pod
51  
52 =head1 NAME
53  
54 Curses::UI::TextViewer - Create and manipulate textviewer widgets
55  
56 =head1 CLASS HIERARCHY
57  
58 Curses::UI::Widget
59 Curses::UI::Searchable
60 |
61 +----Curses::UI::TextEditor
62 |
63 +----Curses::UI::TextViewer
64  
65  
66 =head1 SYNOPSIS
67  
68 use Curses::UI;
69 my $cui = new Curses::UI;
70 my $win = $cui->add('window_id', 'Window');
71  
72 my $textviewer = $win->add(
73 'mytextviewer', 'TextViewer',
74 -text => "Hello, world!\n"
75 . "Goodbye, world!"
76 );
77  
78 $textviewer->focus();
79  
80  
81 =head1 DESCRIPTION
82  
83 Curses::UI::TextViewer is a widget that can be used
84 to create a textviewer widget. This class is
85 derived from Curses::UI::TextEditor. The
86 only special thing about this class is that the
87 B<-readonly> option is forced to a true value.
88 So for the usage of Curses::UI::TextViewer see
89 L<Curses::UI::TextEditor|Curses::UI::TextEditor>.
90  
91  
92  
93  
94 =head1 SEE ALSO
95  
96 L<Curses::UI|Curses::UI>,
97 L<Curses::UI::TextEditor|Curses::UI::TextEditor>,
98  
99  
100  
101  
102 =head1 AUTHOR
103  
104 Copyright (c) 2001-2002 Maurice Makaay. All rights reserved.
105  
106 Maintained by Marcus Thiesen (marcus@cpan.thiesenweb.de)
107  
108  
109 This package is free software and is provided "as is" without express
110 or implied warranty. It may be used, redistributed and/or modified
111 under the same terms as perl itself.
112  
« blib/lib/Curses/UI/PasswordEntry.pm ↑ Summary blib/lib/Curses/UI/Checkbox.pm »