-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathRelations.h
39 lines (30 loc) · 856 Bytes
/
Relations.h
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
#ifndef __RELATIONS_H__
#define __RELATIONS_H__
#include "cocos2d.h"
#include "FairyGUIMacros.h"
#include "RelationItem.h"
NS_FGUI_BEGIN
class GObject;
class ByteBuffer;
class Relations
{
public:
Relations(GObject* owner);
~Relations();
void add(GObject* target, RelationType relationType);
void add(GObject* target, RelationType relationType, bool usePercent);
void remove(GObject* target, RelationType relationType);
bool contains(GObject* target);
void clearFor(GObject* target);
void clearAll();
void copyFrom(const Relations& source);
void onOwnerSizeChanged(float dWidth, float dHeight, bool applyPivot);
bool isEmpty() const;
void setup(ByteBuffer* buffer, bool parentToChild);
GObject* handling;
private:
GObject* _owner;
std::vector<RelationItem*> _items;
};
NS_FGUI_END
#endif