Curses-Simp
view release on metacpan or search on metacpan
NAME
Curses::Simp - Curses Not Quite Simple
VERSION
This documentation refers to version 1.4.A8UG1gG of Curses::Simp, which
was released on Mon Aug 30 16:01:42:16 2010.
SYNOPSIS
use Curses::Simp;
my @text; my $keey = '';
my $simp = tie(@text, 'Curses::Simp');
@text =('1337', 'nachoz', 'w/', 'cheese' x 7);
while($keey ne 'x'){ # wait for 'x' to eXit
$keey = $simp->GetKey(-1); # get a blocking keypress
push(@text, $keey);
}
DESCRIPTION
Curses::Simp provides a curt mechanism for updating a console screen
with any Perl array (or multiple arrays to include color codes). Most
key events can be obtained and tested directly. The goal was ease-of-use
for the common cases first and efficient rendering second.
2DU
- mk proper scrollbars for all objects && use in Brws: view
- Brws: mk togl to pack files left && right in view
- mk ~/.simprc to save CPik && Brws cfg, OVERMAPP, etc.
- CPik: rewrite BildBlox to scale style to window dims if !flagshrk &&
mk sure no forg or bakg works for all styles... also add options for
only name or number options or common grid size defaults
- CPik: add styles to pick fgcl,bgcl color code at once
- 4NT: work on recognizing more keys the same as Curses (&& then SDL)
- 4NT: write custom window support? mk Mesg at least wrap MSGBOX
- describe Simp objects sharing apps (ptok above pmix) mk OScr read Simp
apps @_ param list && auto-handle --geom wxh+x+y
- Prmt: mk new 'cbls' type: as a ckbx list && use in BrwsCnfg
- Prmt: mk new 'rdls' type: as a radio list w/ auto (*) -
- Mesg: mk new 'slid' type: params for all overlay text, chars, ticks,
flags, etc. && updt pmix to use... maybe register sub fields,dims...
- Prnt: add multi-line option where text can split on /\n/ but each new
line prints relative to starting xcrs
- Prmt: add multi-line option where dtxt can split on /\n/ && ^d accepts
entry instead of RETURN
- Prnt: handle ASCII chars under 32 with escapes like Draw
- Draw: optimize rendering
- Prnt&&Draw: handle ASCII chars under 32 better than current escapes
- mk 'ceol' && 'ceos' params to clear text[n] from cursor on
- consider breaking sub (CPik|Brws|.+?) into own Curses::Simp::$1.pm
instead of letting Simp.pm remain so cluttered
if detectable:
- handle xterm resize events
- handle mouse input (study any existent Curses apps that use mouse
input you can find ... probably in C), read man for gpm(1), sysmouse(4),
&& sb(4) && study aumix mouse source
- Learn how to read a Shift-Tab key press if in any way distinguishable
from Tab/Ctrl-I
- What else does Simp need?
WHY?
Curses::Simp was created because I could hardly find documentation or
examples of Curses usage so I fiddled until I could wrap the most
important behaviors in names and enhanced functions.
USAGE
new() - Curses::Simp object constructor
new() opens a new Curses screen if one does not exist already and
initializes useful default screen, color, and keys settings. The created
Curses screen is automatically closed on program exit.
Available object methods are described in detail below. Each of the
following four letter abbreviated or verbose method names can be used as
initialization parameters to new():
Key or VerboseName => Default Value
----- ------------- ---------------
'text' or 'TextData' => [ ]
'fclr' or 'ForegroundColorData' => [ ]
'bclr' or 'BackgroundColorData' => [ ]
'kque' or 'KeyQueue' => [ ]
'mque' or 'KeyModQueue' => [ ]
'hite' or 'WindowHeight' => 0
'widt' or 'WindowWidth' => 0
'yoff' or 'WindowYOffset' => 0
'xoff' or 'WindowXOffset' => 0
'ycrs' or 'CursorYOffset' => 0
'xcrs' or 'CursorXOffset' => 0
'btyp' or 'WindowBorderType' => 0
'brfc' or 'WindowBorderForegroundColor'=> 'w'
'brbc' or 'WindowBorderBackgroundColor'=> 'k'
'titl' or 'WindowTitle' => ''
'ttfc' or 'WindowTitleForegroundColor' => 'W'
'ttbc' or 'WindowTitleBackgroundColor' => 'k'
'dndx' or 'DisplayStackIndex' => 0
'flagaudr' or 'FlagAutoDraw' => 1
'flagadtf' or 'FlagAutoDrawTiedForegroundData' => 1
( run in 0.980 second using v1.01-cache-2.11-cpan-39bf76dae61 )