Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

tk::reindex(3pm) [debian man page]

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

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 -toindexcmd 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 -fromindexcmd 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" capability. '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 documentation. 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 2010-05-29 Reindex(3pm)

Check Out this Related Man Page

XmCreateScrolledText(library call)										XmCreateScrolledText(library call)

NAME
XmCreateScrolledText -- The Text ScrolledText convenience creation function SYNOPSIS
#include <Xm/Text.h> Widget XmCreateScrolledText( Widget parent, String name, ArgList arglist, Cardinal argcount); DESCRIPTION
XmCreateScrolledText creates an instance of a Text widget that is contained within a ScrolledWindow. The ScrolledWindow parent is created managed. All ScrolledWindow subarea widgets are automatically created by this function. The ID returned by this function is that of the Text widget (not the ScrolledWindow widget). Use this widget ID for all operations on the Text widget. Use the widget ID of the Text wid- get's parent for all operations on the ScrolledWindow. To obtain the ID of the ScrolledWindow widget associated with the Text widget, use the Xt Intrinsics XtParent function. The name of the ScrolledWindow created by this function is formed by concatenating the letters SW onto the end of the name specified in the parameter list. The Text widget defaults to single-line text edit; therefore, no ScrollBars are displayed. The Text resource XmNeditMode must be set to XmMULTI_LINE_EDIT to display the ScrollBars. Since the results of placing a Text widget inside a ScrolledWindow when the Text's XmNedit- Mode is XmSINGLE_LINE_EDIT are undefined, XmCreateScrolledText sets XmNeditMode to XmMULTI_LINE_EDIT. Note that Motif1.2 version of XmCre- ateScrolledText does not set XmNeditMode. All arguments to either the Text or the ScrolledWindow widget can be specified at creation time with this function. Changes to initial position and size are sent only to the ScrolledWindow widget. Other resources are sent to the Text or the ScrolledWindow widget as appro- priate. Note that the result of providing the XmNdestroyCallback resource in the creation arglist is unspecified. The application should use the XtAddCallback function to add callbacks to the appropriate widget (Text or ScrolledWindow) after creating it. This function forces the following initial values for ScrolledWindow resources: o XmNscrollingPolicy is set to XmAPPLICATION_DEFINED. o XmNvisualPolicy is set to XmVARIABLE. o XmNscrollBarDisplayPolicy is set to XmSTATIC. o XmNshadowThickness is set to 0 (zero). parent Specifies the parent widget ID name Specifies the name of the created widget arglist Specifies the argument list argcount Specifies the number of attribute/value pairs in the argument list (arglist) For a complete definition of Text and its associated resources, see XmText(3). RETURN
Returns the Text widget ID. RELATED
XmScrolledWindow(3) and XmText(3). XmCreateScrolledText(library call)
Man Page