#ifndef FGUI_WIDGET_PARENT_HEADER
#define FGUI_WIDGET_PARENT_HEADER




//#include <allegro_flare/display.h>
//#include <allegro_flare/screen.h>
//#include <allegro_flare/font_bin.h>
#include <flare_gui/widget.h>
#include <deque>



class FGUIParent : public FGUIWidget
{
public:
	bool mouse_blocked;
	std::deque<FGUIWidget *> children;

	FGUIParent(FGUIParent *parent, FGUICollisionArea *collision_area);
	~FGUIParent(); //?


	// widget management
	void attach_widget(FGUIWidget *widget);
	void detach_widget(FGUIWidget *widget);
	bool delete_child(FGUIWidget *child);

	// widget communication
	virtual void receive_message(std::string message);


	// if the use wishes to overload these, be sure to call
	// these functions in this class as well.
	// (I'm not sure exactly what the correct usage for
	// overloading/ignoring these functions should be)
	void draw_func();
	void primary_timer_func();
	void mouse_axes_func(float mx, float my, float mdx, float mdy);
	void mouse_down_func();
	void mouse_up_func();
	void key_down_func();
	void key_up_func();
	void key_char_func();

	// these are used
	//void on_focus(); //<< this should only be in the FGUIWidget, not the FGUIParent

	bool set_focus_to(FGUIWidget *child);
	bool has_child(FGUIWidget *widget);
};









#endif