#ifndef __POSTPROCFXFILESMANAGER__
#define __POSTPROCFXFILESMANAGER__

#include "Singleton.h"

// Including STL for the effect list
#pragma warning(push)			// Pushing a warning disabler...
#pragma warning(disable:4995)	// to disable deprecated warning...
#include <list>
using namespace std;
#pragma warning(pop)			// Restoring the previous warning states

// Forward declarations
class PPEffectsCommon;


//------------------------------------------------------------------------------------------
// FXFileManager is a singleton-type class
// Lists successfully compiled .fx files from the "FXFiles/PostProcess" folder
//------------------------------------------------------------------------------------------
class PostProcFXFilesManager : public Singleton<PostProcFXFilesManager>
{
	// Another single in the place!
	friend class Singleton<PostProcFXFilesManager>;


	private:

		list<wstring*> m_lstPostProcFXFilestList;			// The list of successfully compiled FX files in the "./FXFiles/postprocess" folder
		list<PPEffectsCommon*> m_lstCompiledPostProcFX;	// The same list with compiled effects

		// Construction / Destruction
		PostProcFXFilesManager();
		~PostProcFXFilesManager();


	public:
		
		// Lists handling
		void ClearFilenameList();			// Clear a list<WCHAR*>
		void ClearCompiledFXList();			// Clear a list<WCHAR*>
		void ClearEverything();				// Clear everything
		void ListAvailablePostProcEffects(const int nNbAvailableRTs);	// Lists the successfully compiled postprocess effects

		// GUI Handling
		void FillListBox(CDXUTListBox * pListBox) const;	// Fill a DXUT list box with the effect list

		// DirectX device handling
		HRESULT OnResetDevice(const int nWidth, const int nHeight) const;
		void OnLostDevice() const;
};

#endif