7 #ifndef __MYGUI_RESIZING_POLICY_H__
8 #define __MYGUI_RESIZING_POLICY_H__
36 const char* name = type.getValueName(value);
37 if (strcmp(name,
"") == 0 || name == _value)
41 type.mValue =
Enum(value);
47 return a.mValue == b.mValue;
52 return a.mValue != b.mValue;
55 friend std::ostream& operator << (std::ostream& _stream,
const ResizingPolicy& _value)
57 _stream << _value.getValueName(_value.mValue);
61 friend std::istream& operator >> (std::istream& _stream,
ResizingPolicy& _value)
65 _value = parse(value);
69 std::string print()
const
71 return getValueName(mValue);
80 const char* getValueName(
int _index)
const
82 static const char* values[MAX + 1] = {
"Auto",
"Fixed",
"Fill",
"" };
83 return values[(_index < MAX && _index >= 0) ? _index : MAX];
92 #endif // __MYGUI_RESIZING_POLICY_H__