/* -----------------------------------------------------------------------------
	GSFramework
	Copyright 2001-2013 Emmanuel Julien. All Rights Reserved.
----------------------------------------------------------------------------- */


#ifndef	__NWIDGETSIZER__
#define	__NWIDGETSIZER__


		#include "ui/widget.h"


namespace GS {
	namespace S2D {

/*!
	@short	Sizer widget.
	@author	Emmanuel Julien (ejulien@nworks.fr)
*/
struct	SizerWidget : public Widget
{
virtual	void		Invalidate();

		Widget		*Add(Widget *widget);
		bool		Remove(Widget *widget) { return children.Remove(widget); }

		SizerWidget(int id = -1) : Widget(id) { type = WidgetTypeSizer; }
};

struct	HSizerWidget : public SizerWidget
{
virtual	void		Refresh();
virtual	void		Compose(Picture &output, const iRect &out_rect);

		void		SetColumnSize(int size);

		HSizerWidget(int id = -1) : SizerWidget(id) { type = WidgetTypeHSizer; }
};

struct	VSizerWidget : public SizerWidget
{
virtual	void		Refresh();
virtual	void		Compose(Picture &output, const iRect &out_rect);

		VSizerWidget(int id = -1) : SizerWidget(id) { type = WidgetTypeVSizer; }
};

	} // S2D
} // GS


#endif	// __NWIDGETSIZER__
