TextEditorWidget.h 597 B

1234567891011121314151617181920212223242526
  1. #pragma once
  2. #include <AK/Function.h>
  3. #include <LibGUI/GApplication.h>
  4. #include <LibGUI/GTextEditor.h>
  5. #include <LibGUI/GWidget.h>
  6. #include <LibGUI/GWindow.h>
  7. class GTextEditor;
  8. class TextEditorWidget final : public GWidget {
  9. public:
  10. TextEditorWidget();
  11. virtual ~TextEditorWidget() override;
  12. void open_sesame(const String& path);
  13. private:
  14. void set_path(const StringView&);
  15. GTextEditor* m_editor { nullptr };
  16. String m_path;
  17. RefPtr<GAction> m_new_action;
  18. RefPtr<GAction> m_open_action;
  19. RefPtr<GAction> m_save_action;
  20. RefPtr<GAction> m_save_as_action;
  21. };