#pragma once
#include "skinnableframe.h"
#include "textbox.h"
#include "skinnablelistbox.h"

class PopupList :
	public SkinnableWindow
{
public:
	PopupList();
	~PopupList();

	int Create(HWND parent = 0);
	virtual void OnContentsChanged(WPARAM wParam, LPARAM lParam);
	virtual void OnTimer();
	virtual void OnClose();
	virtual void Redraw();
	virtual void OnMouseLeave();
	virtual void OnMouseEnter();
	void StartTimer();
	void StopTimer();
	void FitToContents();

	SkinnableListBox list;
	TitleBar titlebar;
	TitleBar subtitle;
	int TimeToHide;

	static PopupList * CurrentPopup; // the currently visible popup (there should only be one)
	static HWND activator; // the window that activated me
	virtual void Show();
	virtual void Hide();

	void SetActivator(HWND h);
};