52 class mouse_handler_base;
72 virtual void play_slice(
bool is_delay_enabled =
true);
136 return std::vector<std::string>();
159 virtual void process()
override;
173 virtual void show_menu(
const std::vector<config>& items_arg,
int xloc,
int yloc,
bool context_menu,
display& disp);
174 virtual void execute_action(
const std::vector<std::string>& items_arg,
int xloc,
int yloc,
bool context_menu);
Class that keeps track of all the keys on the keyboard.
controller_base & controller_
void handle_event(const SDL_Event &event) override
keyup_listener(controller_base &controller)
void set_scroll_up(bool on)
bool handle_scroll(int mousex, int mousey, int mouse_flags)
Handle scrolling by keyboard, joystick and moving mouse near map edges.
virtual events::mouse_handler_base & get_mouse_handler_base()=0
Get a reference to a mouse handler member a derived class uses.
virtual ~controller_base()
virtual plugins_context * get_plugins_context()
Get (optionally) a plugins context a derived class uses.
size_t long_touch_timer_
Context menu timer.
void set_scroll_left(bool on)
virtual soundsource::manager * get_soundsource_man()
Get (optionally) a soundsources manager a derived class uses.
virtual bool in_context_menu(const hotkey::ui_command &cmd) const
virtual void play_slice(bool is_delay_enabled=true)
void handle_event(const SDL_Event &event) override
Process mouse- and keypress-events from SDL.
virtual void process_keyup_event(const SDL_Event &)
Process keyup (always).
virtual void process() override
void set_scroll_right(bool on)
virtual void process_focus_keydown_event(const SDL_Event &)
Process keydown (only when the general map display does not have focus).
void apply_keyboard_scroll(int x, int y)
virtual bool have_keyboard_focus()
Derived classes should override this to return false when arrow keys should not scroll the map,...
bool last_mouse_is_touch_
virtual void process_keydown_event(const SDL_Event &)
Process keydown (always).
virtual display & get_display()=0
Get a reference to a display member a derived class uses.
const game_config_view & game_config_
void long_touch_callback(int x, int y)
keyup_listener key_release_listener_
virtual std::vector< std::string > additional_actions_pressed()
virtual hotkey::command_executor * get_hotkey_command_executor()
Optionally get a command executor to handle context menu events.
void set_scroll_down(bool on)
std::chrono::steady_clock::time_point last_scroll_tick_
virtual void show_menu(const std::vector< config > &items_arg, int xloc, int yloc, bool context_menu, display &disp)
virtual bool is_browsing() const
virtual void execute_action(const std::vector< std::string > &items_arg, int xloc, int yloc, bool context_menu)
Sort-of-Singleton that many classes, both GUI and non-GUI, use to access the game data.
virtual void join_global()
sdl_handler(sdl_handler &&)=delete
A class grating read only view to a vector of config objects, viewed as one config with all children ...
Handling of system events.
Keyboard shortcuts for game actions.
This file contains object "key", which is used to store information about keys while annotation parsi...
Used as the main paramneter for can_execute_command/do_execute_command These functions are used to ex...