#ifndef _BASE_OPTION_H_
#define _BASE_OPTION_H_

#include "../../../txmlobject.h"
#include <tcl.h>

class TkBase;

class TkBaseOption:public TXmlObject
{
protected:
	TkBase* widget;
public:
	static const char* type;
	bool hasParent(const char* className) const;

	TkBaseOption():widget(0)
	{
	}
	virtual void fromObject(Tcl_Obj* obj)=0;
	void fromStr(const string& value)
	{
		Tcl_Obj* obj=Tcl_NewStringObj(value.c_str(),(int)value.size());
		fromObject(obj);
	}
	void setWidget(TkBase* widget)
	{
		this->widget=widget;
	}
};


#endif/*_BASE_OPTION_H_*/
