home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
tv20cpp.zip
/
src
/
TCheckBoxes.cpp
< prev
next >
Wrap
C/C++ Source or Header
|
1998-01-19
|
663b
|
43 lines
/*
* TCheckBoxes.cc
*
* Turbo Vision - Version 2.0
*
* Copyright (c) 1994 by Borland International
* All Rights Reserved.
*
* Modified by Sergio Sigala <ssigala@globalnet.it>
*/
#define Uses_TCheckBoxes
#include <tvision/tv.h>
void TCheckBoxes::draw()
{
drawMultiBox( button, " X" );
}
Boolean TCheckBoxes::mark(int item)
{
return Boolean( (value & (1 << item)) != 0 );
}
void TCheckBoxes::press(int item)
{
value = value^(1 << item);
}
#if !defined(NO_STREAMABLE)
TStreamable *TCheckBoxes::build()
{
return new TCheckBoxes( streamableInit );
}
TCheckBoxes::TCheckBoxes( StreamableInit ) : TCluster( streamableInit )
{
}
#endif