1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 05:34:58 +00:00
serenity/Userland/Applications/PixelPaint/ScopeWidget.h
Andreas Kling ddbe6bd7b4 Userland: Rename Core::Object to Core::EventReceiver
This is a more precise description of what this class actually does.
2023-08-06 20:39:51 +02:00

34 lines
673 B
C++

/*
* Copyright (c) 2022, kleines Filmröllchen <filmroellchen@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include "Image.h"
#include <LibCore/EventReceiver.h>
#include <LibGUI/Frame.h>
namespace PixelPaint {
class ScopeWidget
: public GUI::Frame
, public ImageClient {
C_OBJECT_ABSTRACT(ScopeWidget);
public:
virtual ~ScopeWidget() override;
void set_image(Image*);
virtual void image_changed() = 0;
void set_color_at_mouseposition(Color);
protected:
virtual void paint_event(GUI::PaintEvent&) override = 0;
Color m_color_at_mouseposition = Color::Transparent;
RefPtr<Image> m_image;
};
}