The Battle for Wesnoth  1.19.7+dev
Classes | Namespaces | Enumerations | Functions
handler.hpp File Reference
#include <cstdint>
#include <iosfwd>
#include <vector>
Include dependency graph for handler.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  gui2::event::manager
 

Namespaces

 gui2
 Generic file dialog.
 
 gui2::event
 

Enumerations

enum class  gui2::event::event_category : uint32_t {
  gui2::event::general = 1u << 8 , gui2::event::mouse = 1u << 9 , gui2::event::keyboard = 1u << 10 , gui2::event::touch_motion = 1u << 11 ,
  gui2::event::touch_gesture = 1u << 12 , gui2::event::notification = 1u << 13 , gui2::event::message = 1u << 14 , gui2::event::raw_event = 1u << 15 ,
  gui2::event::text_input = 1u << 16
}
 Event category masks. More...
 
enum  gui2::event::ui_event : uint32_t {
  gui2::event::DRAW = encode_category(1 , event_category::general) , gui2::event::CLOSE_WINDOW = encode_category(2 , event_category::general) , gui2::event::MOUSE_ENTER = encode_category(3 , event_category::general) , gui2::event::MOUSE_LEAVE = encode_category(4 , event_category::general) ,
  gui2::event::LEFT_BUTTON_DOWN = encode_category(5 , event_category::general) , gui2::event::LEFT_BUTTON_UP = encode_category(6 , event_category::general) , gui2::event::LEFT_BUTTON_CLICK = encode_category(7 , event_category::general) , gui2::event::LEFT_BUTTON_DOUBLE_CLICK = encode_category(8 , event_category::general) ,
  gui2::event::MIDDLE_BUTTON_DOWN = encode_category(9 , event_category::general) , gui2::event::MIDDLE_BUTTON_UP = encode_category(10, event_category::general) , gui2::event::MIDDLE_BUTTON_CLICK = encode_category(11, event_category::general) , gui2::event::MIDDLE_BUTTON_DOUBLE_CLICK = encode_category(12, event_category::general) ,
  gui2::event::RIGHT_BUTTON_DOWN = encode_category(13, event_category::general) , gui2::event::RIGHT_BUTTON_UP = encode_category(14, event_category::general) , gui2::event::RIGHT_BUTTON_CLICK = encode_category(15, event_category::general) , gui2::event::RIGHT_BUTTON_DOUBLE_CLICK = encode_category(16, event_category::general) ,
  gui2::event::SDL_VIDEO_RESIZE = encode_category(17, event_category::mouse) , gui2::event::SDL_MOUSE_MOTION = encode_category(18, event_category::mouse) , gui2::event::MOUSE_MOTION = encode_category(19, event_category::mouse) , gui2::event::SDL_LEFT_BUTTON_DOWN = encode_category(20, event_category::mouse) ,
  gui2::event::SDL_LEFT_BUTTON_UP = encode_category(21, event_category::mouse) , gui2::event::SDL_MIDDLE_BUTTON_DOWN = encode_category(22, event_category::mouse) , gui2::event::SDL_MIDDLE_BUTTON_UP = encode_category(23, event_category::mouse) , gui2::event::SDL_RIGHT_BUTTON_DOWN = encode_category(24, event_category::mouse) ,
  gui2::event::SDL_RIGHT_BUTTON_UP = encode_category(25, event_category::mouse) , gui2::event::SDL_WHEEL_LEFT = encode_category(26, event_category::mouse) , gui2::event::SDL_WHEEL_RIGHT = encode_category(27, event_category::mouse) , gui2::event::SDL_WHEEL_UP = encode_category(28, event_category::mouse) ,
  gui2::event::SDL_WHEEL_DOWN = encode_category(29, event_category::mouse) , gui2::event::SHOW_TOOLTIP = encode_category(30, event_category::mouse) , gui2::event::SHOW_HELPTIP = encode_category(31, event_category::mouse) , gui2::event::SDL_TOUCH_UP = encode_category(32, event_category::mouse) ,
  gui2::event::SDL_TOUCH_DOWN = encode_category(33, event_category::mouse) , gui2::event::SDL_KEY_DOWN = encode_category(34, event_category::keyboard) , gui2::event::SDL_TEXT_INPUT = encode_category(35, event_category::text_input) , gui2::event::SDL_TEXT_EDITING = encode_category(36, event_category::text_input) ,
  gui2::event::SDL_ACTIVATE = encode_category(37, event_category::notification) , gui2::event::NOTIFY_REMOVAL = encode_category(38, event_category::notification) , gui2::event::NOTIFY_MODIFIED = encode_category(39, event_category::notification) , gui2::event::NOTIFY_REMOVE_TOOLTIP = encode_category(40, event_category::notification) ,
  gui2::event::RECEIVE_KEYBOARD_FOCUS = encode_category(41, event_category::notification) , gui2::event::LOSE_KEYBOARD_FOCUS = encode_category(42, event_category::notification) , gui2::event::REQUEST_PLACEMENT = encode_category(43, event_category::message) , gui2::event::MESSAGE_SHOW_TOOLTIP = encode_category(44, event_category::message) ,
  gui2::event::MESSAGE_SHOW_HELPTIP = encode_category(45, event_category::message) , gui2::event::SDL_TOUCH_MOTION = encode_category(46, event_category::touch_motion) , gui2::event::SDL_TOUCH_MULTI_GESTURE = encode_category(47, event_category::touch_gesture) , gui2::event::SDL_RAW_EVENT = encode_category(48, event_category::raw_event)
}
 The event sent to the dispatcher. More...
 

Functions

constexpr uint32_t gui2::event::encode_category (const uint32_t input, const event_category mask)
 
constexpr bool gui2::event::is_in_category (const ui_event event, const event_category mask)
 Checks if a given event is in a given category. More...
 
constexpr event_category gui2::event::get_event_category (const ui_event event)
 Returns the category of a given event. More...
 
void gui2::event::connect_dispatcher (dispatcher *dispatcher)
 Connects a dispatcher to the event handler. More...
 
void gui2::event::disconnect_dispatcher (dispatcher *dispatcher)
 Disconnects a dispatcher to the event handler. More...
 
std::vector< dispatcher * > & gui2::event::get_all_dispatchers ()
 Gets all event dispatchers in the Z order. More...
 
void gui2::event::init_mouse_location ()
 Initializes the location of the mouse. More...
 
void gui2::event::capture_mouse (dispatcher *dispatcher)
 Captures the mouse. More...
 
void gui2::event::release_mouse (dispatcher *dispatcher)
 Releases a captured mouse. More...
 
void gui2::event::capture_keyboard (dispatcher *dispatcher)
 Captures the keyboard. More...
 
std::ostream & gui2::event::operator<< (std::ostream &stream, const ui_event event)
 
void gui2::remove_from_window_stack (window *window)
 Removes a entry from the open_window_stack list. More...
 
bool gui2::is_in_dialog ()
 Is a dialog open? More...