23 #ifndef __MYGUI_WIDGET_TYPE_H__
24 #define __MYGUI_WIDGET_TYPE_H__
48 const char * name = type.getValueName(value);
49 if (strcmp(name,
"") == 0 || name == _value)
break;
52 type.value = (
Enum)value;
62 friend std::ostream& operator << ( std::ostream& _stream,
const WidgetStyle& _value )
64 _stream << _value.getValueName(_value.value);
68 friend std::istream& operator >> ( std::istream& _stream,
WidgetStyle& _value )
76 std::string
print()
const {
return getValueName(value); }
79 const char * getValueName(
int _index)
const
81 static const char * values[MAX + 1] = {
"Child",
"Popup",
"Overlapped",
"" };
82 return values[(_index < MAX && _index >= 0) ? _index : MAX];
91 #endif // __MYGUI_WIDGET_TYPE_H__