#pragma once

#include "../Base.h"
#include "../Font.h"
#include <Widgets/Panel/PanelBlueprint.h>
#include "Placeholder.h"

namespace gorgon { namespace widgets {

	class PanelElement;

	PanelElement *LoadPanelElement(Base *parent, File &file, std::istream &in, int Size);

	class PanelElement : public gge::widgets::panel::Blueprint::Element, public Base {
		friend PanelElement *LoadPanelElement(gorgon::Base *parent, File &file, std::istream &in, int Size);
	public:
		typedef gge::widgets::panel::Blueprint::Element parenttype;

		virtual GID::Type GetGID() const {
			return parenttype::GetGID();
		}

		virtual void Save(std::ostream &out);

		virtual void Prepare(gge::GGEMain &main, File &file);

		using gorgon::Base::Subitems;

	};



	class Panel;

	Panel *LoadPanel(Base *parent, File &file, std::istream &in, int Size);

	class Panel : public gge::widgets::panel::Blueprint, public Base {
		friend 	Panel *LoadPanel(gorgon::Base *parent, File &file, std::istream &in, int Size);
	public:
		Panel() {
		}

		typedef gge::widgets::panel::Blueprint parenttype;

		virtual GID::Type GetGID() const {
			return parenttype::GetGID();
		}

		virtual void Save(std::ostream &out);

		virtual void Prepare(gge::GGEMain &main, File &file);

		using gorgon::Base::Subitems;
	};

}}
