1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-25 20:15:07 +00:00
serenity/Userland/DevTools/HackStudio/FormWidget.h
Brian Gianforcaro 1682f0b760 Everything: Move to SPDX license identifiers in all files.
SPDX License Identifiers are a more compact / standardized
way of representing file license information.

See: https://spdx.dev/resources/use/#identifiers

This was done with the `ambr` search and replace tool.

 ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
2021-04-22 11:22:27 +02:00

41 lines
974 B
C++

/*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <AK/Badge.h>
#include <LibGUI/Widget.h>
namespace HackStudio {
class CursorTool;
class FormEditorWidget;
class FormWidget final : public GUI::Widget {
C_OBJECT(FormWidget)
public:
virtual ~FormWidget() override;
FormEditorWidget& editor();
const FormEditorWidget& editor() const;
// FIXME: This should be an app-wide preference instead.
int grid_size() const { return m_grid_size; }
private:
virtual void paint_event(GUI::PaintEvent&) override;
virtual void second_paint_event(GUI::PaintEvent&) override;
virtual void mousedown_event(GUI::MouseEvent&) override;
virtual void mouseup_event(GUI::MouseEvent&) override;
virtual void mousemove_event(GUI::MouseEvent&) override;
virtual void keydown_event(GUI::KeyEvent&) override;
FormWidget();
int m_grid_size { 5 };
};
}