Planeshift
|
00001 /* 00002 * Author: Andrew Craig 00003 * 00004 * Copyright (C) 2004 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_IGNORE_HEADER 00020 #define PAWS_IGNORE_HEADER 00021 00022 #include "globals.h" 00023 00024 #include "paws/pawswidget.h" 00025 #include "paws/pawsstringpromptwindow.h" 00026 #include "net/cmdhandler.h" 00027 00028 class pawsListBox; 00029 00034 class pawsIgnoreWindow : public pawsWidget,public iOnStringEnteredAction 00035 { 00036 public: 00037 ~pawsIgnoreWindow(); 00038 00039 void AddIgnore( csString& playerName ); 00040 void RemoveIgnore( csString& playerName ); 00041 bool IsIgnored( csString& playerName ); 00042 00043 bool PostSetup(); 00044 00045 bool OnButtonPressed( int mouseButton, int keyModifier, pawsWidget* widget ); 00046 void OnListAction( pawsListBox* widget, int status ); 00047 00049 void OnStringEntered(const char *name,int param,const char *value); 00050 00051 private: 00052 00054 csStringArray ignoredNames; 00055 00056 pawsListBox* ignoreList; 00057 00059 csString currentIgnored; 00060 00061 bool LoadIgnoreList(); 00062 void SaveIgnoreList(); 00063 }; 00064 00065 CREATE_PAWS_FACTORY( pawsIgnoreWindow ); 00066 00067 #endif 00068