22 #ifndef __MYGUI_WIDGET_STYLE_H__
23 #define __MYGUI_WIDGET_STYLE_H__
57 const char* name = type.getValueName(value);
58 if (strcmp(name,
"") == 0 || name == _value)
62 type.value = (
Enum)value;
68 return a.value == b.value;
73 return a.value != b.value;
76 friend std::ostream& operator << (std::ostream& _stream,
const WidgetStyle& _value)
78 _stream << _value.getValueName(_value.value);
82 friend std::istream& operator >> (std::istream& _stream,
WidgetStyle& _value)
86 _value = parse(value);
90 std::string print()
const
92 return getValueName(value);
96 const char* getValueName(
int _index)
const
98 static const char* values[MAX + 1] = {
"Child",
"Popup",
"Overlapped",
"" };
99 return values[(_index < MAX && _index >= 0) ? _index : MAX];
108 #endif // __MYGUI_WIDGET_STYLE_H__