blob: 0ee5e72c96ebcce81e9f7157b6d606ed91e9f9ce (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
/*
* TRadioButtons.cc
*
* Turbo Vision - Version 2.0
*
* Copyright (c) 1994 by Borland International
* All Rights Reserved.
*
* Modified by Sergio Sigala <sergio@sigala.it>
*/
#define Uses_TRadioButtons
#include <tvision/tv.h>
void TRadioButtons::draw()
{
drawMultiBox( button, " \x7" );
}
Boolean TRadioButtons::mark( int item )
{
return Boolean( item == (int)value );
}
void TRadioButtons::press( int item )
{
value = item;
}
void TRadioButtons::movedTo( int item )
{
value = item;
}
void TRadioButtons::setData( void * rec )
{
TCluster::setData(rec);
sel = (int)value;
}
#if !defined(NO_STREAMABLE)
TStreamable *TRadioButtons::build()
{
return new TRadioButtons( streamableInit );
}
TRadioButtons::TRadioButtons( StreamableInit ) : TCluster( streamableInit )
{
}
#endif
|