mirror of
https://github.com/RGBCube/serenity
synced 2025-05-18 21:35:06 +00:00
HackStudio: Add header navigation
This commit is contained in:
parent
d8a73dd979
commit
879bf3e97b
4 changed files with 95 additions and 4 deletions
|
@ -33,6 +33,7 @@
|
|||
#include <LibGfx/Font.h>
|
||||
|
||||
extern RefPtr<EditorWrapper> g_current_editor_wrapper;
|
||||
extern Function<void(String)> g_open_file;
|
||||
|
||||
EditorWrapper::EditorWrapper()
|
||||
{
|
||||
|
@ -67,6 +68,10 @@ EditorWrapper::EditorWrapper()
|
|||
m_editor->on_focus = [this] {
|
||||
g_current_editor_wrapper = this;
|
||||
};
|
||||
|
||||
m_editor->on_open = [this](String path) {
|
||||
g_open_file(path);
|
||||
};
|
||||
}
|
||||
|
||||
EditorWrapper::~EditorWrapper()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue