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_EDITOR_UI_MENUS_TOOLSIZE_MENU_H 21 #define WL_EDITOR_UI_MENUS_TOOLSIZE_MENU_H 22 23 #include "ui_basic/button.h" 24 #include "ui_basic/textarea.h" 25 #include "ui_basic/unique_window.h" 26 27 class EditorInteractive; 28 29 /// The tool size window/menu. 30 struct EditorToolsizeMenu : public UI::UniqueWindow { 31 EditorToolsizeMenu(EditorInteractive&, UI::UniqueWindow::Registry&); 32 void update(uint32_t); 33 void set_buttons_enabled(bool enable); valueEditorToolsizeMenu34 uint32_t value() { 35 return value_; 36 } 37 38 private: 39 EditorInteractive& eia(); 40 void decrease_radius(); 41 void increase_radius(); 42 43 UI::Textarea textarea_; 44 UI::Button increase_, decrease_; 45 uint32_t value_; 46 }; 47 48 #endif // end of include guard: WL_EDITOR_UI_MENUS_TOOLSIZE_MENU_H 49