Euphoria
uistate.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "base/vec2.h"
4 
5 namespace eu::gui
6 {
7  struct Widget;
8 }
9 
10 namespace eu::gui
11 {
12  struct State
13  {
14  State() = default;
15 
16  vec2f mouse = vec2f(0.0f, 0.0f);
17  bool mouse_down = false;
18 
19  Widget* hot = nullptr;
20  Widget* active = nullptr;
21  bool has_active = false;
22 
23  void
24  begin();
25 
26  void
27  end();
28 
29  void
31 
32  void
34 
35  [[nodiscard]] bool
36  is_mouse_down() const;
37  };
38 }
vec2f mouse
Definition: uistate.h:16
State()=default
void set_hot(Widget *w)
bool has_active
Definition: uistate.h:21
Widget * hot
Definition: uistate.h:19
void set_active(Widget *w)
bool mouse_down
Definition: uistate.h:17
bool is_mouse_down() const
Widget * active
Definition: uistate.h:20
Definition: vec2.h:33