Euphoria
uistate.cc
Go to the documentation of this file.
1 #include "gui/uistate.h"
2 
3 
4 namespace eu::gui
5 {
6  void
8  {
9  hot = nullptr;
10  }
11 
12 
13  void
14  State::end()
15  {
16  if(is_mouse_down() == false)
17  {
18  active = nullptr;
19  has_active = false;
20  }
21  else
22  {
23  if(has_active == false && active == nullptr)
24  {
25  has_active = true;
26  }
27  }
28  }
29 
30 
31  void
32  State::set_hot(Widget* w)
33  {
34  hot = w;
35  }
36 
37 
38  void
39  State::set_active(Widget* w)
40  {
41  if(has_active == false && active == nullptr)
42  {
43  active = w;
44  has_active = true;
45  }
46  }
47 
48 
49  bool
50  State::is_mouse_down() const
51  {
52  return mouse_down;
53  }
54 }
55 
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