summaryrefslogtreecommitdiff
path: root/src/gui/widgets/avatarlistbox.h
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2010-02-08 14:40:04 -0700
committerJared Adams <jaxad0127@gmail.com>2010-02-08 14:43:51 -0700
commit8a31e96d8534d402db9cd48183c0b15732f7d95e (patch)
tree885d83febf301c1289c3bf7f83bf9dca89e0347c /src/gui/widgets/avatarlistbox.h
parentbc5c031e43eff506c925682349dd2a52b89d6565 (diff)
downloadmana-8a31e96d8534d402db9cd48183c0b15732f7d95e.tar.gz
mana-8a31e96d8534d402db9cd48183c0b15732f7d95e.tar.bz2
mana-8a31e96d8534d402db9cd48183c0b15732f7d95e.tar.xz
mana-8a31e96d8534d402db9cd48183c0b15732f7d95e.zip
Merge PartyWindow and GuildWindow into SocialWindow
Diffstat (limited to 'src/gui/widgets/avatarlistbox.h')
-rw-r--r--src/gui/widgets/avatarlistbox.h65
1 files changed, 65 insertions, 0 deletions
diff --git a/src/gui/widgets/avatarlistbox.h b/src/gui/widgets/avatarlistbox.h
new file mode 100644
index 00000000..5c05cae6
--- /dev/null
+++ b/src/gui/widgets/avatarlistbox.h
@@ -0,0 +1,65 @@
+/*
+ * The Mana World
+ * Copyright (C) 2008 The Mana World Development Team
+ *
+ * This file is part of The Mana World.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef GUI_GUILDLISTBOX_H
+#define GUI_GUILDLISTBOX_H
+
+#include "avatar.h"
+
+#include "gui/widgets/listbox.h"
+
+#include <map>
+#include <string>
+#include <vector>
+
+class Image;
+
+class AvatarListModel : public gcn::ListModel
+{
+public:
+ virtual Avatar *getAvatarAt(int i) = 0;
+
+ std::string getElementAt(int i)
+ { return getAvatarAt(i)->getName(); }
+};
+
+class AvatarListBox : public ListBox
+{
+public:
+ AvatarListBox(AvatarListModel *model);
+
+ ~AvatarListBox();
+
+ /**
+ * Draws the list box.
+ */
+ void draw(gcn::Graphics *gcnGraphics);
+
+ void mousePressed(gcn::MouseEvent &event);
+
+private:
+ static int instances;
+ static Image *onlineIcon;
+ static Image *offlineIcon;
+
+};
+
+#endif