ladybird/Userland/Applications/Run/RunWindow.h

42 lines
975 B
C
Raw Normal View History

2021-01-13 09:10:00 -03:00
/*
* Copyright (c) 2021, Nick Vella <nick@nxk.io>
*
* SPDX-License-Identifier: BSD-2-Clause
2021-01-13 09:10:00 -03:00
*/
#pragma once
#include <LibGUI/Button.h>
#include <LibGUI/ComboBox.h>
2021-01-13 09:10:00 -03:00
#include <LibGUI/ImageWidget.h>
#include <LibGUI/ItemListModel.h>
2021-01-13 09:10:00 -03:00
#include <LibGUI/Window.h>
class RunWindow final : public GUI::Window {
C_OBJECT(RunWindow)
public:
virtual ~RunWindow() override;
virtual void event(Core::Event&) override;
private:
RunWindow();
void do_run();
bool run_as_command(const String& run_input);
bool run_via_launch(const String& run_input);
String history_file_path();
void load_history();
void save_history();
Vector<String> m_path_history;
NonnullRefPtr<GUI::ItemListModel<String>> m_path_history_model;
2021-01-13 09:10:00 -03:00
RefPtr<GUI::ImageWidget> m_icon_image_widget;
RefPtr<GUI::Button> m_ok_button;
RefPtr<GUI::Button> m_cancel_button;
RefPtr<GUI::Button> m_browse_button;
RefPtr<GUI::ComboBox> m_path_combo_box;
2021-01-13 09:10:00 -03:00
};