/*  ColdFish Music Player
 *  Copyright (C) 2003 Kristian Van Der Vliet
 *  Copyright (C) 2003 Arno Klenke
 *
 *  This library is free software; you can redistribute it and/or
 *  modify it under the terms of version 2 of the GNU Library
 *  General Public License as published by the Free Software
 *  Foundation.
 *
 *  This library 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
 *  Library General Public License for more details.
 *
 *  You should have received a copy of the GNU Library General Public
 *  License along with this library; if not, write to the Free
 *  Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
 *  MA 02111-1307, USA
 */

#ifndef __CFWINDOW_H_
#define __CFWINDOW_H_

#include <gui/view.h>
#include <gui/window.h>
#include <gui/imagebutton.h>
#include <gui/requesters.h>
#include <gui/menu.h>
#include <gui/desktop.h>
#include <gui/layoutview.h>
#include <gui/listview.h>
#include <gui/filerequester.h>
#include <gui/rect.h>
#include <gui/point.h>
#include <util/message.h>
#include <util/string.h>

#include "lcd.h"
//class Lcd;
//#include "SelectWin.h"
class SelectWin;
#include "cimagebutton.h"
//class CImageButton;

class CFListItem : public os::ListViewStringRow
{
public:
	os::String zPath;
	int nTrack;
	int nStream;
};

class CFPlaylist:public os::ListView
{
public:
	CFPlaylist( const os::Rect & cFrame );
	virtual void MouseUp( const os::Point & cPos, uint32 nButtons, os::Message * pcData );
};

class CFWindow:public os::Window
{
public:
	CFWindow( const os::Rect & cFrame, const os::String & cName, const os::String & cTitle, uint32 nFlags );
	virtual ~CFWindow();
	virtual void HandleMessage( os::Message * pcMessage );
	virtual bool OkToQuit();

	CFPlaylist *GetPlaylist() { return ( m_pcPlaylist ); }
	os::Lcd * GetLCD() { return ( m_pcLCD ); }
	os::Menu * GetMenuBar() { return ( m_pcMenuBar ); }
	void SetState( uint8 nState ) { m_nState = nState; }

private:
	void 				ShowAbout();

	uint8 				m_nState;
	os::LayoutView* 	m_pcRoot;
	os::HLayoutNode* 	m_pcControls;
	os::Menu* 			m_pcMenuBar;
	os::Lcd*			m_pcLCD;
	os::CImageButton*	m_pcPlay;
	os::CImageButton* 	m_pcStop;
	os::CImageButton*	m_pcShowList;

	CFPlaylist			*m_pcPlaylist;
	os::FileRequester*	m_pcFileDialog;
};

#endif