7#ifndef MYGUI_MENU_ITEM_TYPE_H_
8#define MYGUI_MENU_ITEM_TYPE_H_
36 std::string_view name = type.getValueName(value);
37 if (name.empty() || name == _value)
41 type.mValue =
static_cast<Enum>(value);
47 return a.mValue == b.mValue;
52 return a.mValue != b.mValue;
57 _stream << _value.getValueName(_value.mValue);
65 _value =
parse(value);
71 return getValueName(mValue);
80 std::string_view getValueName(
int _index)
const
82 if (_index < 0 || _index >= MAX)
84 static const std::string_view values[MAX] = {
"Normal",
"Popup",
"Separator"};
85 return values[_index];