#pragma once

namespace SOUI
{

#define EVT_TABTYPE_CONTROL (SOUI::EVT_EXTERNAL_BEGIN + 400)

	class EventTabtypeControl : public TplEventArgs<EventTabtypeControl>
	{
		SOUI_CLASS_NAME(EventTabtypeControl, L"on_tabtype_constrol")
	public:
		EventTabtypeControl(SOUI::SWindow* pSender) : TplEventArgs<EventTabtypeControl>(pSender)
		{

		}
		enum { EventID = EVT_TABTYPE_CONTROL };

		INT nIndex;
	};


	class StabtypeControl : public SWindow
	{

		SOUI_CLASS_NAME(StabtypeControl, L"tabtypecontrol")

	public:
		StabtypeControl();
		virtual ~StabtypeControl();
		void DestroyWindowcon();

		void ItemCreateChildren(int id, SStringW title, bool checked);

	protected:
		// 创建控件：初始化 xml，绑定事件等等
		int OnCreate(LPCREATESTRUCT lpCreateStruct);

		
 
		// 处理控件 xml 属性
		SOUI_ATTRS_BEGIN()
			SOUI_ATTRS_END()

			// 响应控件窗口消息
			SOUI_MSG_MAP_BEGIN()
			MSG_WM_CREATE(OnCreate)
			SOUI_MSG_MAP_END()
	private:
		bool OnBtnClick(SOUI::EventArgs* pEvt);

	};

}