#ifndef PIOPTMENX_H_SEEN
#define PIOPTMENX_H_SEEN

#include "pisysdep.h"
#include <list>
#include "pioptmenugen.h"

#include PISTDWDG_H

class PIOptMenuX : public PIOptMenuGen {
public:
	            PIOptMenuX(PIContainerGen* par, const char* nom, int sx=50, int sy=15, int px=0, int py=0);
	            ~PIOptMenuX();

  virtual void	    FinishCreate(); 

  virtual void      AppendPDMenu(PIMenu* pdm);

  virtual void      Process(PIMessage msg, PIMsgHandler* sender, void* data=NULL);
				   
  virtual string    GetValueStr() { return(mStext); }
  virtual PIMessage GetValue()    { return(mSmsg); } 
  virtual void      SetValueStr(string & s);
  virtual void      SetValue(PIMessage msg);


//  Pour utilisation privee dans call-back, .... 
  virtual void       SetLabel(string const&);
  inline  GC        myGC() {if (mgc == 0) createmygc();  return(mgc); }  

protected:
  string   mStext;
  PIMessage mSmsg;
  list<PIMenu*> mPDMList;
//  SysDWdg mLabel;
  GC mgc;
  void              createmygc();
};


typedef PIOptMenuX  PIOptMenu ;

#endif
