mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-23 09:51:57 -05:00
442256b5f8
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.
22 lines
455 B
C++
22 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;
|
|
};
|