The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
</R>Purpose<!R>
The Cdk Entry widget allows the user to type in input within a widget. The 
entry field has a solid basis of editing features.

</R>Construction Options<!R>
A entry widget is defined using the following syntax. The variable
</B>$entryObject<!B> contains the reference to the entry object.
$entryObject = new Cdk::Entry ( options );
 
The options are defined in the following table.

</U>Option      Default Value       Type       Purpose<!U>
Label       Required            Scalar     The label of the entry field.
Max         Required            Scalar     The maximum length of the value entered.
Min         0                   Scalar     The minimum length of the value entered.
Width       Required            Scalar     The width of the field on the screen.
Filler      .                   Scalar     The default field character.
Fillattr    Normal              Scalar     The attribute of the filler character.
Dtype       Mixed               Scalar     The display type. (See Display Help)
Xpos        Center              Scalar     This is the position of the window on the X axis.
Ypos        Center              Scalar     This is the position of the window on the Y axis.
Lpos        Left                Scalar     This is the position of the label in the window.
Fieldattr   Normal              Scalar     The attribute of the characters typed in.
Box         True                Scalar     This Boolean states whether the dialog box will have a box drawn around it.
Shadow      False               Scalar     This Boolean states whether the dialog box will have a shadow on the box.

</R>Available Methods<!R>
</B>activate<!B>
Activation of an object means to make the object available for use. The
following example demonstrates how to activate a entry widget.
$returnValue = $entryObject->activate ();

The variable </B>$returnValue<!B> contains a scalar value of what was typed into
the entry field.

The variable </B>$returnValue<!B> 
</B>set<!B>
Sets or resets certain attributes or features of the widget. The following
demonstrates how to call the set method from the entry field.
$entryObject->set ( options );

The options are defined in the following table.

</U>Option      Default Value       Type       Purpose<!U>
Value       Required            Scalar      Sets the value of the entry field.
Min         Required            Scalar      Sets the size of the minimum length of the information typed in.
Max         Same as set value   Scalar      Sets the size of the maximum length of the information typed in.
Box         True                Scalar      Changes the current value of the box flag.

</B>bind<!B>
The bind method binds keys to events. The binding is specific to the individual
objects. The following example demonstrates how to call the bind method.
$entryObject->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.
$entryObject->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.
$entryObject->erase ();

</B>clean<!B>
This method cleans the information from inside the entry object. The following
example demonstrates how to call the clean method.
$entryObject->clean();

</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.
$entryObject->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.
$entryObject->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.
$entryObject->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.
$entryObject->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.
$entryObject->getwin();

</R>Default Key Bindings<!R>
</U>Key               Action<!U>
Left Arrow        Moves the cursor one character to the left.
Right Arrow       Moves the cursor one character to the right.
Delete            Deletes the character to the left of the cursor.
Backspace         Deletes the character to the left of the cursor.
Return            Returns the current information in the field and exits the widget.
Tab               Returns the current information in the field and exits the widget.
CTRL-N            Returns the current information in the field and exits the widget.
CTRL-R            Refreshes the screen.

</R>Tips & Tricks<!R>
<B=*>The label can be put on the left, right, top or bottom of the field, allowing for a more dynamic placement of the label itself.
<B=*>Setting the Dtype variable to a hidden type creates an entry field suitable for a password.

</R>Physical Restrictions<!R>
None.

</R>Example Use Of The Widget<!R>

#!/usr/local/bin/perl

# Set up Cdk
use Cdk;
Cdk::init();

# Create a new entry object.
my $filename = new Cdk::Entry ('Label' => "Filename ",
				'Width' => 20,
				'Min' => 0,
				'Max' => 256);

# Activate the object.
my $file = $filename->activate();

# Exit Cdk.
Cdk::end();

# Print out the results.
print "\n\n\n\n";
print "You typed: <$file>\n";
<C><#HL(70)>
                       Document Created: June, 1995
                       Document Revised: November, 1995
                       Document Revised: March, 1996