BlosSOM
Interactive dimensionality reduction on large datasets (EmbedSOM and FLOWER combined)
input_handler.h
Go to the documentation of this file.
1/* This file is part of BlosSOM.
2 *
3 * Copyright (C) 2021 Sona Molnarova
4 *
5 * BlosSOM is free software: you can redistribute it and/or modify it under
6 * the terms of the GNU General Public License as published by the Free
7 * Software Foundation, either version 3 of the License, or (at your option)
8 * any later version.
9 *
10 * BlosSOM is distributed in the hope that it will be useful, but WITHOUT ANY
11 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
13 * details.
14 *
15 * You should have received a copy of the GNU General Public License along with
16 * BlosSOM. If not, see <https://www.gnu.org/licenses/>.
17 */
18
19#ifndef INPUT_HANDLER_H
20#define INPUT_HANDLER_H
21
22#define GLFW_INCLUDE_NONE
23#include <GLFW/glfw3.h>
24#include <glad/glad.h>
25
26#include "input_data.h"
27#include "renderer.h"
28#include "state.h"
29#include "view.h"
30
31/**
32 * @brief Handler of input events.
33 *
34 */
36{
37public:
39
40 void update(View &view, Renderer &renderer, State &state);
41 void reset();
42
43private:
44 /**
45 * @brief Identify which key was pressed and notify other parts
46 * (listed in arguments) about it.
47 *
48 * @param view
49 * @param renderer
50 */
51 void process_keyboard(View &view, Renderer &renderer);
52
53 /**
54 * @brief Handle mouse button input.
55 *
56 * @param view
57 * @param renderer
58 * @param state
59 */
60 void process_mouse_button(View &view, Renderer &renderer, State &state);
61
62 /**
63 * @brief Process mouse scroll and notify other parts(listed in arguments)
64 * about it.
65 *
66 * @param view
67 */
68 void process_mouse_scroll(View &view);
69};
70
71#endif // #ifndef INPUT_HANDLER_H
Handler of input events.
Definition: input_handler.h:36
void process_keyboard(View &view, Renderer &renderer)
Identify which key was pressed and notify other parts (listed in arguments) about it.
void update(View &view, Renderer &renderer, State &state)
void process_mouse_button(View &view, Renderer &renderer, State &state)
Handle mouse button input.
void process_mouse_scroll(View &view)
Process mouse scroll and notify other parts(listed in arguments) about it.
InputData input
Definition: input_handler.h:38
Handles rendering of the graph and scatter plot and handles IO.
Definition: renderer.h:33
A small utility class that manages the viewport coordinates, together with the virtual "camera" posit...
Definition: view.h:37
Input events data storage.
Definition: input_data.h:30
Storage of data of used algorithms and input events.
Definition: state.h:50