My favorites | Sign in
Project Home Downloads Source
Checkout   Browse   Changes    
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#include "IMapItem.h"
#include "IMapRender.h"

void IMapItem::PerformState(dword state, const String& param)
{
StatesPerformed(state, param);
}

void IMapItem::StateOff(dword state)
{
for (int i = 0; i < _states.GetCount(); ++i)
if (_states[i] == state)
{
_states.Remove(i);
StateChanged(state);
return;
}
}

void IMapItem::StateOn(dword state)
{
for (int i = 0; i < _states.GetCount(); ++i)
if (_states[i] == state)
return;
_states.Add(state);
StateChanged(state);
}

bool IMapItem::IsState(dword state)
{
for (int i = 0; i < _states.GetCount(); ++i)
if (_states[i] == state)
return true;
return false;
}

void IMapItem::PerformStates(dword state, const String& param)
{
for (int i = 0; i < _globalItemList.GetCount(); ++i)
if (_globalItemList[i])
_globalItemList[i]->PerformState(state, param);
}

void IMapItem::StatesOff(dword state)
{
for (int i = 0; i < _globalItemList.GetCount(); ++i)
if (_globalItemList[i])
_globalItemList[i]->StateOff(state);
}

void IMapItem::StatesOn(dword state)
{
for (int i = 0; i < _globalItemList.GetCount(); ++i)
if (_globalItemList[i])
_globalItemList[i]->StateOn(state);
}

bool IMapItem::IsAnyState(dword state)
{
for (int i = 0; i < _globalItemList.GetCount(); ++i)
if (_globalItemList[i])
{
if (_globalItemList[i]->IsState(state))
return true;
}
return false;
}

void IMapItem::StatesChanged(dword state)
{
for (int i = 0; i < _globalItemList.GetCount(); ++i)
if (_globalItemList[i])
_globalItemList[i]->StateChanged(state);
}

void IMapItem::StatesPerformed(dword state, const String& param)
{
for (int i = 0; i < _globalItemList.GetCount(); ++i)
if (_globalItemList[i])
_globalItemList[i]->StatePerformed(state, param);
}

Change log

r4180 by Sc0rch on Nov 17, 2011   Diff
MapRender: First release
(FormEditorCommon, FormEditorProperties,
Map, MapBG, MapCommon, MapEditor,
MapRenderTest.
Go to: 
Project members, sign in to write a code review

Older revisions

All revisions of this file

File info

Size: 1823 bytes, 81 lines
Powered by Google Project Hosting