mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:28:12 +00:00
Rename all the LibGUI classes to GClassName.
This commit is contained in:
parent
a026da47e7
commit
b91479d9b9
33 changed files with 623 additions and 581 deletions
29
LibGUI/GTextBox.h
Normal file
29
LibGUI/GTextBox.h
Normal file
|
@ -0,0 +1,29 @@
|
|||
#pragma once
|
||||
|
||||
#include "GWidget.h"
|
||||
#include <AK/Function.h>
|
||||
|
||||
class GTextBox final : public GWidget {
|
||||
public:
|
||||
explicit GTextBox(GWidget* parent);
|
||||
virtual ~GTextBox() override;
|
||||
|
||||
String text() const { return m_text; }
|
||||
void setText(String&&);
|
||||
|
||||
Function<void(GTextBox&)> onReturnPressed;
|
||||
|
||||
private:
|
||||
virtual const char* class_name() const override { return "GTextBox"; }
|
||||
virtual void paintEvent(GPaintEvent&) override;
|
||||
virtual void mouseDownEvent(GMouseEvent&) override;
|
||||
virtual void keyDownEvent(GKeyEvent&) override;
|
||||
virtual void timerEvent(GTimerEvent&) override;
|
||||
|
||||
void handleBackspace();
|
||||
|
||||
String m_text;
|
||||
unsigned m_cursorPosition { 0 };
|
||||
bool m_cursorBlinkState { false };
|
||||
};
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue