00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef GUI_NPCLISTDIALOG_H
00023 #define GUI_NPCLISTDIALOG_H
00024
00025 #include "gui/widgets/window.h"
00026
00027 #include <guichan/actionlistener.hpp>
00028 #include <guichan/listmodel.hpp>
00029
00030 #include <vector>
00031
00037 class NpcListDialog : public Window, public gcn::ActionListener,
00038 public gcn::ListModel
00039 {
00040 public:
00046 NpcListDialog();
00047
00051 void action(const gcn::ActionEvent &event);
00052
00056 int getNumberOfElements();
00057
00061 std::string getElementAt(int i);
00062
00066 void addItem(const std::string &);
00067
00073 void parseItems(const std::string &itemString);
00074
00078 void reset();
00079
00080 void setVisible(bool visible);
00081
00086 void requestFocus();
00087
00088 private:
00089 gcn::ListBox *mItemList;
00090
00091 std::vector<std::string> mItems;
00092 };
00093
00094 extern NpcListDialog *npcListDialog;
00095
00096 #endif // GUI_NPCLISTDIALOG_H