1 /* 2 * Copyright (c) 1997 - 2001 Hansj�rg Malthaner 3 * 4 * This file is part of the Simutrans project under the artistic licence. 5 * (see licence.txt) 6 */ 7 8 #ifndef gui_ifc_action_listener_h 9 #define gui_ifc_action_listener_h 10 11 #include "../../simtypes.h" 12 13 class gui_action_creator_t; 14 15 /** 16 * This interface must be implemented by all classes which want to 17 * listen actions, i.e. button presses 18 * @author Hj. Malthaner 19 */ 20 class action_listener_t 21 { 22 public: ~action_listener_t()23 virtual ~action_listener_t() {} 24 25 /** 26 * This method is called if an action is triggered 27 * @author Hj. Malthaner 28 * 29 * Returns true, if action is done and no more 30 * components should be triggered. 31 * V.Meyer 32 */ 33 virtual bool action_triggered(gui_action_creator_t *comp, value_t extra) = 0; 34 }; 35 36 #endif 37