frontend/gui refactor

This commit is contained in:
MihailRis
2024-01-31 05:55:01 +03:00
parent 8c722b146e
commit 1ba563d42a
13 changed files with 207 additions and 148 deletions
+23 -5
View File
@@ -1,6 +1,7 @@
#ifndef FRONTEND_GUI_GUI_UTIL_H_
#define FRONTEND_GUI_GUI_UTIL_H_
#include <memory>
#include <string>
#include "GUI.h"
@@ -9,11 +10,28 @@ namespace gui {
}
namespace guiutil {
gui::Button* backButton(gui::PagesControl* menu);
gui::Button* gotoButton(std::wstring text, const std::string& page, gui::PagesControl* menu);
void alert(gui::GUI* gui, const std::wstring& text, gui::runnable on_hidden=nullptr);
void confirm(gui::GUI* gui, const std::wstring& text, gui::runnable on_confirm=nullptr,
std::wstring yestext=L"", std::wstring notext=L"");
std::shared_ptr<gui::Button> backButton(
std::shared_ptr<gui::PagesControl> menu
);
std::shared_ptr<gui::Button> gotoButton(
std::wstring text,
const std::string& page,
std::shared_ptr<gui::PagesControl> menu
);
void alert(
gui::GUI* gui,
const std::wstring& text,
gui::runnable on_hidden=nullptr
);
void confirm(
gui::GUI* gui,
const std::wstring& text,
gui::runnable on_confirm=nullptr,
std::wstring yestext=L"",
std::wstring notext=L"");
}
#endif // FRONTEND_GUI_GUI_UTIL_H_