7#ifndef MYGUI_FLOW_DIRECTION_H_
8#define MYGUI_FLOW_DIRECTION_H_
40 std::string_view name = type.getValueName(value);
41 if (name.empty() || name == _value)
45 type.mValue =
static_cast<Enum>(value);
51 return mValue == LeftToRight || mValue == RightToLeft;
56 return !isHorizontal();
61 return a.mValue == b.mValue;
66 return a.mValue != b.mValue;
71 _stream << _value.getValueName(_value.mValue);
79 _value = parse(value);
85 return getValueName(mValue);
94 std::string_view getValueName(
int _index)
const
96 if (_index < 0 || _index >= MAX)
98 static const std::string_view values[MAX] = {
"LeftToRight",
"RightToLeft",
"TopToBottom",
"BottomToTop"};
99 return values[_index];
friend std::ostream & operator<<(std::ostream &_stream, const FlowDirection &_value)
FlowDirection(Enum _value=LeftToRight)
static FlowDirection parse(std::string_view _value)
bool isHorizontal() const
friend bool operator!=(FlowDirection const &a, FlowDirection const &b)
std::string_view print() const
friend std::istream & operator>>(std::istream &_stream, FlowDirection &_value)
friend bool operator==(FlowDirection const &a, FlowDirection const &b)