#ifndef _TK_STATE_OPTION_H_
#define _TK_STATE_OPTION_H_

#include "tk_enumoption.h"
#include <string>

using namespace std;

/**
 * \brief TkStateOption represent two basic states of widget, that is normal or disabled.
 *
 * States: \n
 * normal - Basic state. \n
 * disabled - Widget is grayed, entering value is forbidden, widget cannot get focus. \n
 * \date 01-13-2006
 *
 * \author Ondrej Svejdar
 *
 * \todo 
 *
 * \bug 
 *
 */
class TkStateOption:public TkEnumOption
{
public:
	static TXmlObject* newObject()
	{
		return new TkStateOption(0);
	}

	static const char* E_NORMAL;
	static const char* E_DISABLED;

	static const char* type;
	static const char* enums[];

	/// C++ representation of this enumeration
	typedef enum opts
	{
		/// basic state
		normal	=0,
		/// widget is grayed
		disabled=1
	};

	const char* getType() const;

	/**
	 * ctor
	 * \param value One of following : "normal","disabled"
	 * or you can use static const members of TkStateOption :
	 * E_NORMAL, E_DISABLED
	 */
	inline TkStateOption(const char* value):TkEnumOption(value,enums)
	{
	}

	/**
	 * ctor, use this constructor if you can, because it is faster
	 * \param value One of following : normal, disabled
	 */
	inline TkStateOption(opts value):TkEnumOption((int)value,enums)
	{
	}
};

#endif/*_TK_STATE_OPTION_H_*/
