Planeshift
pawslootwindow.h
Go to the documentation of this file.
1 /*
2  * pawslootwindow.h - Author: Keith Fulton
3  *
4  * Copyright (C) 2003 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 
20 #ifndef PAWS_LOOT_WINDOW_HEADER
21 #define PAWS_LOOT_WINDOW_HEADER
22 
23 #include "paws/pawswidget.h"
24 #include "paws/pawslistbox.h"
25 #include "paws/pawsbutton.h"
26 
28 enum
29 {
30  LCOL_ICON = 0,
31  LCOL_NAME = 1,
32  LCOL_ID = 2
33 };
34 
35 
46 class pawsLootWindow : public pawsWidget, public psCmdBase
47 {
48 public:
51 
53  virtual ~pawsLootWindow();
54 
56  void HandleMessage( MsgEntry* message );
57 
59  const char* HandleCommand(const char* cmd);
60 
62  bool PostSetup();
63 
65  bool OnButtonPressed(int mouseButton, int keyModifier, pawsWidget* reporter);
66 
67  EID GetLootingActor() { return lootEntity; }
68 
69 protected:
70 
72  void SetText(int rowNum, int colNum, const char* fmt, ...);
73 
75  void AddLootItem();
76 
79 
83 
84  bool grouped;
85 
86 
88 };
89 
93 
94 #endif
virtual ~pawsLootWindow()
Virtual destructor.
CREATE_PAWS_FACTORY(pawsLootWindow)
The pawsLootWindow factory.
The main base widget that all other widgets should inherit from.
Definition: pawswidget.h:116
pawsButton * Roll_btn
group roll buttons
const char * HandleCommand(const char *cmd)
Handles commands.
pawsListBox * lootList
List widget of loot for easy access.
The structure of 1 queue entry (pointer to a message)
Definition: message.h:143
void HandleMessage(MsgEntry *message)
Handles petition server messages.
pawsButton * RollAll_btn
bool PostSetup()
Setup the widget with command/message handling capabilities.
A simple list box widget.
Definition: pawslistbox.h:202
A simple button widget.
Definition: pawsbutton.h:43
void AddLootItem()
Function to add the loot to the listbox given a csArray;.
Window contains a list of the available loot items.
pawsLootWindow()
Constructor.
void SetText(int rowNum, int colNum, const char *fmt,...)
Quicker way to set text for each column in the listbox:
bool OnButtonPressed(int mouseButton, int keyModifier, pawsWidget *reporter)
Handle button clicks.