MCPcopy Create free account
hub / github.com/MyGUI/mygui / MessageBoxStyle

Class MessageBoxStyle

Common/MessageBox/MessageBoxStyle.h:14–225  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12{
13
14 struct MessageBoxStyle
15 {
16 enum Enum
17 {
18 None = MYGUI_FLAG_NONE,
19 Ok = MYGUI_FLAG(0),
20 Yes = MYGUI_FLAG(1),
21 No = MYGUI_FLAG(2),
22 Abort = MYGUI_FLAG(3),
23 Retry = MYGUI_FLAG(4),
24 Ignore = MYGUI_FLAG(5),
25 Cancel = MYGUI_FLAG(6),
26 Try = MYGUI_FLAG(7),
27 Continue = MYGUI_FLAG(8),
28
29 _indexUserButton1 = 9, // индекс первой кнопки юзера
30
31 Button1 = MYGUI_FLAG(_indexUserButton1),
32 Button2 = MYGUI_FLAG(_indexUserButton1 + 1),
33 Button3 = MYGUI_FLAG(_indexUserButton1 + 2),
34 Button4 = MYGUI_FLAG(_indexUserButton1 + 3),
35
36 _countUserButtons = 4, // колличество кнопок юзера
37 _indexIcon1 = _indexUserButton1 + _countUserButtons, // индекс первой иконки
38
39 IconDefault = MYGUI_FLAG(_indexIcon1),
40
41 IconInfo = MYGUI_FLAG(_indexIcon1),
42 IconQuest = MYGUI_FLAG(_indexIcon1 + 1),
43 IconError = MYGUI_FLAG(_indexIcon1 + 2),
44 IconWarning = MYGUI_FLAG(_indexIcon1 + 3),
45
46 Icon1 = MYGUI_FLAG(_indexIcon1),
47 Icon2 = MYGUI_FLAG(_indexIcon1 + 1),
48 Icon3 = MYGUI_FLAG(_indexIcon1 + 2),
49 Icon4 = MYGUI_FLAG(_indexIcon1 + 3),
50 Icon5 = MYGUI_FLAG(_indexIcon1 + 4),
51 Icon6 = MYGUI_FLAG(_indexIcon1 + 5),
52 Icon7 = MYGUI_FLAG(_indexIcon1 + 6),
53 Icon8 = MYGUI_FLAG(_indexIcon1 + 7)
54 };
55
56 MessageBoxStyle(Enum _value = None) :
57 mValue(_value)
58 {
59 }
60
61 MessageBoxStyle& operator|=(MessageBoxStyle const& _other)
62 {
63 mValue = (mValue | _other.mValue).mValue;
64 return *this;
65 }
66
67 friend MessageBoxStyle operator|(Enum const& a, Enum const& b)
68 {
69 return {Enum((unsigned int)a | (unsigned int)b)};
70 }
71

Callers 1

addButtonNameMethod · 0.85

Calls 2

parseFunction · 0.50
emptyMethod · 0.45

Tested by

no test coverage detected