22 #ifndef __MYGUI_FLOW_DIRECTION_H__
23 #define __MYGUI_FLOW_DIRECTION_H__
53 const char* name = type.getValueName(value);
54 if (strcmp(name,
"") == 0 || name == _value)
break;
57 type.value = (
Enum)value;
61 bool isHorizontal()
const
63 return value == LeftToRight || value == RightToLeft;
66 bool isVertical()
const
68 return !isHorizontal();
73 return a.value == b.value;
78 return a.value != b.value;
81 friend std::ostream& operator << ( std::ostream& _stream,
const FlowDirection& _value )
83 _stream << _value.getValueName(_value.value);
87 friend std::istream& operator >> ( std::istream& _stream,
FlowDirection& _value )
91 _value = parse(value);
95 std::string print()
const
97 return getValueName(value);
101 const char* getValueName(
int _index)
const
103 static const char* values[MAX + 1] = {
"LeftToRight",
"RightToLeft",
"TopToBottom",
"BottomToTop",
"" };
104 return values[(_index < MAX && _index >= 0) ? _index : MAX];
113 #endif // __MYGUI_FLOW_DIRECTION_H__