Planeshift
pawsignore.h
Go to the documentation of this file.
1 /*
2  * Author: Andrew Craig
3  *
4  * Copyright (C) 2004 Atomic Blue (info@planeshift.it, http://www.atomicblue.org)
5  *
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation (version 2 of the License)
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17  *
18  */
19 #ifndef PAWS_IGNORE_HEADER
20 #define PAWS_IGNORE_HEADER
21 
22 #include "globals.h"
23 
24 #include "paws/pawswidget.h"
26 #include "net/cmdhandler.h"
27 
28 class pawsListBox;
29 
34 {
35 public:
37 
38  void AddIgnore( csString& playerName );
39  void RemoveIgnore( csString& playerName );
40  bool IsIgnored( csString& playerName );
41 
42  bool PostSetup();
43 
44  bool OnButtonPressed( int mouseButton, int keyModifier, pawsWidget* widget );
45  void OnListAction( pawsListBox* widget, int status );
46 
48  void OnStringEntered(const char *name,int param,const char *value);
49 
50 private:
51 
53  csStringArray ignoredNames;
54 
55  pawsListBox* ignoreList;
56 
58  csString currentIgnored;
59 
60  bool LoadIgnoreList();
61  void SaveIgnoreList();
62 };
63 
65 
66 #endif
67 
The main base widget that all other widgets should inherit from.
Definition: pawswidget.h:116
bool IsIgnored(csString &playerName)
csString name
The name of this widget.
Definition: pawswidget.h:217
A player's ignore list window.
Definition: pawsignore.h:33
void RemoveIgnore(csString &playerName)
A simple list box widget.
Definition: pawslistbox.h:202
This interface defines the callback used by pawsStringPromptWindow to notify another window of a supp...
void AddIgnore(csString &playerName)
bool PostSetup()
This is called after the widget and all of it's children have been created.
void OnStringEntered(const char *name, int param, const char *value)
Handle popup question window callback.
bool OnButtonPressed(int mouseButton, int keyModifier, pawsWidget *widget)
Called whenever a button is pressed.
void OnListAction(pawsListBox *widget, int status)
Called whenever an item in a child list box is selected.
CREATE_PAWS_FACTORY(pawsIgnoreWindow)