Curses-Devkit

 view release on metacpan or  search on metacpan

fulldemo/help/viewer.help  view on Meta::CPAN

<C></B>$viewerObject->bind ( options );

The options are defined in the following table.

</U>Option      Default Value       Type       Purpose<!U>
Key         Required            Scalar     This is the character to bind the event to.
Function    Required            Scalar     This is the name of the callback function.

</B>draw<!B>
This method draws the object on the screen. The following example demonstrates
how to call the draw method.
<C></B>$viewerObject->draw ( options );

The options are defined in the following table.

</U>Option      Default Value       Type       Purpose<!U>
Box         True                Scalar     Draws the window with a box around it.

</B>erase<!B>
This method removes the object from the screen. This does </B/U>NOT<!B!U> 
destroy the object. The following example demonstrates how to call the erase 
method.
<C></B>$viewerObject->erase ();

</B>raise<!B>
The raise method raises the widget to the top of the screen. This means if there
were any widgets obscuring part of the view, raising the object would bring the
complete object into view. The following example demonstrates how to call the 
raise method.
<C></B>$viewerObject->raise();

</B>lower<!B>
The lower method lowers the object so it doesn't obscure the view of any other 
objects. The following example demonstrates how to call the lower method.
<C></B>$viewerObject->lower();

</B>register<!B>
The register method registers the object to the default screen. This does </R>NOT<!R>
have to be called since the objects are registered automatically. This method
should be called if the </B>unregister<!B> method was called. The following
example demonstrates how to call the register method.
<C></B>$viewerObject->register();

</B>unregister<!B>
The unregister method should be called when a widget, which is part of the
default screen, needs to be taken away temporarily. This does not delete or free
the object, it just unmaps it from any future screen refreshes. The object can
be registered by calling the </B>register<!B> method. The following example
demonstrates how to call the unregister method.
<C></B>$viewerObject->unregister();

</B>getwin<!B>
This method returns a pointer to the window of the object. Not much use for this
yet. It will be useful in the future when the drawing methods are added. The
following example demonstrates how to call the getwin method.
<C></B>$viewerObject->getwin();

</R>Default Key Bindings<!R>
</U>Key               Action<!U>
Tab              Selects the next button.
Up Arrow         Moves the cursor to one line up.
Down Arrow       Moves the cursor to one line down.
Tab              Moves the cursor to one line down.
Right Arrow      Scrolls the view one character to the right.
Left Arrow       Scrolls the view list one character to the left.
Previous Page    Moves one screen backwards.
CTRL-B           Moves one screen backwards
Next Page        Moves one screen forwards.
Space            Moves one screen forwards.
CTRL-F           Moves one screen forwards.
g                Moves to the top of the viewer.
1                Moves to the top of the viewer.
G                Moves to the bottom of the viewer.
End              Scrolls complete viewer as far left as possible.
$                Scrolls complete viewer as far left as possible.
Home             Scrolls complete viewer as far right as possible.
|                Scrolls complete viewer as far right as possible.
L                Moves halfway to the bottom of the viewer.
l                Moves halfway to the top of the viewer.
?                Searches upwards for given text.
/                Searches downwards for given text.
n                Performs last search, in the same direction.
:                Jumps to a given line.
i                Displays information about the current file in viewer.
s                Displays information about the current file in viewer.
Return           Exits the widget and returns the current selection.
Tab              Exits the widget and returns the current selection.
Escape           Exits the widget and returns undef.
CTRL-R           Refreshes the screen.

</R>Tips & Tricks<!R>
None.

</R>Physical Restrictions<!R>
</U>Restriction                    Value<!U>
Maximum number of lines.        10000
Maximum number of buttons.      50

</R>Example Use Of The Widget<!R>
<F=../examples/viewer>
<C><#HL(70)>
<C>Document Created: June,     1995
<C>Document Revised: November, 1995
<C>Document Revised: March,    1996



( run in 1.035 second using v1.01-cache-2.11-cpan-39bf76dae61 )