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
:
50
pawsLootWindow
();
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
78
pawsListBox
*
lootList
;
79
81
pawsButton
*
Roll_btn
;
82
pawsButton
*
RollAll_btn
;
83
84
bool
grouped
;
85
86
87
EID
lootEntity
;
88
};
89
92
CREATE_PAWS_FACTORY
(
pawsLootWindow
);
93
94
#endif
LCOL_ICON
Definition:
pawslootwindow.h:30
pawsLootWindow::~pawsLootWindow
virtual ~pawsLootWindow()
Virtual destructor.
CREATE_PAWS_FACTORY
CREATE_PAWS_FACTORY(pawsLootWindow)
The pawsLootWindow factory.
pawsWidget
The main base widget that all other widgets should inherit from.
Definition:
pawswidget.h:116
pawsLootWindow::Roll_btn
pawsButton * Roll_btn
group roll buttons
Definition:
pawslootwindow.h:81
pawsbutton.h
pawsLootWindow::HandleCommand
const char * HandleCommand(const char *cmd)
Handles commands.
pawslistbox.h
pawsLootWindow::lootList
pawsListBox * lootList
List widget of loot for easy access.
Definition:
pawslootwindow.h:78
MsgEntry
The structure of 1 queue entry (pointer to a message)
Definition:
message.h:143
pawsLootWindow::HandleMessage
void HandleMessage(MsgEntry *message)
Handles petition server messages.
pawsLootWindow::RollAll_btn
pawsButton * RollAll_btn
Definition:
pawslootwindow.h:82
LCOL_NAME
Definition:
pawslootwindow.h:31
pawsLootWindow::PostSetup
bool PostSetup()
Setup the widget with command/message handling capabilities.
pawsListBox
A simple list box widget.
Definition:
pawslistbox.h:202
pawsLootWindow::grouped
bool grouped
Definition:
pawslootwindow.h:84
pawswidget.h
pawsLootWindow::lootEntity
EID lootEntity
Definition:
pawslootwindow.h:87
pawsLootWindow::GetLootingActor
EID GetLootingActor()
Definition:
pawslootwindow.h:67
pawsButton
A simple button widget.
Definition:
pawsbutton.h:43
pawsLootWindow::AddLootItem
void AddLootItem()
Function to add the loot to the listbox given a csArray;.
pawsLootWindow
Window contains a list of the available loot items.
Definition:
pawslootwindow.h:46
pawsLootWindow::pawsLootWindow
pawsLootWindow()
Constructor.
pawsLootWindow::SetText
void SetText(int rowNum, int colNum, const char *fmt,...)
Quicker way to set text for each column in the listbox:
pawsLootWindow::OnButtonPressed
bool OnButtonPressed(int mouseButton, int keyModifier, pawsWidget *reporter)
Handle button clicks.
LCOL_ID
Definition:
pawslootwindow.h:32
psCmdBase
Definition:
cmdbase.h:42
client
gui
pawslootwindow.h
Generated on Sat Jun 19 2021 05:00:22 for Planeshift by
1.8.11