Add all the files

This commit is contained in:
Exzap 2022-08-22 22:21:23 +02:00
parent e3db07a16a
commit d60742f52b
1445 changed files with 430238 additions and 0 deletions

26
src/gui/wxHelper.h Normal file
View file

@ -0,0 +1,26 @@
#pragma once
#include <wx/string.h>
namespace wxHelper
{
// wxString to utf8 std::string
inline std::string MakeUTF8(const wxString& str)
{
auto tmpUtf8 = str.ToUTF8();
return std::string(tmpUtf8.data(), tmpUtf8.length());
}
inline fs::path MakeFSPath(const wxString& str)
{
auto tmpUtf8 = str.ToUTF8();
auto sv = std::basic_string_view<char8_t>((const char8_t*)tmpUtf8.data(), tmpUtf8.length());
return fs::path(sv);
}
inline wxString FromUtf8(std::string_view str)
{
return wxString::FromUTF8(str.data(), str.size());
}
};