mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-11 01:06:01 +03:00
a599317624
This macro goes at the top of every CObject-derived class like so: class SomeClass : public CObject { C_OBJECT(SomeClass) public: ... At the moment, all it does is create an override for the class_name() getter but in the future this will be used to automatically insert member functions into these classes.
25 lines
540 B
C++
25 lines
540 B
C++
#pragma once
|
|
|
|
#include <LibGUI/GDialog.h>
|
|
|
|
class GButton;
|
|
class GTextEditor;
|
|
|
|
class GInputBox : public GDialog {
|
|
C_OBJECT(GInputBox)
|
|
public:
|
|
explicit GInputBox(const StringView& prompt, const StringView& title, CObject* parent = nullptr);
|
|
virtual ~GInputBox() override;
|
|
|
|
String text_value() const { return m_text_value; }
|
|
|
|
private:
|
|
void build();
|
|
String m_prompt;
|
|
String m_text_value;
|
|
|
|
GButton* m_ok_button { nullptr };
|
|
GButton* m_cancel_button { nullptr };
|
|
GTextEditor* m_text_editor { nullptr };
|
|
};
|