GitCommitDialog.h 726 B

1234567891011121314151617181920212223242526272829303132333435
  1. /*
  2. * Copyright (c) 2021, Conor Byrne <conor@cbyrne.dev>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #pragma once
  7. #include <AK/RefPtr.h>
  8. #include <LibGUI/Button.h>
  9. #include <LibGUI/Dialog.h>
  10. #include <LibGUI/Label.h>
  11. #include <LibGUI/TextEditor.h>
  12. #include <LibGUI/Window.h>
  13. namespace HackStudio {
  14. using OnCommitCallback = Function<void(String const& message)>;
  15. class GitCommitDialog final : public GUI::Dialog {
  16. C_OBJECT(GitCommitDialog);
  17. public:
  18. OnCommitCallback on_commit;
  19. private:
  20. GitCommitDialog(GUI::Window* parent);
  21. RefPtr<GUI::Button> m_commit_button;
  22. RefPtr<GUI::Button> m_cancel_button;
  23. RefPtr<GUI::TextEditor> m_message_editor;
  24. RefPtr<GUI::Label> m_line_and_col_label;
  25. };
  26. }