GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  TERM::READLINE::ZOID::BASE (3)

.ds Aq ’

NAME

Term::ReadLine::Zoid::Base - atomic routines

CONTENTS

DESCRIPTION

This module contains some atomic operations used by all Term::ReadLine::Zoid objects. It is intended as a base class.

At the very least, to child class needs to define a default() function to handle key bindings and a draw() function which in turn calls print(). Also the attributes IN and OUT should contain valid filehandles.

METHODS

    ANSI stuff

cursor_at($x, $y) Positions the cursor on screen, dimensions are 1-based.
clear_screen() Clear screen.
title($string) Set terminal title to $string. When using for example xterm(1) this is the window name.
print_length($string) Returns the printable length of $string, not counting (some) ansi sequences.

    Private api

Methods for use in overload classes. Avoid using these methods from the application.
bell() Notify the user of an error or limit.
loop() Low level function used by readline. Calls draw() and do_key().
beat() Method called by intervals while waiting for input, to be overloaded.
read_key() Returns one key read from input (this is the named key, not the char when mapped).
do_key($key) Execute a key, calls subroutine for a key binding or the default binding. If $key is undefined read_key() is called first.
press($string) Do chars in $string like they were typed on the keyboard. Used for testing puposes and to make macros possible.

If you give more then one argument, these are considered individual characters, use this to press named keys.

unread_key($string) Unshifts characters on the read buffer, arguments the same as press().
key_name($chr) Returns a name for a character or character sequence.
key_binding($key, $mode) Returns the keybinding for $key in $mode, mode defaults to the current one.
bindchr($chr, $key) Bind a key name to a character, or a character sequence. All bindings of this kind are global (you’re using only one keyboard, right ?).
recalc_chr_map() Recalculates the chr map, you need to call this after deleting from %chr_names.
print($lines, $pos) Low level function used by draw. Both arguments need to be array references.

BUGS

Undefined behaviour when the buffer has more lines then the terminal.

Please mail the author if you find any other bugs.

AUTHOR

Jaap Karssenberg || Pardus [Larus] <pardus@cpan.org>

Copyright (c) 2004 Jaap G Karssenberg. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

Term::ReadLine::Zoid
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 TERM::READLINE::ZOID::BASE (3) 2016-03-17

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.