summaryrefslogtreecommitdiff
path: root/Userland/Applications/PixelPaint/EditGuideDialog.h
blob: bdc31f6124c53d202281fcee41e5de2229672a59 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/*
 * Copyright (c) 2021, Tobias Christiansen <tobyase@serenityos.org>
 *
 * SPDX-License-Identifier: BSD-2-Clause
 */

#pragma once

#include "Guide.h"
#include "ImageEditor.h"
#include <LibGUI/Dialog.h>

namespace PixelPaint {

class EditGuideDialog final : public GUI::Dialog {
    C_OBJECT(EditGuideDialog);

public:
    DeprecatedString const offset() const { return m_offset; }
    Guide::Orientation orientation() const { return m_orientation; }

    Optional<float> offset_as_pixel(ImageEditor const&);

private:
    EditGuideDialog(GUI::Window* parent_window, DeprecatedString const& offset = {}, Guide::Orientation orientation = Guide::Orientation::Unset);

    DeprecatedString m_offset;
    Guide::Orientation m_orientation;
    RefPtr<GUI::TextBox> m_offset_text_box;
    bool m_is_horizontal_checked { false };
    bool m_is_vertical_checked { false };
};

}