mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-28 05:35:52 +03:00
83d9a89275
This will allow us to have better interaction between CatDog's state and what it's saying.
30 lines
662 B
C++
30 lines
662 B
C++
/*
|
|
* Copyright (c) 2021, Gunnar Beutner <gunnar@beutner.name>
|
|
* Copyright (c) 2022, kleines Filmröllchen <filmroellchen@serenityos.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include "CatDog.h"
|
|
#include <AK/NonnullRefPtr.h>
|
|
#include <LibGUI/Widget.h>
|
|
|
|
class SpeechBubble final : public GUI::Widget {
|
|
C_OBJECT(SpeechBubble);
|
|
|
|
public:
|
|
virtual void paint_event(GUI::PaintEvent&) override;
|
|
virtual void mousedown_event(GUI::MouseEvent&) override;
|
|
|
|
Function<void()> on_dismiss;
|
|
NonnullRefPtr<CatDog> m_cat_dog;
|
|
|
|
private:
|
|
SpeechBubble(NonnullRefPtr<CatDog> cat_dog)
|
|
: m_cat_dog(move(cat_dog))
|
|
{
|
|
}
|
|
};
|