/*
 * Author: Andrew Mann
 *
 * Copyright (C) 2004 PlaneShift Team (info@planeshift.it,
 * http://www.planeshift.it)
 *
 * 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 __GUI_PSLIST_DOT_H__
#define __GUI_PSLIST_DOT_H__

#include "imesh/particles.h"
#include "paws/pawswidget.h"


#include "paws/pawswidget.h"
#include "paws/pawsfilenavigation.h"

class pawsEditTextBox;
class pawsTextBox;
class pawsButton;
class pawsListBox;
class guiParticleSystem;
class PartSystemTracker;
class pawsScrollPane;



class guiPSList : public pawsWidget
{
public:
    guiPSList(PawsManager* manager);
    virtual ~guiPSList();

    // implemented virtual functions from pawsWidgets
    virtual bool PostSetup();
    virtual bool OnButtonPressed(int mouseButton, int keyModifier, pawsWidget* widget);

    virtual bool AddParticleSystemInterface(PartSystemTracker *system);
    virtual bool RemoveParticleSystemInterface(PartSystemTracker *system);

    int GetParticleSystemCount() { return particle_systems.Length(); }
    bool IsLoadOutstanding() { return load_outstanding; }
    bool IsSaveOutstanding() { return (awaiting_save!=NULL); }
    bool PromptForSave(guiParticleSystem *save_system);
    void DoTimedChecks(csTicks elapsed);
    void RefreshMaterialLists();


protected:
    pawsButton *button_loadsystem,*button_newsystem;
    pawsScrollPane *scrollpane_pslist;
    csArray<guiParticleSystem *> particle_systems;
    pawsFileNavigation *window_filenav;
    bool load_outstanding;
    int newsystem_count;

    guiParticleSystem *awaiting_save;
    

};

CREATE_PAWS_FACTORY( guiPSList );


#endif // #ifndef __GUI_PSLIST_DOT_H__

