MyGUI
3.2.1
Main Page
Related Pages
Namespaces
Data Structures
Files
Examples
File List
Globals
mygui
MyGUIEngine
include
MyGUI_DDItemInfo.h
Go to the documentation of this file.
1
/*
2
* This source file is part of MyGUI. For the latest info, see http://mygui.info/
3
* Distributed under the MIT License
4
* (See accompanying file COPYING.MIT or copy at http://opensource.org/licenses/MIT)
5
*/
6
7
#ifndef __MYGUI_ITEM_DROP_INFO_H__
8
#define __MYGUI_ITEM_DROP_INFO_H__
9
10
#include "
MyGUI_Prerequest.h
"
11
12
namespace
MyGUI
13
{
14
15
struct
MYGUI_EXPORT
DDItemState
16
{
17
enum
Enum
18
{
19
None
,
20
Start
,
21
End
,
22
Miss
,
23
Accept
,
24
Refuse
25
};
26
27
DDItemState
(
Enum
_value = None) :
28
mValue(_value)
29
{
30
}
31
32
friend
bool
operator ==
(
DDItemState
const
& a,
DDItemState
const
& b)
33
{
34
return
a.mValue == b.mValue;
35
}
36
37
friend
bool
operator !=
(
DDItemState
const
& a,
DDItemState
const
& b)
38
{
39
return
a.mValue != b.mValue;
40
}
41
42
int
getValue()
const
43
{
44
return
mValue;
45
}
46
47
private
:
48
Enum
mValue;
49
};
50
51
// структура информации об индексах дропа
53
struct
MYGUI_EXPORT
DDItemInfo
54
{
55
DDItemInfo
() :
56
sender(
nullptr
),
57
sender_index(
ITEM_NONE
),
58
receiver(
nullptr
),
59
receiver_index(
ITEM_NONE
)
60
{
61
}
62
63
DDItemInfo
(
DDContainer
* _sender,
size_t
_sender_index,
DDContainer
* _receiver,
size_t
_receiver_index) :
64
sender(_sender),
65
sender_index(_sender_index),
66
receiver(_receiver),
67
receiver_index(_receiver_index)
68
{
69
}
70
71
void
set
(
DDContainer
* _sender,
size_t
_sender_index,
DDContainer
* _receiver,
size_t
_receiver_index)
72
{
73
sender = _sender;
74
sender_index = _sender_index;
75
receiver = _receiver;
76
receiver_index = _receiver_index;
77
}
78
79
void
reset()
80
{
81
sender =
nullptr
;
82
sender_index =
ITEM_NONE
;
83
receiver =
nullptr
;
84
receiver_index =
ITEM_NONE
;
85
}
86
88
DDContainer
*
sender
;
90
size_t
sender_index
;
91
93
DDContainer
*
receiver
;
95
size_t
receiver_index
;
96
};
97
98
struct
MYGUI_EXPORT
DDWidgetState
99
{
100
DDWidgetState
(
size_t
_index) :
101
index(_index),
102
update(true),
103
accept(false),
104
refuse(false)
105
{
106
}
107
109
size_t
index
;
111
bool
update
;
113
bool
accept
;
115
bool
refuse
;
116
};
117
118
}
// namespace MyGUI
119
120
#endif // __MYGUI_ITEM_DROP_INFO_H__
Generated on Wed Aug 20 2014 00:03:32 for MyGUI by
1.8.3.1