mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:57:35 +00:00
GMessageBox: Add icons to message boxes with 3 standard ones to choose from.
This commit is contained in:
parent
b5b44a29bb
commit
de98b2770b
7 changed files with 57 additions and 10 deletions
|
@ -4,11 +4,22 @@
|
|||
|
||||
class GMessageBox : public GDialog {
|
||||
public:
|
||||
explicit GMessageBox(const String& text, const String& title, CObject* parent = nullptr);
|
||||
enum class Type {
|
||||
None,
|
||||
Information,
|
||||
Warning,
|
||||
Error,
|
||||
};
|
||||
|
||||
explicit GMessageBox(const String& text, const String& title, Type type = Type::None, CObject* parent = nullptr);
|
||||
virtual ~GMessageBox() override;
|
||||
|
||||
static void show(const String& text, const String& title, Type type = Type::None, CObject* parent = nullptr);
|
||||
|
||||
private:
|
||||
void build();
|
||||
RetainPtr<GraphicsBitmap> icon() const;
|
||||
|
||||
String m_text;
|
||||
Type m_type { Type::None };
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue