#ifndef _TK_WRAP_OPTION_H_
#define _TK_WRAP_OPTION_H_

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

using namespace std;

/**
 * \brief Specifies how to handle lines in the text that are too long to be displayed in a single line of the text's window.
 *
 * The value must be none or char or word. A wrap mode of none means that each
 * line of text appears as exactly one line on the screen; extra characters
 * that don't fit on the screen are not displayed. In the other modes each
 * line of text will be broken up into several screen lines if necessary to keep
 * all the characters visible. In char mode a screen line break may occur after
 * any character; in word mode a line break will only be made at word boundaries. 
 * 
 * \date 01-13-2006
 *
 * \author Ondrej Svejdar
 *
 * \todo 
 *
 * \bug 
 *
 */
class TkWrapOption:public TkEnumOption
{
public:
	static TXmlObject* newObject()
	{
		return new TkWrapOption(0);
	}

	static const char* E_CHAR;
	static const char* E_NONE;
	static const char* E_WORD;

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

	/// C++ representation of this enumeration
	typedef enum opts
	{
		/// wrap exactly at character
		wrap_char	=0,
		/// no text wrap
		wrap_none	=1,
		/// word wouldn't be broken
		wrap_word	=2
	};

	const char* getType() const;
	
	/**
	 * ctor
	 * \param value One of following : "char","none","word"
	 * or you can use static const members of TkWrapOption :
	 * E_CHAR, E_NONE, E_WORD
	 */
	inline TkWrapOption(const char* value):TkEnumOption(value,enums)
	{
	}

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

#endif/*_TK_WRAP_OPTION_H_*/
