/* client/trademenu.h This file is part of the Osirion project and is distributed under the terms of the GNU General Public License version 2 */ #ifndef __INCLUDED_CLIENT_TRADEMENU_H__ #define __INCLUDED_CLIENT_TRADEMENU_H__ #include "core/info.h" #include "ui/container.h" #include "ui/label.h" #include "ui/listitem.h" #include "ui/scrollpane.h" #include "ui/modelview.h" #include "ui/widget.h" #include "client/inventorylistview.h" namespace client { /// trade menu class TradeMenu : public ui::Window { public: /// create a new trade menu TradeMenu(ui::Widget *parent, const char * label = 0); ~TradeMenu(); /// set the item type to trade void set_item_type(core::InfoType *item_type); protected: /// resize event handler virtual void resize(); /// emit event handler virtual bool on_emit(Widget *sender, const Event event, void *data); private: void set_item(ui::ListItem *item); ui::Window *menu_tradewindow; ui::Button *menu_closebutton; ui::Label *menu_namelabel; ui::ModelView *menu_modelview; ui::ScrollPane *menu_scrollpane; InventoryListView *menu_inventorylistview; InventoryListView *menu_traderlistview; ui::Text menu_infotext; }; } #endif // __INCLUDED_CLIENT_TRADEMENU_H__