aboutsummaryrefslogtreecommitdiff
path: root/Src/Wasabi/api/wnd/wndclass/SelItemList.h
blob: f17a1511ba3092f7d3c744b2b3a70b2e24c8cd0d (plain) (blame)
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
#ifndef NULLSOFT_SELITEMLISTH
#define NULLSOFT_SELITEMLISTH

class ListWnd;

#define SELITEMEXPAND 2040

//note to whoever redid this as a bitlist
// a) this is pointlessly slow as a bitlist given the memory used
// b) perhaps you should investigate bitlist.h
class SelItemList
{
public:
  SelItemList(ListWnd *parent);

  void setSelected(int pos, int selected, int cb=1);
  int isSelected(int pos);
  int getNumSelected();

  void deleteByPos(int pos);
protected:
friend ListWnd;
  void deselectAll();

private:
  ListWnd *listwnd;
  MemBlock<char> list;
  int num_selected;
};

#endif