#if !defined(AFX_TEXTUREDLG_H__50996339_C517_11D0_97FC_00609736738F__INCLUDED_)
#define AFX_TEXTUREDLG_H__50996339_C517_11D0_97FC_00609736738F__INCLUDED_

/******************************************/
#if _MSC_VER >= 1000
#pragma once
#endif
/******************************************/
// TextureDlg.h : header file
//

class tdoTextureName
{
public:
	tdoTextureName(CString _csName = "");
	BOOL m_bIsReferencedInLinkTable();
	CString m_csGetName() { return m_csFileName; }
private:
	BOOL m_bIsReferenced;
	CString m_csFileName;
	BOOL m_bFindNameInLinkTable();
};

class CPatternedListView;

/////////////////////////////////////////////////////////////////////////////
// CTextureDlg dialog
class CTextureDlg : public CDialog
{
private:
	int								m_iSelectedImage;					// last selected image
	CFrameWnd					*m_pFrame;								// frame to put view
	BOOL							m_bFirstInit;							// true if first modal opened, else false
	CSize							m_bSizeWhenClose;					// save the size when closing to restore for the next opening
	CPoint						m_bPosWhenClose;					// idem for the screen position
	CList<tdoTextureName, tdoTextureName &> m_oTextureDirContents;		// list of the file names found in the texture path
	
	short m_wNbTextures[3];

	
	void m_fn_vInitTextureList( void );					// initialise Texture List, called once by constructor
																							// each time user click on refresh button
	BOOL m_fn_bIsAValidTexture(CString csFileName);
	short m_wCountTextures(CString _csNamePrefix, BOOL _bForceDirScan = FALSE, BOOL bEmptyList = FALSE);

public:
	CPatternedListView				*m_p_oTextureListView;		// View to show texture list
	BOOL              m_bIsRefreshingTextureList;
	//CBitmapList *m_fn_p_oGetTextureList( void ) { return &m_oTextureList; }	// return texture list, used by other Interface view
	int					m_fn_iGetSelectedImage( void ) { return m_iSelectedImage; } // return last selected texture
	void m_fn_vRefreshTextureList( BOOL _bOnlyForLoadedMaterials, BOOL _bScanTextureDir );			// refresh texture list, called by Init texture list and 

//below is classWizard generated code

// Construction
	CTextureDlg(CWnd* pParent = NULL);   // standard constructor
	~CTextureDlg();   // standard destructor

// Dialog Data
	//{{AFX_DATA(CTextureDlg)
	enum { IDD = IDD_DIALOG_TEXTURELIST };
		// NOTE: the ClassWizard will add data members here
	//}}AFX_DATA


// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CTextureDlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:

	// Generated message map functions
	//{{AFX_MSG(CTextureDlg)
	afx_msg void OnButtonRefresh();
	afx_msg void OnDestroy();
	virtual BOOL OnInitDialog();
	afx_msg void OnSize(UINT nType, int cx, int cy);
	virtual void OnOK();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_TEXTUREDLG_H__50996339_C517_11D0_97FC_00609736738F__INCLUDED_)
