Curses-Devkit
view release on metacpan or search on metacpan
GetWindow(object)
CDKRADIO * object
CODE:
{
RETVAL = object->win;
}
MODULE = Cdk PACKAGE = Cdk::Template
CDKTEMPLATE *
New(title,label,plate,overlay,xpos=CENTER,ypos=CENTER,Box=TRUE,shadow=FALSE)
SV * title
char * label
char * plate
char * overlay
int xpos = sv2int ($arg);
int ypos = sv2int ($arg);
int Box = sv2int ($arg);
int shadow = sv2int ($arg);
CODE:
{
CDKTEMPLATE * templateWidget = (CDKTEMPLATE *)NULL;
char Title[1000];
checkCdkInit();
MAKE_TITLE (title,Title);
templateWidget = newCDKTemplate (GCDKSCREEN,xpos,ypos,
Title,label,
plate,overlay,
Box,shadow);
/* Check the return type. */
if (templateWidget == (CDKTEMPLATE *)NULL)
{
croak ("Cdk::Template Could not create widget. Is the window too small?\n");
}
else
{
RETVAL = templateWidget;
Cdk/Cdk/Template.pm view on Meta::CPAN
my $type = shift;
my %params = @_;
my $self = {};
my $name = "${type}::new";
# Retain the type of the object.
$self->{'Type'} = $type;
# Set up the parameters passed in.
my $plate = Cdk::checkReq ($name, "Plate", $params{'Plate'});
my $overlay = Cdk::checkReq ($name, "Overlay", $params{'Overlay'});
my $title = Cdk::checkDef ($name, "Title", $params{'Title'}, "");
my $label = Cdk::checkDef ($name, "Label", $params{'Label'}, "");
my $xpos = Cdk::checkDef ($name, "Xpos", $params{'Xpos'}, "CENTER");
my $ypos = Cdk::checkDef ($name, "Ypos", $params{'Ypos'}, "CENTER");
my $box = Cdk::checkDef ($name, "Box", $params{'Box'}, "TRUE");
my $shadow = Cdk::checkDef ($name, "Shadow", $params{'Shadow'}, "FALSE");
# Create the thing.
$self->{'Me'} = Cdk::Template::New ($title, $label,
$plate, $overlay,
$xpos, $ypos,
$box, $shadow);
bless $self;
}
#
# This activates the object
#
sub activate
{
Cdk/Cdk/Template.pm view on Meta::CPAN
#
# This cleans the template info field.
#
sub clean
{
my $self = shift;
Cdk::Template::Clean ($self->{'Me'});
}
#
# This mixes the results with the overlay
#
sub mix
{
my $self = shift;
Cdk::Template::Mix ($self->{'Me'});
}
#
# This function raises the object.
#
fulldemo/help/template.help view on Meta::CPAN
x Mixed lower case characters.
Anything else. Used as plate information.
</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 template widget.
$returnValue = $templateObject->activate ();
The variable </B>$returnValue<!B> is the string value of what was typed in
the field. It does </U>not<!U> have the overlay characters mixed in with it.
This means that if a date field were used and the plate looked like
<C>##/##/####
and the overlay looked like
<C>DD-MM-YYYY
and the date June 1 1968 were typed in, then the resultant value would be
<C>01061968
To mix the field value and the overlay, call the mix method. Calling the mix
method on the above example would result in
<C>01-06-1968
</B>inject<!B>
This function injects a single character into the widget. The following
examples demonstrates how to call the inject method.
<C></B>$templateObject->inject ( options );
The options are defined in the following table.
</U>Option Default Value Type Purpose<!U>
fulldemo/help/template.help view on Meta::CPAN
</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.
$templateObject->erase ();
</B>mix<!B>
This method returns a mixed value of the template field value and the overlay.
The following example demonstrates how to call the mix method.
$mixedValue = $templateObject();
</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.
$templateObject->raise();
( run in 1.138 second using v1.01-cache-2.11-cpan-49f99fa48dc )