PuzzleSDK
UILayoutTest.h
浏览该文件的文档.
1/****************************************************************************
2 Copyright (c) 2013 cocos2d-x.org
3 Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.
4
5 http://www.cocos2d-x.org
6
7 Permission is hereby granted, free of charge, to any person obtaining a copy
8 of this software and associated documentation files (the "Software"), to deal
9 in the Software without restriction, including without limitation the rights
10 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 copies of the Software, and to permit persons to whom the Software is
12 furnished to do so, subject to the following conditions:
13
14 The above copyright notice and this permission notice shall be included in
15 all copies or substantial portions of the Software.
16
17 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 THE SOFTWARE.
24 ****************************************************************************/
25
26#ifndef __TestCpp__UILayoutTest__
27#define __TestCpp__UILayoutTest__
28
29#include "../UIScene.h"
30
31DEFINE_TEST_SUITE(UILayoutTests);
32
33class UILayoutTest : public UIScene
34{
35public:
38 virtual bool init() override;
39
41};
42
44{
45public:
48 virtual bool init() override;
49
51};
52
54{
55public:
58 virtual bool init() override;
59
61};
62
64{
65public:
68 virtual bool init() override;
69
71
72 void printWidgetResources(cocos2d::Ref* sender);
73protected:
74 cocos2d::ui::Layout* _layout;
75};
76
78{
79public:
82 virtual bool init() override;
83
85};
86
88{
89public:
92 virtual bool init() override;
93
95};
96
98{
99public:
102 virtual bool init() override;
103
105};
106
108{
109public:
112 virtual bool init() override;
113
115};
116
118{
119public:
122 virtual bool init() override;
123
125};
126
128{
129public:
132 virtual bool init() override;
133
135};
136
138{
139public:
141
142 virtual bool init() override;
143 void touchEvent(cocos2d::Ref* sender, cocos2d::ui::Widget::TouchEventType type);
144protected:
145 cocos2d::LayerColor* _baseLayer;
146
147};
148
150{
151public:
152 virtual bool init() override;
153
155};
156
158{
159public:
160 virtual bool init() override;
161
163};
164
165#endif /* defined(__TestCpp__UILayoutTest__) */
DEFINE_TEST_SUITE(UILayoutTests)
CREATE_FUNC(UILayoutComponent_Berth_Stretch_Test)
virtual bool init() override
CREATE_FUNC(UILayoutComponent_Berth_Test)
cocos2d::LayerColor * _baseLayer
Definition: UILayoutTest.h:145
virtual bool init() override
CREATE_FUNC(UILayoutComponentTest)
void touchEvent(cocos2d::Ref *sender, cocos2d::ui::Widget::TouchEventType type)
CREATE_FUNC(UILayoutTest_BackGroundImage_Scale9)
cocos2d::ui::Layout * _layout
Definition: UILayoutTest.h:74
virtual bool init() override
CREATE_FUNC(UILayoutTest_BackGroundImage)
void printWidgetResources(cocos2d::Ref *sender)
virtual bool init() override
CREATE_FUNC(UILayoutTest_Color)
CREATE_FUNC(UILayoutTest_Gradient)
virtual bool init() override
CREATE_FUNC(UILayoutTest_Layout_Linear_Horizontal)
CREATE_FUNC(UILayoutTest_Layout_Linear_Vertical)
CREATE_FUNC(UILayoutTest_Layout_Relative_Align_Parent)
CREATE_FUNC(UILayoutTest_Layout_Relative_Location)
virtual bool init() override
CREATE_FUNC(UILayoutTest_Layout_Scaled_Widget)
CREATE_FUNC(UILayoutTest)
virtual bool init() override