1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 03:27:44 +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

@ -11,7 +11,7 @@ public:
String text() const { return m_text; }
void set_text(String&&);
Function<void(GTextBox&)> onReturnPressed;
Function<void(GTextBox&)> on_return_pressed;
private:
virtual const char* class_name() const override { return "GTextBox"; }
@ -19,6 +19,7 @@ private:
virtual void mousedown_event(GMouseEvent&) override;
virtual void keydown_event(GKeyEvent&) override;
virtual void timerEvent(GTimerEvent&) override;
virtual bool accepts_focus() const override { return true; }
void handle_backspace();