summaryrefslogtreecommitdiff
path: root/rhtvision/include/tv/statsitm.h
blob: 26dc645671a199aa46ae0890957c2530557a972b (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
/*
 *      Turbo Vision - Version 2.0
 *
 *      Copyright (c) 1994 by Borland International
 *      All Rights Reserved.
 *

Modified by Robert H”hne to be used for RHIDE.
Modified by Salvador E. Tropea to allow dynamic status bars and i18n support.

 *
 *
 */

#if defined( Uses_TStatusItem ) && !defined( __TStatusItem )
#define __TStatusItem

class TStatusItem
{

public:

    TStatusItem( const char *aText,
                 ushort key,
                 ushort cmd,
                 TStatusItem *aNext = 0
                );
    ~TStatusItem() { DeleteArray((char *)text); TVIntl::freeSt(intlText); };

    TStatusItem *next;
    const char *text;
    stTVIntl *intlText;
    ushort keyCode;
    ushort command;

};

inline TStatusItem::TStatusItem( const char *aText,
                                 ushort key,
                                 ushort cmd,
                                 TStatusItem *aNext
                                ) :
    next( aNext ), keyCode( key ), command( cmd )
{
 // SET: If we don't allocate a copy is imposible to have dynamic status
 // lines loaded from disk files or other similar stuff. Or if we does it
 // we leak.
 text=newStr(aText);
 intlText=NULL;
}

#endif  // Uses_TStatusItem