summaryrefslogtreecommitdiff
path: root/setedit/settvuti/include/tstrlbox.h
blob: e84b218989cac31a66e0399825dc5623101a6615 (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
/* Copyright (C) 1996,1997,1998,1999,2000 by Salvador E. Tropea (SET),
   see copyrigh file for details */
#if defined(Uses_TStringableListBox) && !defined(__TStringableListBox__)
#define __TStringableListBox__
class TRect;
class TScrollBar;
class TCollection;

typedef struct
{
 TStringable *items;
 ccIndex selection;
} TStringableListBoxRec;

class TStringableListBox : public TListViewer
{
public:
 TStringableListBox(const TRect& bounds, ushort aNumCols, TScrollBar *aScrollBar);
 TStringableListBox(const TRect& bounds, ushort aNumCols, TScrollBar *aHScrollBar,
                    TScrollBar *aVScrollBar, Boolean aCenterOps=False);
 ~TStringableListBox();

 virtual uint32 dataSize();
 virtual void getData(void *rec);
 virtual void getText(char *dest, ccIndex item, short maxLen);
 virtual void newList(TStringable *aList);
 virtual void setData(void *rec);
 virtual void handleEvent(TEvent& event);
 void Update(void);

 Boolean center;

 TStringable *list();

protected: // Why if protected is enough the idiots of Borland used private?
 TStringable *items;
};

inline TStringable *TStringableListBox::list()
{
 return items;
}
#endif