#ifndef PIOPTMENX_H_SEEN
#define PIOPTMENX_H_SEEN

#include "pisysdep.h"
#include "pioptmenugen.h"
#include PISTDWDG_H

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

  virtual void	    FinishCreate(); 

  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   
  inline  GC        myGC() {if (mgc == 0) createmygc();  return(mgc); }  

protected:
  string   mStext;
  PIMessage mSmsg;
//  SysDWdg mLabel;
  GC mgc;
  void              createmygc();
};


typedef PIOptMenuX  PIOptMenu ;

#endif
