1 /* 2 * Copyright (C) 2002-2020 by the Widelands Development Team 3 * 4 * This program is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU General Public License 6 * as published by the Free Software Foundation; either version 2 7 * of the License, or (at your option) any later version. 8 * 9 * This program is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * GNU General Public License for more details. 13 * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 * 18 */ 19 20 #ifndef WL_WUI_STOCK_MENU_H 21 #define WL_WUI_STOCK_MENU_H 22 23 #include "ui_basic/unique_window.h" 24 #include "wui/waresdisplay.h" 25 26 class InteractivePlayer; 27 28 /* 29 * Shows statistics about all stocks currently in the game of 30 * one player 31 */ 32 struct StockMenu : public UI::UniqueWindow { 33 StockMenu(InteractivePlayer&, UI::UniqueWindow::Registry&); 34 35 void think() override; 36 37 private: 38 InteractivePlayer& player_; 39 WaresDisplay* all_wares_; 40 WaresDisplay* all_workers_; 41 WaresDisplay* warehouse_wares_; 42 WaresDisplay* warehouse_workers_; 43 44 void fill_total_waresdisplay(WaresDisplay* waresdisplay, Widelands::WareWorker type); 45 void fill_warehouse_waresdisplay(WaresDisplay* waresdisplay, Widelands::WareWorker type); 46 }; 47 48 #endif // end of include guard: WL_WUI_STOCK_MENU_H 49