view LightClone/Source/ActionPanel.h @ 59:63806b850aa5

Rename ProgramPanel to ActionPanel
author koryspansel <koryspansel@bendbroadband.com>
date Fri, 30 Sep 2011 22:48:03 -0700
parents LightClone/Source/ProgramPanel.h@5e382dee4c70
children 3507bd831c7f
line wrap: on
line source

/*
 * ActionPanel
 */

#ifndef __ACTIONPANEL_H__
#define __ACTIONPANEL_H__

#include "Core.h"
#include "ActionSlot.h"

/*
 * ActionArguments
 */
struct ActionArguments : public GuiEventArguments
{
	/*
	 * nSlot
	 */
	uint32 nSlot;

	/*
	 * ActionArguments
	 */
	ActionArguments(GuiElement* pSource, uint32 nCodeSlot) : GuiEventArguments(pSource), nSlot(nCodeSlot)
	{
	}
};

/*
 * ActionPanel
 */
class ActionPanel : public GuiImage
{
public:

	/*
	 * EventAction
	 */
	static const char* EventAction;

private:

	/*
	 * pSlot
	 */
	ActionSlot* pSlot;

	/*
	 * nSizeX
	 */
	uint32 nSizeX;

	/*
	 * nSizeY
	 */
	uint32 nSizeY;

public:

	/*
	 * ActionPanel
	 */
	ActionPanel(uint32 nWidth, uint32 nHeight);

	/*
	 * Initialize
	 */
	virtual ErrorCode Initialize(ResourceManager* pResourceManager);

	/*
	 * SetAvailableSlots
	 */
	void SetAvailableSlots(uint32 nCount);

	/*
	 * SetAction
	 */
	void SetAction(uint32 nIndex, uint32 nAction);

	/*
	 * GetAction
	 */
	uint32 GetAction(uint32 nIndex) const;

	/*
	 * Clear
	 */
	void Clear();

	/*
	 * SetPermanent
	 */
	void SetPermanent(bool bPermanent);

private:

	/*
	 * OnActionDropped
	 */
	void OnActionDropped(GuiEventArguments& kArguments);
};

#endif //__ACTIONPANEL_H__