7 #ifndef __MYGUI_WIDGET_STYLE_H__
8 #define __MYGUI_WIDGET_STYLE_H__
42 const char* name = type.getValueName(value);
43 if (strcmp(name,
"") == 0 || name == _value)
47 type.mValue = (
Enum)value;
53 return a.mValue == b.mValue;
58 return a.mValue != b.mValue;
61 friend std::ostream& operator << (std::ostream& _stream,
const WidgetStyle& _value)
63 _stream << _value.getValueName(_value.mValue);
67 friend std::istream& operator >> (std::istream& _stream,
WidgetStyle& _value)
71 _value = parse(value);
75 std::string print()
const
77 return getValueName(mValue);
86 const char* getValueName(
int _index)
const
88 static const char* values[MAX + 1] = {
"Child",
"Popup",
"Overlapped",
"" };
89 return values[(_index < MAX && _index >= 0) ? _index : MAX];
98 #endif // __MYGUI_WIDGET_STYLE_H__