23 #ifndef __MYGUI_MENU_ITEM_TYPE_H__
24 #define __MYGUI_MENU_ITEM_TYPE_H__
47 const char * name = type.getValueName(value);
48 if (strcmp(name,
"") == 0 || name == _value)
break;
60 friend std::ostream& operator << ( std::ostream& _stream,
const MenuItemType& _value )
62 _stream << _value.getValueName(_value.value);
66 friend std::istream& operator >> ( std::istream& _stream,
MenuItemType& _value )
74 std::string
print()
const {
return getValueName(value); }
77 const char * getValueName(
int _index)
const
79 static const char * values[MAX + 1] = {
"Normal",
"Popup",
"Separator",
"" };
80 return values[(_index < MAX && _index >= 0) ? _index : MAX];
89 #endif // __MYGUI_MENU_ITEM_TYPE_H__