mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 09:28:11 +00:00
TextEditor: Move the application UI into a dedicated TextEditorWidget. (#292)
Added a main widget for the text editor as a stepping stone to add new features.
This commit is contained in:
parent
2dc0ea1cf9
commit
d7b836858e
4 changed files with 154 additions and 130 deletions
20
Applications/TextEditor/TextEditorWidget.h
Normal file
20
Applications/TextEditor/TextEditorWidget.h
Normal file
|
@ -0,0 +1,20 @@
|
|||
#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:
|
||||
GTextEditor* m_editor{ nullptr };
|
||||
String m_path = "/tmp/TextEditor.save.txt";
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue