#ifndef _TOUCH_KBD_H_
#define _TOUCH_KBD_H_

class TouchKeyboard : public LDialog
{
public:
	enum KbdMode
	{
		KbdFull,
		KbdNumbers,
	};

	enum KbdView
	{
		EnterLetters,
		EnterNumbersAndPunctuation,
		EnterSymbols,
	};
	
	enum KbdFlags
	{
		KfNone			= 0x0,
		KfDark			= 0x1,
		KfRightAlign	= 0x2
	};

protected:
	struct TouchKeyboardPriv *d;

	void CreateView(KbdView v);
	LButton *CreateBtn(int id, int &x, int y, const char *btn = NULL, int flags = KfNone);
	LButton *CreateBtn(int id, int &x, int y, const char16 *btn, int flags = KfNone);
	void CreateBtnRow(int &x, int y, const char *btns);
	void CreateBtnRow(int &x, int y, const char16 *btns);

public:
	const char *GetClass() { return "TouchKeyboard"; }
	
	TouchKeyboard(const char *ResourcePath, KbdMode m = KbdFull);
	~TouchKeyboard();
	
	void OnPosChange();
	void OnPaint(LSurface *pDC);
	int OnNotify(LViewI *Ctrl, LNotification n);
	
	// Impl
	const char *Name() override;
	bool Name(const char *s);
	const char16 *NameW();
	bool NameW(const char16 *s);
	int64 Value();
	void Value(int64 i);
};

#endif