Tk::Reindex man page on HP-UX

Man page or keyword search:  
man Server   10987 pages
apropos Keyword Search (all sections)
Output format
HP-UX logo
[printable version]

Reindex(3)		     perl/Tk Documentation		    Reindex(3)

NAME
       Tk::Reindex - change the base index of Text-like widgets

SYNOPSIS
	   use Tk::ReindexedText;
	   $t1=$w->ReindexedText(-linestart => 2);

	   use Tk::ReindexedROText;
	   $t2=$w->ReindexedROText(-linestart => 0);

DESCRIPTION
       Creates a new widget class based on Text-like widgets that can redefine
       the line number base (normally Text widgets start line numbers at 1),
       or possibly other manipulations on indexes.

STANDARD OPTIONS
       The newly-defined widget takes all the same options as the base widget,
       which defaults to Text.

WIDGET-SPECIFIC OPTIONS
Name:	lineStart
Class:	LineStart
Switch: -linestart
Sets the line number of the first line in the Text widget. The default -toin‐
dexcmd and -fromindexcmd use this configuration option.

-item Name:   toIndexCmd  fromIndexCmd

-item Class:  ToIndexCmd  FromIndexCmd

-item Switch: -toindexcmd -fromindexcmd

These two options specify callbacks that are called with a list of indexes and
are responsible for translating them to/from indexes that the base Text widget
can understand. The callback is passed the widget followed by a list of
indexes, and should return a list of translated indexes. -toindexcmd should
translate from 'user' indexes to 'native' Text-compatible indexes, and -fro‐
mindexcmd should translate from 'native' indexes to 'user' indexes.

The default callbacks simply add/subtract the offset given by the -linestart
option for all indexes in 'line.character' format.

It would probably be prudent to make these functions inverses of each other.

CLASS METHODS
import
To make new Reindex widgets, this function should be called via use with the
name of the Text-like base class that you are extending with "Reindex" capa‐
bility.	 'use base(Tk::Reindex Tk::nameofbasewidget)' should also be specified
for that widget.

BUGS
       I've used the word "indexes" instead of "indices" throughout the docu‐
       mentation.

       All the built-in perl code for widget bindings & methods will use the
       new 'user' indexes.  Which means all this index manipulation might
       might break code that is trying to parse/manipulate indexes. Or even
       assume that '1.0' is the beginning index.  Tk::Text::Contents comes to
       mind.

AUTHOR
       Andrew Allen <ada@fc.hp.com>

       This code may be distributed under the same conditions as Perl.

Tk1.1				  2003-07-20			    Reindex(3)
[top]

List of man pages available for HP-UX

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net