#ifndef PILISTX_H_SEEN
#define PILISTX_H_SEEN

#include "pilistgen.h"

class PIListX : public PIListGen {
public:
	             PIListX(PIContainerGen* par, char* nom,
                             int sx=100, int sy=100, int px=0, int py=0);
	             ~PIListX();
				   
  virtual void	     AppendItem(const char * item, PIMessage msg);
  virtual void       DeleteItem(const char *item);
  virtual void       DeleteItemMsg(PIMessage msg);

  virtual void       SetMultipleSelect(bool ms=false);

  virtual int        GetNbSelection();
  virtual PIMessage  GetSelection(int num=0);
  virtual string     GetSelectionStr(int num=0);

  virtual void       SelectItem(const char * item);
  virtual void       SelectItemMsg(PIMessage msg);
  virtual void       ClearSelItem(const char * item);
  virtual void       ClearSelItemMsg(PIMessage msg);

// Mis en public pour Callback Xt
  virtual void       ToggleSel(int n, bool smg=false);

protected:
  PIMessage          ItemMsg(int n);
  char *             ItemStr(int n);
  int                GetNumItem(const char * nom);
  int                GetNumItemMsg(PIMessage msg);
  void               DelItem(int n);
  bool               SelItem(int n, bool smg=false, bool cxw=false);
  bool               ClrSItem(int n, bool smg=false, bool cxw=false);

int mNItem, mNItemMax;
PIMessage * mMess;
bool * mSel;
int mNbSel, mNSelMax;
int * mSelNum;
bool mMultSel;
char mSItem[320];

SysDWdg mlist;
};

typedef PIListX        PIList;

#endif
