Planeshift
pawsspellbookwindow.h
Go to the documentation of this file.
1 /*
2  * pawsspellbook.h - Anders Reggestad <andersr@pvv.org>
3  * - PAWS conversion Andrew Craig
4  *
5  * Copyright (C) 2003 Atomic Blue (info@planeshift.it, http://www.atomicblue.org)
6  *
7  *
8  * This program is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License
10  * as published by the Free Software Foundation (version 2 of the License)
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18  *
19  */
20 
21 #ifndef PAWS_SPELLBOOK_WINDOW_HEADER
22 #define PAWS_SPELLBOOK_WINDOW_HEADER
23 
24 #include "paws/pawswidget.h"
25 class pawsTextBox;
26 class pawsListBox;
27 class pawsMessageTextBox;
28 class pawsSlot;
29 
30 #include "net/cmdbase.h"
31 #include "gui/pawscontrolwindow.h"
32 
33 
38 {
39 public:
40 
42  virtual ~pawsSpellBookWindow();
43 
44  bool PostSetup();
45 
46  virtual void HandleMessage(MsgEntry *msg);
47 
48  bool OnButtonPressed( int mouseButton, int keyModifier, pawsWidget* widget );
49  void OnListAction( pawsListBox* listbox, int status );
50  void Show();
51 private:
52 
53  void CreateNewSpell();
54  void Cast();
55  void ShowActiveMagic();
56 
57  void Close();
58 
59  void HandleSpells( MsgEntry* me );
60 
61  pawsListBox* spellList;
62  pawsMessageTextBox* spellDescription;
63  pawsSlot* spellImage;
64 
65  csString selectedSpell;
66 
67  csHash<csString, csString> descriptions_Hash;
68  csHash<csString, csString> images_Hash;
69 };
70 
72 
73 
74 #endif
75 
76 
This is a window that is controlled by a button on the control bar.
Spell Book Window.
The main base widget that all other widgets should inherit from.
Definition: pawswidget.h:116
A slot which may contain one item, with icon, and stack count.
Definition: pawsslot.h:22
void Show()
When the window is opened let the controller window know about it.
The structure of 1 queue entry (pointer to a message)
Definition: message.h:143
A simple list box widget.
Definition: pawslistbox.h:202
CREATE_PAWS_FACTORY(pawsSpellBookWindow)
bool PostSetup()
This is called after the widget and all of it&#39;s children have been created.
bool OnButtonPressed(int mouseButton, int keyModifier, pawsWidget *widget)
Called whenever a button is pressed.
This is a special type of text box that is used for messages.
Definition: pawstextbox.h:285
virtual ~pawsSpellBookWindow()
virtual void HandleMessage(MsgEntry *msg)
A basic text box widget.
Definition: pawstextbox.h:42
void OnListAction(pawsListBox *listbox, int status)
Called whenever an item in a child list box is selected.