|
| 1 | +#!/usr/bin/perl |
| 2 | + |
| 3 | +use strict; |
| 4 | +use warnings; |
| 5 | +use utf8; |
| 6 | + |
| 7 | +#use Win32::Console::ANSI; |
| 8 | +use Curses::UI; |
| 9 | + |
| 10 | +#use Term::ANSIMenu; |
| 11 | +# |
| 12 | +#my $menu = Term::ANSIMenu->new( |
| 13 | +# width => 40, |
| 14 | +# help => [['', \&standard_help], |
| 15 | +# ['hint 1', \&help_item], |
| 16 | +# [ undef, \&standard_help], |
| 17 | +# ['hint 3', undef] |
| 18 | +# ], |
| 19 | +# title => 'title', |
| 20 | +# items => [ |
| 21 | +# ['1', 'First menu item', \&exec_item], |
| 22 | +# ['2', 'This string is just too long to fit in a normal terminal and thus it will be clipped.'], |
| 23 | +# ['3', '', sub { system "man man" }] |
| 24 | +# ], |
| 25 | +# status => 'status', |
| 26 | +# prompt => 'prompt: '); |
| 27 | +# |
| 28 | +#$menu->print_menu(); |
| 29 | +#while (my $key = $menu->read_key()) { |
| 30 | +# last unless defined $menu->do_key($key); |
| 31 | +# $menu->update_status('') if $key eq 'S'; |
| 32 | +# $menu->update_status('New status') if $key eq 's'; |
| 33 | +# $menu->update_prompt('') if $key eq 'P'; |
| 34 | +# $menu->update_prompt('New prompt: ') if $key eq 'p'; |
| 35 | +#} |
| 36 | +#$menu->pos($menu->line_after_menu() + 1, 1); |
| 37 | + |
| 38 | +#---------------------------------------------------------------------------- |
| 39 | +#use Term::ANSIColor; |
| 40 | +#print color 'bold blue'; |
| 41 | +#print "This text is bold blue.\n"; |
| 42 | +#print color 'reset'; |
| 43 | +#print "This text is normal.\n"; |
| 44 | +#print colored ("Bold yellow on magenta.\n", 'bold yellow on_magenta'); |
| 45 | +#print "This text is normal.\n"; |
| 46 | +#---------------------------------------------------------------------------- |
| 47 | +#use Term::ANSIScreen qw/:color :cursor :screen/; |
| 48 | +#locate 1, 1; print "@ This is (1,1)", savepos; |
| 49 | +#print locate(24,60), "@ This is (24,60)"; loadpos; |
| 50 | +#print down(2), clline, "@ This is (3,16)\n"; |
| 51 | +#color 'black on white'; clline; |
| 52 | +#print "This line is black on white.\n"; |
| 53 | +#print color 'reset'; print "This text is normal.\n"; |
| 54 | +#print colored ("This text is bold blue.\n", 'bold blue'); |
| 55 | +#print "This text is normal.\n"; |
| 56 | +#print colored ['bold blue'], "This text is bold blue.\n"; |
| 57 | +#print "This text is normal.\n"; |
0 commit comments