//	Album List for Winamp
//	Copyright (C) 1999-2001 Safai Ma
//
//	This program is free software; you can redistribute it and/or modify
//	it under the terms of the GNU General Public License as published by
//	the Free Software Foundation; either version 2 of the License, or
//	(at your option) any later version.
//
//	This program is distributed in the hope that it will be useful,
//	but WITHOUT ANY WARRANTY; without even the implied warranty of
//	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//	GNU General Public License for more details.
//
//	You should have received a copy of the GNU General Public License
//	along with this program; if not, write to the Free Software
//	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#ifndef __PAGES_H__
#define __PAGES_H__

#include "Property.h"
#include "albumlist.h"

/////////////////////////////////////////////////////////////////////////
// CHyperTextStatic
//

typedef struct _tagLINK
{
	RECT rc;
	char url[128];

}	LINK, *LPLINK;

class CHyperTextStatic
{
public:
	CHyperTextStatic();
	virtual ~CHyperTextStatic() {}

private:
	void OnPaint		(HWND hWnd, int nMode = 0, POINT *pt = NULL);
	void OnDestroy		(HWND hWnd);
	void OnMouseMove	(HWND hWnd, POINT point);
	void OnLButtonDown	(HWND hWnd, POINT point);

private:
	CPtrArray	m_URLs;

public:
	static LRESULT CALLBACK DefWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
};

/////////////////////////////////////////////////////////////////////////
// CWPListBox
//

class CWPListBox
{
public:
	CWPListBox();
	virtual ~CWPListBox() {}

private:
	void OnPaint		(HWND hWnd);
	void OnDestroy		(HWND hWnd);

public:
	static LRESULT CALLBACK DefWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
};

/////////////////////////////////////////////////////////////////////////
// CAboutPage
//

class CAboutPage : public CTreePropertyPage
{
public:
	CAboutPage();
	CAboutPage(LPCTSTR szName, int nTree = 0);

	enum { IDD = IDD_ABOUT };

private:
	CHyperTextStatic m_htVersion;
	CHyperTextStatic m_htVersion2;
	CHyperTextStatic m_htCode;
	CHyperTextStatic m_htTranslation;

public:
	virtual BOOL OnInitDialog();
	virtual void OnOK();
};

/////////////////////////////////////////////////////////////////////////
// CReadmePage
//

class CReadmePage : public CTreePropertyPage
{
public:
	CReadmePage();
	CReadmePage(LPCTSTR szName, int nTree = 0);

	enum { IDD = IDD_README };

public:
	virtual BOOL OnInitDialog();
};

/////////////////////////////////////////////////////////////////////////
// CSkinsPage
//

class CSkinsPage : public CTreePropertyPage
{
public:
	CSkinsPage();
	CSkinsPage(LPCTSTR szName, int nTree = 0);

	enum { IDD = IDD_SKINS };

private:
	int m_useplskin;
	int m_rmpltitle;

	void OnUsePLSkin();
	void OnRemovePLTitle();

public:
	virtual BOOL CALLBACK DefWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);

	virtual BOOL OnInitDialog();
	virtual void OnOK();
	virtual void OnCancel();
};

/////////////////////////////////////////////////////////////////////////
// COptionsPage
//

class COptionsPage : public CTreePropertyPage
{
public:
	COptionsPage();
	COptionsPage(LPCTSTR szName, int nTree = 0);

	enum { IDD = IDD_OPTIONS };

private:

public:
	virtual BOOL CALLBACK DefWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);

	virtual BOOL OnInitDialog();
	virtual void OnOK();
};

/////////////////////////////////////////////////////////////////////////
// CAlbumNamingPage
//

class CAlbumNamingPage : public CTreePropertyPage
{
public:
	CAlbumNamingPage();
	CAlbumNamingPage(LPCTSTR szName, int nTree = 0);

	enum { IDD = IDD_ALBUM_NAMING };

private:

public:
	virtual BOOL CALLBACK DefWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);

	virtual BOOL OnInitDialog();
	virtual void OnOK();
};

/////////////////////////////////////////////////////////////////////////
// CSearchPathPage
//

class CSearchPathPage : public CTreePropertyPage
{
public:
	CSearchPathPage();
	CSearchPathPage(LPCTSTR szName, int nTree = 0);

	enum { IDD = IDD_SEARCHPATH };

private:
	CWPListBox m_WPListBox;
	BOOL m_bRefresh;

	void OnAdd();
	void OnRemove();
	void OnRemoveAll();
	void OnIgnoreM3U();
	void AdjustScrollWidth();		//ANDREAS: Fix to show long path names better...

public:
	virtual BOOL CALLBACK DefWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);

	virtual BOOL OnInitDialog();
	virtual void OnOK();
};

#endif /* __PAGES_H__ */
