summaryrefslogtreecommitdiff
path: root/Widgets/Button.h
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2018-10-11 01:48:09 +0200
committerAndreas Kling <awesomekling@gmail.com>2018-10-11 01:48:09 +0200
commitf337616741b690feb36ed8e104df85ed5117daaa (patch)
treeddf346dd5c7f3871d56f8457e3a496e829ae51ae /Widgets/Button.h
parentaee66e011954b4a071edfca0e5ebf124da5f0ffb (diff)
downloadserenity-f337616741b690feb36ed8e104df85ed5117daaa.zip
More hacking on Widgets.
Diffstat (limited to 'Widgets/Button.h')
-rw-r--r--Widgets/Button.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/Widgets/Button.h b/Widgets/Button.h
new file mode 100644
index 0000000000..9bd51334bf
--- /dev/null
+++ b/Widgets/Button.h
@@ -0,0 +1,22 @@
+#pragma once
+
+#include "Widget.h"
+#include <AK/String.h>
+
+class Button final : public Widget {
+public:
+ explicit Button(Widget* parent);
+ virtual ~Button() override;
+
+ String caption() const { return m_caption; }
+ void setCaption(String&&);
+
+private:
+ virtual void onPaint(PaintEvent&) override;
+ virtual void onMouseDown(MouseEvent&) override;
+
+ virtual const char* className() const override { return "Button"; }
+
+ String m_caption;
+};
+