PuzzleSDK
WindowEventsTest类 参考

#include <NewEventDispatcherTest.h>

+ 类 WindowEventsTest 继承关系图:
+ WindowEventsTest 的协作图:

Public 成员函数

 CREATE_FUNC (WindowEventsTest)
 
 WindowEventsTest ()
 
virtual std::string title () const override
 
virtual std::string subtitle () const override
 
- Public 成员函数 继承自 TestCase
 TestCase ()
 
 ~TestCase ()
 
virtual Type getTestType () const
 
virtual float getDuration () const
 
virtual std::string getExpectedOutput () const
 
virtual std::string getActualOutput () const
 
virtual void restartTestCallback (cocos2d::Ref *sender)
 
virtual void nextTestCallback (cocos2d::Ref *sender)
 
virtual void priorTestCallback (cocos2d::Ref *sender)
 
virtual void onBackCallback (cocos2d::Ref *sender)
 
void setTestSuite (TestSuite *testSuite)
 
TestSuitegetTestSuite () const
 
float getRunTime () const
 
void setTestCaseName (const std::string &name)
 
std::string getTestCaseName () const
 
const cocos2d::Label * getSubtitleLable () const
 
const cocos2d::MenuItemImage * getRestartTestItem () const
 
virtual void onEnter () override
 

额外继承的成员函数

- Public 类型 继承自 TestCase
enum class  Type { ROBUSTNESS , UNIT , GRAPHICAL_STATIC , MANUAL }
 
- Public 属性 继承自 TestCase
CC_CONSTRUCTOR_ACCESS __pad0__: virtual bool init() override
 
- Protected 属性 继承自 TestCase
cocos2d::MenuItemImage * _priorTestItem
 
cocos2d::MenuItemImage * _restartTestItem
 
cocos2d::MenuItemImage * _nextTestItem
 
cocos2d::Label * _titleLabel
 
cocos2d::Label * _subtitleLabel
 

详细描述

在文件 NewEventDispatcherTest.h276 行定义.

构造及析构函数说明

◆ WindowEventsTest()

WindowEventsTest::WindowEventsTest ( )

在文件 NewEventDispatcherTest.cpp1557 行定义.

1558{
1559#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) || (CC_TARGET_PLATFORM == CC_PLATFORM_LINUX) || (CC_TARGET_PLATFORM == CC_PLATFORM_MAC)
1560 auto dispatcher = Director::getInstance()->getEventDispatcher();
1561 dispatcher->addCustomEventListener(GLViewImpl::EVENT_WINDOW_RESIZED, [](EventCustom* event) {
1562 // TODO: need to create resizeable window
1563 log("<<< WINDOW RESIZED! >>> ");
1564 });
1565 dispatcher->addCustomEventListener(GLViewImpl::EVENT_WINDOW_FOCUSED, [](EventCustom* event) {
1566 log("<<< WINDOW FOCUSED! >>> ");
1567 });
1568 dispatcher->addCustomEventListener(GLViewImpl::EVENT_WINDOW_UNFOCUSED, [](EventCustom* event) {
1569 log("<<< WINDOW BLURRED! >>> ");
1570 });
1571#endif
1572}

成员函数说明

◆ CREATE_FUNC()

WindowEventsTest::CREATE_FUNC ( WindowEventsTest  )

◆ subtitle()

std::string WindowEventsTest::subtitle ( ) const
overridevirtual

重载 TestCase .

在文件 NewEventDispatcherTest.cpp1579 行定义.

1580{
1581#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) || (CC_TARGET_PLATFORM == CC_PLATFORM_LINUX) || (CC_TARGET_PLATFORM == CC_PLATFORM_MAC)
1582 return "Resize and Switch to another window and back. Read Logs.";
1583#else
1584 return "Unsupported platform.";
1585#endif
1586}

◆ title()

std::string WindowEventsTest::title ( ) const
overridevirtual

重载 EventDispatcherTestDemo .

在文件 NewEventDispatcherTest.cpp1574 行定义.

1575{
1576 return "WindowEventsTest";
1577}

该类的文档由以下文件生成: