#pragma once

#include "ObjectWithWidgetsData.h"

class CChoicesDlg : public VWDialog
{
public:
						CChoicesDlg(const TVWMemoryStringArray& arrList, size_t selIndex);
	virtual				~CChoicesDlg();

	void				GetCoices(TVWMemoryStringArray& outArrList) const;
	size_t				GetSelection() const;

// virtuals
protected:
	virtual bool		CreateDialogLayout();
	virtual void		OnInizializeContent();
	virtual void		OnDDXInitialize();
	virtual void		OnUpdateUI();

// events
protected:

// dispatch map
protected:
	DEFINE_EVENT_DISPATH_MAP;
	void				OnChoicesList(long controlID, VWDialogEventArgs& eventArgs);
	void				OnAddChoice(long controlID, VWDialogEventArgs& eventArgs);
	void				OnEditChoice(long controlID, VWDialogEventArgs& eventArgs);
	void				OnDelChoice(long controlID, VWDialogEventArgs& eventArgs);
	void				OnMoveUp(long controlID, VWDialogEventArgs& eventArgs);
	void				OnMoveDown(long controlID, VWDialogEventArgs& eventArgs);

// DDX
protected:

// Inner data
private:
	TVWMemoryStringArray	farrList;
	size_t					fLastListSel;
};
