2012-09-09 22:34:32 +08:00
|
|
|
#ifndef __TABLEVIEWTESTSCENE_H__
|
|
|
|
#define __TABLEVIEWTESTSCENE_H__
|
|
|
|
|
|
|
|
#include "cocos2d.h"
|
2013-10-16 16:48:39 +08:00
|
|
|
#include "extensions/cocos-ext.h"
|
2015-04-03 14:31:03 +08:00
|
|
|
#include "BaseTest.h"
|
2012-09-09 22:34:32 +08:00
|
|
|
|
2015-04-03 14:31:03 +08:00
|
|
|
DEFINE_TEST_SUITE(TableViewTests);
|
2012-09-09 22:34:32 +08:00
|
|
|
|
2015-04-03 14:31:03 +08:00
|
|
|
class TableViewTest : public TestCase, public cocos2d::extension::TableViewDataSource, public cocos2d::extension::TableViewDelegate
|
2012-09-09 22:34:32 +08:00
|
|
|
{
|
|
|
|
public:
|
2015-04-03 14:31:03 +08:00
|
|
|
CREATE_FUNC(TableViewTest);
|
2012-09-09 22:34:32 +08:00
|
|
|
|
2015-04-03 14:31:03 +08:00
|
|
|
virtual bool init() override;
|
2012-09-09 22:34:32 +08:00
|
|
|
|
2015-07-15 12:04:48 +08:00
|
|
|
virtual void scrollViewDidScroll(cocos2d::extension::ScrollView* view)override {};
|
|
|
|
virtual void scrollViewDidZoom(cocos2d::extension::ScrollView* view)override {}
|
|
|
|
virtual void tableCellTouched(cocos2d::extension::TableView* table, cocos2d::extension::TableViewCell* cell)override;
|
|
|
|
virtual cocos2d::Size tableCellSizeForIndex(cocos2d::extension::TableView *table, ssize_t idx)override;
|
|
|
|
virtual cocos2d::extension::TableViewCell* tableCellAtIndex(cocos2d::extension::TableView *table, ssize_t idx)override;
|
|
|
|
virtual ssize_t numberOfCellsInTableView(cocos2d::extension::TableView *table)override;
|
2012-09-09 22:34:32 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // __TABLEVIEWTESTSCENE_H__
|