7#ifndef MYGUI_RESIZING_POLICY_H_
8#define MYGUI_RESIZING_POLICY_H_
36 std::string_view name = type.getValueName(value);
37 if (name.empty() || name == _value)
41 type.mValue =
Enum(value);
47 return a.mValue == b.mValue;
52 return a.mValue != b.mValue;
57 _stream << _value.getValueName(_value.mValue);
65 _value =
parse(value);
71 return getValueName(mValue);
80 std::string_view getValueName(
int _index)
const
82 if (_index < 0 || _index >= MAX)
84 static const std::string_view values[MAX] = {
"Auto",
"Fixed",
"Fill"};
85 return values[_index];
ResizingPolicy(Enum _value=MAX)
friend bool operator!=(ResizingPolicy const &a, ResizingPolicy const &b)
friend std::ostream & operator<<(std::ostream &_stream, const ResizingPolicy &_value)
friend bool operator==(ResizingPolicy const &a, ResizingPolicy const &b)
std::string_view print() const
static ResizingPolicy parse(std::string_view _value)
friend std::istream & operator>>(std::istream &_stream, ResizingPolicy &_value)