// Font Preferences :: (C)opyright Daryl Dudey 2002
//
// This 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 __SETTINGSWINDOW_H_
#define __SETTINGSWINDOW_H_

#include <gui/window.h>
#include <gui/layoutview.h>
#include <gui/frameview.h>
#include <gui/stringview.h>
#include <gui/textview.h>
#include <gui/dropdownmenu.h>
#include <gui/button.h>

class AppSettings;

class SettingsWindow:public os::Window
{
public:
	SettingsWindow( const os::Rect & cFrame, AppSettings * pcSettings );
	~SettingsWindow();
	virtual void HandleMessage( os::Message * pcMessage );
	virtual bool OkToQuit( void );

private:
	void GetCurrentValues();
	void Apply();
	void Revert();
	void Default();

	os::LayoutView * pcLRoot;
	os::VLayoutNode * pcVLRoot, *pcVLTypes;
	os::HLayoutNode * pcHLServer, *pcHLPort, *pcHLUsername, *pcHLPassword, *pcHLRealname, *pcHLNickname, *pcHLChannel, *pcHLButtons;
	os::FrameView * pcFVTypes;
	os::DropdownMenu * pcDDMServer, *pcDDMPort, *pcDDMUsername, *pcDDMPassword, *pcDDMRealname, *pcDDMNickname, *pcDDMChannel;
	os::Button * pcBApply, *pcBRevert, *pcBDefault;

	AppSettings *m_pcSettings;
};

#endif /* __SETTINGSWINDOW_H_ */