serenity/Applications/TextEditor/TextEditorWidget.h
Andreas Kling 442256b5f8 TextEditor: Add "Save as..." action.
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.
2019-07-24 06:32:30 +02:00

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;
};