mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-24 02:03:06 -05:00
23 lines
463 B
C
23 lines
463 B
C
|
#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;
|
||
|
};
|
||
|
|