-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathGGroup.h
74 lines (54 loc) · 1.71 KB
/
GGroup.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
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
#ifndef __GGROUP_H__
#define __GGROUP_H__
#include "cocos2d.h"
#include "FairyGUIMacros.h"
#include "GObject.h"
NS_FGUI_BEGIN
class GGroup : public GObject
{
public:
GGroup();
virtual ~GGroup();
CREATE_FUNC(GGroup);
GroupLayoutType getLayout() { return _layout; }
void setLayout(GroupLayoutType value);
int getColumnGap() { return _columnGap; }
void setColumnGap(int value);
int getLineGap() { return _lineGap; }
void setLineGap(int value);
bool isExcludeInvisibles() { return _excludeInvisibles; }
void setExcludeInvisibles(bool value);
bool isAutoSizeDisabled() { return _autoSizeDisabled; }
void setAutoSizeDisabled(bool value);
int getMainGridIndex() { return _mainGridIndex; }
void setMainGridIndex(int value);
int getMainGridMinSize() { return _mainGridMinSize; }
void setMainGridMinSize(int value);
void setBoundsChangedFlag(bool positionChangedOnly = false);
void moveChildren(float dx, float dy);
void resizeChildren(float dw, float dh);
int _updating;
protected:
virtual void setup_beforeAdd(ByteBuffer* buffer, int beginPos) override;
virtual void setup_afterAdd(ByteBuffer* buffer, int beginPos) override;
virtual void handleAlphaChanged() override;
virtual void handleVisibleChanged() override;
private:
void updateBounds();
void handleLayout();
CALL_LATER_FUNC(GGroup, ensureBoundsCorrect);
GroupLayoutType _layout;
int _lineGap;
int _columnGap;
bool _excludeInvisibles;
bool _autoSizeDisabled;
int _mainGridIndex;
int _mainGridMinSize;
bool _percentReady;
bool _boundsChanged;
int _mainChildIndex;
float _totalSize;
int _numChildren;
};
NS_FGUI_END
#endif