#pragma once

#include <menu/item.qh>

CLASS(Container, MenuItem)
	METHOD(Container, draw, void(entity));
	METHOD(Container, keyUp, float(entity, float, float, float));
	METHOD(Container, keyDown, float(entity, float, float, float));
	METHOD(Container, mouseMove, float(entity, vector));
	METHOD(Container, mousePress, bool(Container this, vector pos));
	METHOD(Container, mouseDrag, float(entity, vector));
	METHOD(Container, mouseRelease, float(entity, vector));
	METHOD(Container, focusLeave, void(entity));
	METHOD(Container, resizeNotify, void(entity, vector, vector, vector, vector));
	METHOD(Container, resizeNotifyLie, void(entity, vector, vector, vector, vector, .vector, .vector, .vector));
	METHOD(Container, addItem, void(entity, entity, vector, vector, float));
	METHOD(Container, addItemCentered, void(entity, entity, vector, float));
	METHOD(Container, addItemRightCentered, void(entity, entity, vector, float));
	METHOD(Container, moveItemAfter, void(entity, entity, entity));
	METHOD(Container, removeItem, void(entity, entity));
	METHOD(Container, setFocus, void(entity, entity));
	METHOD(Container, saveFocus, void(entity));
	METHOD(Container, setAlphaOf, void(entity, entity, float));
	METHOD(Container, itemFromPoint, entity(entity, vector));
	METHOD(Container, showNotify, void(entity));
	METHOD(Container, hideNotify, void(entity));
	METHOD(Container, preferredFocusedGrandChild, entity(entity));
	ATTRIB(Container, focusable, bool, false);
	ATTRIB(Container, firstChild, entity);
	ATTRIB(Container, lastChild, entity);
	ATTRIB(Container, focusedChild, entity);
	ATTRIB(Container, savedFocus, entity);
	ATTRIB(Container, shown, bool, false);

	METHOD(Container, enterSubitem, void(entity, entity));
	METHOD(Container, enterLieSubitem, void(entity, vector, vector, vector, float));
	METHOD(Container, leaveSubitem, void(entity));
ENDCLASS(Container)

.entity nextSibling;
.entity prevSibling;
.float resized;
.vector Container_origin;
.vector Container_size;
.vector Container_fontscale;
.float Container_alpha;
.vector Container_save_shift;
.vector Container_save_scale;
.vector Container_save_fontscale;
.float Container_save_alpha;
