PuzzleSDK
UIPageViewTest.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__UIPageViewTest__
27#define __TestCpp__UIPageViewTest__
28
29#include "../UIScene.h"
30
31DEFINE_TEST_SUITE(UIPageViewTests);
32
33class UIPageViewTest : public UIScene
34{
35public:
37
40 virtual bool init() override;
41
42 void pageViewEvent(cocos2d::Ref* sender, cocos2d::ui::PageView::EventType type);
43
44protected:
45
46 cocos2d::ui::Text* _displayValueLabel;
47};
48
50{
51public:
53
56 virtual bool init() override;
57
58 void pageViewEvent(cocos2d::Ref* sender, cocos2d::ui::PageView::EventType type);
59 void onButtonClicked(cocos2d::Ref* sender, cocos2d::ui::Widget::TouchEventType type);
60protected:
61
62 cocos2d::ui::Text* _displayValueLabel;
63};
64
66{
67public:
69
72 virtual bool init() override;
73
74 void pageViewEvent(cocos2d::Ref* sender, cocos2d::ui::PageView::EventType type);
75 void onButtonClicked(cocos2d::Ref* sender, cocos2d::ui::Widget::TouchEventType type);
76
77protected:
78
79 cocos2d::ui::Text* _displayValueLabel;
80};
81
83{
84public:
86
89 virtual bool init() override;
90
91 void pageViewEvent(cocos2d::Ref* sender, cocos2d::ui::PageView::EventType type);
92 void onButtonClicked(cocos2d::Ref* sender, cocos2d::ui::Widget::TouchEventType type);
93
94protected:
95
96 cocos2d::ui::Text* _displayValueLabel;
97};
98
100{
101public:
103
106 virtual bool init() override;
107
108protected:
109
110 cocos2d::ui::Text* _displayValueLabel;
111};
112
114{
115public:
117
120 virtual bool init() override;
121
122 void pageViewEvent(cocos2d::Ref* sender, cocos2d::ui::PageView::EventType type);
123
124protected:
125
126 cocos2d::ui::Text* _displayValueLabel;
127};
128
130{
131public:
133
136 virtual bool init() override;
137
138protected:
139
140 cocos2d::ui::Text* _displayValueLabel;
141};
142
144{
145public:
147
150 virtual bool init() override;
151
152 void pageViewEvent(cocos2d::Ref* sender, cocos2d::ui::PageView::EventType type);
153
154protected:
155
156 cocos2d::ui::Text* _displayValueLabel;
157};
158
160{
161public:
163
166 virtual bool init() override;
167
168protected:
169
170 cocos2d::ui::Text* _displayValueLabel;
171};
172
173#endif /* defined(__TestCpp__UIPageViewTest__) */
DEFINE_TEST_SUITE(UIPageViewTests)
virtual bool init() override
cocos2d::ui::Text * _displayValueLabel
void pageViewEvent(cocos2d::Ref *sender, cocos2d::ui::PageView::EventType type)
void onButtonClicked(cocos2d::Ref *sender, cocos2d::ui::Widget::TouchEventType type)
CREATE_FUNC(UIPageViewButtonTest)
void pageViewEvent(cocos2d::Ref *sender, cocos2d::ui::PageView::EventType type)
virtual bool init() override
cocos2d::ui::Text * _displayValueLabel
CREATE_FUNC(UIPageViewChildSizeTest)
cocos2d::ui::Text * _displayValueLabel
CREATE_FUNC(UIPageViewDisableTouchTest)
virtual bool init() override
void onButtonClicked(cocos2d::Ref *sender, cocos2d::ui::Widget::TouchEventType type)
void pageViewEvent(cocos2d::Ref *sender, cocos2d::ui::PageView::EventType type)
CREATE_FUNC(UIPageViewDynamicAddAndRemoveTest)
cocos2d::ui::Text * _displayValueLabel
cocos2d::ui::Text * _displayValueLabel
CREATE_FUNC(UIPageViewIndicatorTest)
virtual bool init() override
CREATE_FUNC(UIPageViewJumpToPageTest)
virtual bool init() override
cocos2d::ui::Text * _displayValueLabel
CREATE_FUNC(UIPageViewTest)
cocos2d::ui::Text * _displayValueLabel
virtual bool init() override
void pageViewEvent(cocos2d::Ref *sender, cocos2d::ui::PageView::EventType type)
CREATE_FUNC(UIPageViewTouchPropagationTest)
void onButtonClicked(cocos2d::Ref *sender, cocos2d::ui::Widget::TouchEventType type)
virtual bool init() override
void pageViewEvent(cocos2d::Ref *sender, cocos2d::ui::PageView::EventType type)
cocos2d::ui::Text * _displayValueLabel
virtual bool init() override
void pageViewEvent(cocos2d::Ref *sender, cocos2d::ui::PageView::EventType type)
CREATE_FUNC(UIPageViewVerticalTest)
cocos2d::ui::Text * _displayValueLabel