1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-23 10:45:07 +00:00
serenity/DevTools/HackStudio/Editor.h
Andreas Kling e2c74762ff HackStudio: Draw a brownish frame around the current editor widget
Also make the editor filename label bold only for the current editor.
2019-10-27 20:44:37 +01:00

26 lines
541 B
C++

#pragma once
#include <LibGUI/GTextEditor.h>
class EditorWrapper;
class Editor final : public GTextEditor {
C_OBJECT(Editor)
public:
virtual ~Editor() override {}
Function<void()> on_focus;
EditorWrapper& wrapper();
const EditorWrapper& wrapper() const;
private:
virtual void focusin_event(CEvent&) override;
virtual void focusout_event(CEvent&) override;
virtual void paint_event(GPaintEvent&) override;
Editor(GWidget* parent)
: GTextEditor(GTextEditor::MultiLine, parent)
{
}
};