23 #ifndef __MYGUI_MESSAGE_BOX_STYLE_H__
24 #define __MYGUI_MESSAGE_BOX_STYLE_H__
48 _IndexUserButton1 = 9,
55 _CountUserButtons = 4,
56 _IndexIcon1 = _IndexUserButton1 + _CountUserButtons,
84 friend std::ostream& operator << ( std::ostream& _stream,
const MessageBoxStyle& _value )
90 friend std::istream& operator >> ( std::istream& _stream,
MessageBoxStyle& _value )
102 int num = value >> _IndexIcon1;
106 if ((num & 1) == 1)
return index;
116 size_t getButtonIndex()
123 if ((num & 1) == 1)
return index;
133 std::vector<MessageBoxStyle> getButtons()
135 std::vector<MessageBoxStyle> buttons;
139 while (index < _IndexIcon1)
158 const MapAlign& map_names = result.getValueNames();
160 for (
size_t pos=0; pos<vec.size(); pos++)
162 MapAlign::const_iterator iter = map_names.find(vec[pos]);
163 if (iter != map_names.end())
165 result.value =
Enum(
int(result.value) |
int(iter->second));
169 MYGUI_LOG(Warning,
"Cannot parse type '" << vec[pos] <<
"'");
176 const MapAlign& getValueNames()
178 static MapAlign map_names;
180 if (map_names.empty())
224 #endif // __MYGUI_MESSAGE_BOX_STYLE_H__