/*
 * Author: Andrew Craig
 *
 * Copyright (C) 2004 Atomic Blue (info@planeshift.it, http://www.atomicblue.org)
 *
 *
 * 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 (version 2 of the License)
 * 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 *
 */
#ifndef PAWS_BUDDY_HEADER
#define PAWS_BUDDY_HEADER

#include "paws/pawswidget.h"
#include "interface/subscriber.h"

#include "paws/pawsstringpromptwindow.h"
#include "gui/pawscontrolwindow.h"
#include "gui/chatwindow.h"

class pawsListBox;

/** The buddy window that shows your current list of in game 'friends'.  
 *  This allows you to send them a tell or add/remove buddies.
 */
class pawsBuddyWindow : public pawsControlledWindow, public psClientNetSubscriber, public iOnStringEnteredAction
{
public:
    pawsBuddyWindow();

    bool PostSetup();
    void HandleMessage( MsgEntry* me );

    bool OnButtonPressed( int mouseButton, int keyModifier, pawsWidget* widget );
    void OnListAction( pawsListBox* widget, int status );
    void OnStringEntered(const char *name,int param,const char *value);

    virtual void Show();

    virtual void OnResize();

private:
    pawsListBox* buddyList;  
    csString currentBuddy;      
    pawsChatWindow* chatWindow;
    
    csStringArray onlineBuddies;
    csStringArray offlineBuddies;    
};


CREATE_PAWS_FACTORY( pawsBuddyWindow );
#endif    
