13 Align Align::parse(std::string_view _value)
15 Align result(
Enum(0));
16 const MapAlign& map_names = Align::getValueNames();
18 for (
const auto& pos : vec)
20 auto iter = map_names.find(pos);
21 if (iter != map_names.end())
23 result |= iter->second;
29 std::string Align::print()
const
40 else if (mValue & Right)
48 result +=
" VStretch";
52 else if (mValue & Bottom)
60 const Align::MapAlign& Align::getValueNames()
62 static MapAlign map_names;
64 if (map_names.empty())
66#ifndef MYGUI_DONT_USE_OBSOLETE
68 map_names[
"ALIGN_HCENTER"] = HCenter;
69 map_names[
"ALIGN_VCENTER"] = VCenter;
70 map_names[
"ALIGN_CENTER"] = Center;
71 map_names[
"ALIGN_LEFT"] =
Left;
72 map_names[
"ALIGN_RIGHT"] =
Right;
73 map_names[
"ALIGN_HSTRETCH"] = HStretch;
74 map_names[
"ALIGN_TOP"] =
Top;
75 map_names[
"ALIGN_BOTTOM"] =
Bottom;
76 map_names[
"ALIGN_VSTRETCH"] = VStretch;
77 map_names[
"ALIGN_STRETCH"] = Stretch;
78 map_names[
"ALIGN_DEFAULT"] = Default;
#define MYGUI_REGISTER_VALUE(map, value)
std::vector< std::string > split(std::string_view _source, std::string_view _delims)