home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Elysian Archive
/
AmigaElysianArchive.iso
/
prog
/
c
/
precg105.lha
/
source
/
Valuator.c
< prev
next >
Wrap
C/C++ Source or Header
|
1992-12-24
|
1KB
|
76 lines
/* ==========================================================================
**
** Valuator.c
**
** ©1991 WILLISoft
**
** ==========================================================================
*/
#include "Valuator.h"
#include "ValuatorClass.h"
#include <proto/exec.h>
#include <proto/intuition.h>
#include <proto/graphics.h>
#include "amigamem.h"
LONG Value( Valuator *self )
{
struct ValuatorClass *class;
if (class = (struct ValuatorClass *) self->isa)
{
if (class->Value)
return (*class->Value)( self );
}
else
return 0;
}
LONG SetValue( Valuator *self, LONG selection )
{
struct ValuatorClass *class;
if (class = (struct ValuatorClass *) self->isa)
{
if (class->SetValue)
return (*class->SetValue)( self, selection );
}
else
return 0;
}
BOOL Valuator_elaborated = FALSE;
struct ValuatorClass Valuator_Class;
void ValuatorClass_Init( struct ValuatorClass *class )
{
InteractorClass_Init( (struct InteractorClass *) class );
class->isa = InteractorClass();
class->ClassName = "Valuator";
class->Value = NULL;
class->SetValue = NULL;
}
struct ValuatorClass *ValuatorClass( void )
{
if (! Valuator_elaborated)
{
ValuatorClass_Init( &Valuator_Class );
Valuator_elaborated = TRUE;
}
return &Valuator_Class;
}
void Valuator_Init( Valuator *self )
{
Interactor_Init( self );
}