| 1056 | } |
| 1057 | |
| 1058 | bool Control::eventIsWithin(const Event *e) const |
| 1059 | { |
| 1060 | if (e->type() == EVENT_MOUSE_MOVE || e->type() == EVENT_MOUSE_DOWN || |
| 1061 | e->type() == EVENT_MOUSE_UP) |
| 1062 | { |
| 1063 | return (e->mouse().X >= resolvedLocation.x && e->mouse().X < resolvedLocation.x + Size.x && |
| 1064 | e->mouse().Y >= resolvedLocation.y && e->mouse().Y < resolvedLocation.y + Size.y); |
| 1065 | } |
| 1066 | else if (e->type() == EVENT_FINGER_DOWN || e->type() == EVENT_FINGER_UP || |
| 1067 | e->type() == EVENT_FINGER_MOVE) |
| 1068 | { |
| 1069 | return (e->finger().X >= resolvedLocation.x && |
| 1070 | e->finger().X < resolvedLocation.x + Size.x && |
| 1071 | e->finger().Y >= resolvedLocation.y && e->finger().Y < resolvedLocation.y + Size.y); |
| 1072 | } |
| 1073 | // Only mouse & finger events have a location to be within |
| 1074 | return false; |
| 1075 | } |
| 1076 | |
| 1077 | void Control::pushFormEvent(FormEventType type, Event *parentEvent) |
| 1078 | { |
no test coverage detected