1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-18 18:45:08 +00:00
serenity/Applications/TextEditor/TextEditorWidget.h
Andreas Kling bb74832dd6 TextEditor: Add a search bar that allows you to search for text
If the text is not found, we show a friendly message box that says we
didn't find the text! :^)
2019-08-21 21:30:20 +02:00

34 lines
794 B
C++

#pragma once
#include <AK/FileSystemPath.h>
#include <AK/Function.h>
#include <LibGUI/GApplication.h>
#include <LibGUI/GTextEditor.h>
#include <LibGUI/GWidget.h>
#include <LibGUI/GWindow.h>
class GButton;
class GTextBox;
class GTextEditor;
class TextEditorWidget final : public GWidget {
public:
TextEditorWidget();
virtual ~TextEditorWidget() override;
void open_sesame(const String& path);
private:
void set_path(const FileSystemPath& file);
GTextEditor* m_editor { nullptr };
String m_path;
String m_name;
String m_extension;
RefPtr<GAction> m_new_action;
RefPtr<GAction> m_open_action;
RefPtr<GAction> m_save_action;
RefPtr<GAction> m_save_as_action;
GTextBox* m_find_textbox { nullptr };
GButton* m_find_button { nullptr };
};