1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 01:27:34 +00:00

LibGUI: Flesh out focus implementation and more GTextBox work.

This commit is contained in:
Andreas Kling 2019-01-26 11:24:16 +01:00
parent d72575d196
commit de2423de5f
10 changed files with 54 additions and 27 deletions

View file

@ -5,21 +5,6 @@
#include <AK/AKString.h>
#include <AK/Types.h>
static const char* eventNames[] = {
"Invalid",
"Quit",
"Show",
"Hide",
"Paint",
"MouseMove",
"MouseDown",
"MouseUp",
"KeyDown",
"KeyUp",
"Timer",
"DeferredDestroy",
};
class GEvent {
public:
enum Type {
@ -37,6 +22,8 @@ public:
DeferredDestroy,
WindowBecameInactive,
WindowBecameActive,
FocusIn,
FocusOut,
};
GEvent() { }
@ -45,8 +32,6 @@ public:
Type type() const { return m_type; }
const char* name() const { return eventNames[(unsigned)m_type]; }
bool is_mouse_event() const { return m_type == MouseMove || m_type == MouseDown || m_type == MouseUp; }
bool is_key_event() const { return m_type == KeyUp || m_type == KeyDown; }
bool is_paint_event() const { return m_type == Paint; }