Planeshift

pawslife.h

Go to the documentation of this file.
00001 /*
00002  * pawslife.h - Author: Andrew Craig
00003  *
00004  * Copyright (C) 2003 Atomic Blue ([email protected], http://www.atomicblue.org)
00005  *
00006  *
00007  * This program is free software; you can redistribute it and/or
00008  * modify it under the terms of the GNU General Public License
00009  * as published by the Free Software Foundation (version 2 of the License)
00010  * This program is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  * GNU General Public License for more details.
00014  * You should have received a copy of the GNU General Public License
00015  * along with this program; if not, write to the Free Software
00016  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00017  *
00018  */
00019 #ifndef PAWS_LIFE_EVENT_WINDOW_HEADER
00020 #define PAWS_LIFE_EVENT_WINDOW_HEADER
00021  
00022 #include "paws/pawswidget.h"
00023 
00024 class pawsSelectorBox;
00025 class psCreationManager;
00026 class pawsTextBox;
00027 class pawsMultiLineTextBox;
00028 
00029  
00030 class pawsLifeEventWindow : public pawsWidget
00031 {
00032 public:
00033     pawsLifeEventWindow();
00034     ~pawsLifeEventWindow();
00035     bool OnButtonPressed( int mouseButton, int keyModifier, pawsWidget* widget ); 
00036     
00037     void Show();
00038     virtual void Draw();
00039     virtual void OnListAction(  pawsListBox* widget, int status );
00040     
00041     bool PostSetup();
00042     
00043 private:
00044     psCreationManager* createManager;
00045     pawsTextBox* cpBox;
00046     bool dataLoaded;
00047     
00048     pawsSelectorBox* choiceSelection;
00049     
00050     pawsMultiLineTextBox* selectedDesc;
00051     pawsMultiLineTextBox* choiceDesc;
00052     
00053     void PopulateFields();
00054     void UpdateCP();
00055     
00056     void Randomize(void);
00057     void AddLifeEventAndDependencies(void);
00058 };
00059 
00060 CREATE_PAWS_FACTORY( pawsLifeEventWindow ); 
00061  
00062 #endif
00063 
00064