Serenity Operating System
1/*
2 * Copyright (c) 2021, Tobias Christiansen <tobyase@serenityos.org>
3 *
4 * SPDX-License-Identifier: BSD-2-Clause
5 */
6
7#pragma once
8
9#include "Guide.h"
10#include "ImageEditor.h"
11#include <LibGUI/Dialog.h>
12
13namespace PixelPaint {
14
15class EditGuideDialog final : public GUI::Dialog {
16 C_OBJECT(EditGuideDialog);
17
18public:
19 DeprecatedString const offset() const { return m_offset; }
20 Guide::Orientation orientation() const { return m_orientation; }
21
22 Optional<float> offset_as_pixel(ImageEditor const&);
23
24private:
25 EditGuideDialog(GUI::Window* parent_window, DeprecatedString const& offset = {}, Guide::Orientation orientation = Guide::Orientation::Unset);
26
27 DeprecatedString m_offset;
28 Guide::Orientation m_orientation;
29 RefPtr<GUI::TextBox> m_offset_text_box;
30 bool m_is_horizontal_checked { false };
31 bool m_is_vertical_checked { false };
32};
33
34}