diff options
author | Andreas Kling <awesomekling@gmail.com> | 2018-10-11 01:48:09 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2018-10-11 01:48:09 +0200 |
commit | f337616741b690feb36ed8e104df85ed5117daaa (patch) | |
tree | ddf346dd5c7f3871d56f8457e3a496e829ae51ae /Widgets/Button.h | |
parent | aee66e011954b4a071edfca0e5ebf124da5f0ffb (diff) | |
download | serenity-f337616741b690feb36ed8e104df85ed5117daaa.zip |
More hacking on Widgets.
Diffstat (limited to 'Widgets/Button.h')
-rw-r--r-- | Widgets/Button.h | 22 |
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; +}; + |