mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-02-28 02:25:50 +00:00
Add a basic "save as" action to the TextEditor app, and make "save" fall back to using "save as" if there's no name already set. Fixes #282.
23 lines
455 B
C++
23 lines
455 B
C++
#pragma once
|
|
|
|
#include <AK/Function.h>
|
|
#include <LibGUI/GApplication.h>
|
|
#include <LibGUI/GTextEditor.h>
|
|
#include <LibGUI/GWidget.h>
|
|
#include <LibGUI/GWindow.h>
|
|
|
|
class GTextEditor;
|
|
|
|
class TextEditorWidget final : public GWidget {
|
|
public:
|
|
TextEditorWidget();
|
|
virtual ~TextEditorWidget() override;
|
|
void open_sesame(const String& path);
|
|
|
|
private:
|
|
void set_path(const StringView&);
|
|
|
|
GTextEditor* m_editor { nullptr };
|
|
String m_path;
|
|
};
|