2020-01-18 08:38:21 +00:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
|
|
|
|
*
|
2021-04-22 08:24:48 +00:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2020-01-18 08:38:21 +00:00
|
|
|
*/
|
|
|
|
|
2019-06-10 17:54:09 +00:00
|
|
|
#pragma once
|
|
|
|
|
2020-02-06 19:33:02 +00:00
|
|
|
#include <LibGUI/Frame.h>
|
2019-06-10 17:54:09 +00:00
|
|
|
|
2020-05-20 18:35:35 +00:00
|
|
|
namespace PixelPaint {
|
2020-05-13 10:47:47 +00:00
|
|
|
|
|
|
|
class ImageEditor;
|
2019-06-10 17:54:09 +00:00
|
|
|
|
2020-02-02 14:07:41 +00:00
|
|
|
class PaletteWidget final : public GUI::Frame {
|
2020-05-13 10:47:47 +00:00
|
|
|
C_OBJECT(PaletteWidget);
|
|
|
|
|
2019-06-10 17:54:09 +00:00
|
|
|
public:
|
|
|
|
virtual ~PaletteWidget() override;
|
|
|
|
|
2019-06-10 18:07:26 +00:00
|
|
|
void set_primary_color(Color);
|
|
|
|
void set_secondary_color(Color);
|
|
|
|
|
2021-05-15 22:03:13 +00:00
|
|
|
void set_image_editor(ImageEditor&);
|
|
|
|
|
2019-06-10 18:07:26 +00:00
|
|
|
private:
|
2021-05-15 22:03:13 +00:00
|
|
|
explicit PaletteWidget();
|
2020-05-13 10:47:47 +00:00
|
|
|
|
2021-05-15 22:03:13 +00:00
|
|
|
ImageEditor* m_editor { nullptr };
|
2020-02-02 14:07:41 +00:00
|
|
|
RefPtr<GUI::Frame> m_primary_color_widget;
|
|
|
|
RefPtr<GUI::Frame> m_secondary_color_widget;
|
2019-06-10 17:54:09 +00:00
|
|
|
};
|
2020-05-13 10:47:47 +00:00
|
|
|
|
|
|
|
}
|