axmol/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UISceneManager.h

154 lines
5.1 KiB
C
Raw Normal View History

2013-09-16 20:54:13 +08:00
/****************************************************************************
Copyright (c) 2013 cocos2d-x.org
http://www.cocos2d-x.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
****************************************************************************/
#ifndef __TestCpp__UISceneManager__
#define __TestCpp__UISceneManager__
#include "cocos2d.h"
USING_NS_CC;
2013-12-23 15:35:35 +08:00
enum
{
kUIButtonTest = 0,
kUIButtonTest_Scale9,
kUIButtonTest_PressedAction,
kUIButtonTest_Title,
kUIButtonTest_RemoveSelf,
2014-07-31 11:07:20 +08:00
kUIButtonTestSwitchScale9,
kUIButtonTestZoomScale,
2014-09-12 13:50:13 +08:00
kUIButtonTextOnly,
kUIButtonIgnoreContentSizeTest,
kUIButtonTitleEffectTest,
2014-09-19 14:21:18 +08:00
#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) || (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) || (CC_TARGET_PLATFORM == CC_PLATFORM_MAC) || (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) || (CC_TARGET_PLATFORM == CC_PLATFORM_TIZEN) || (CC_TARGET_PLATFORM == CC_PLATFORM_WP8)
2014-08-19 10:28:24 +08:00
kUIEditBoxTest,
2014-09-19 14:21:18 +08:00
#endif
2013-12-23 15:35:35 +08:00
kUICheckBoxTest,
kUISliderTest,
kUISliderTest_Scale9,
kUIImageViewTest,
kUIImageViewTest_Scale9,
kUIImageViewTest_ContentSize,
2013-12-23 15:35:35 +08:00
kUILoadingBarTest_Left,
kUILoadingBarTest_Right,
kUILoadingBarTest_Left_Scale9,
kUILoadingBarTest_Right_Scale9,
2014-03-04 16:51:35 +08:00
kUITextAtlasTest,
kUITextTest,
kUITextTest_LineWrap,
2014-06-09 14:34:46 +08:00
2013-12-23 15:35:35 +08:00
kUILabelTest_Effect,
2014-03-04 16:51:35 +08:00
kUITextTest_TTF,
kUITextBMFontTest,
2013-12-23 15:35:35 +08:00
kUITextFieldTest,
kUITextFieldTest_MaxLength,
kUITextFieldTest_Password,
2014-03-04 16:51:35 +08:00
kUITextFieldTest_LineWrap,
2014-07-14 14:29:28 +08:00
kUITextFieldTest_TrueTypeFont,
kUITextFieldTest_PlaceHolderColor,
2013-12-23 15:35:35 +08:00
kUILayoutTest,
kUILayoutTest_Color,
kUILayoutTest_Gradient,
kUILayoutTest_BackGroundImage,
kUILayoutTest_BackGroundImage_Scale9,
kUILayoutTest_Layout_Linear_Vertical,
kUILayoutTest_Layout_Linear_Horizontal,
kUILayoutTest_Layout_Relative_Align_Parent,
kUILayoutTest_Layout_Relative_Location,
kUIScrollViewTest_Vertical,
kUIScrollViewTest_Horizontal,
kUIScrollViewTest_Both,
kUIScrollViewTest_ScrollToPercentBothDirection,
2014-08-15 16:21:27 +08:00
kUIScrollViewTest_ScrollToPercentBothDirection_Bounce,
kUIScrollViewNestTest,
2013-12-23 15:35:35 +08:00
kUIPageViewTest,
2014-07-07 15:31:06 +08:00
kUIPageViewButtonTest,
kUIPageViewCustomScrollThreshold,
kUIPageViewTouchPropagationTest,
2013-12-23 15:35:35 +08:00
kUIListViewTest_Vertical,
kUIListViewTest_Horizontal,
kUIWidgetAddNodeTest,
2014-03-06 20:52:29 +08:00
kUIRichTextTest,
KUIFocusTest_HBox,
KUIFocusTest_VBox,
2014-05-06 14:38:45 +08:00
KUIFocusTest_NestedLayout1,
2014-05-07 11:40:01 +08:00
KUIFocusTest_NestedLayout2,
2014-05-07 18:27:05 +08:00
KUIFocusTest_NestedLayout3,
2014-05-20 17:56:52 +08:00
kUIFocusTest_ListView,
#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS)
2014-05-09 11:30:07 +08:00
kUIVideoPlayerTest,
#endif
#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS || CC_TARGET_PLATFORM == CC_PLATFORM_WIN32)
KWebViewTest,
#endif
2014-07-29 14:33:22 +08:00
kUIScale9SpriteTest,
kUIScale9SpriteHierarchialTest,
kUIScale9SpriteTouchTest,
kUIS9BatchNodeBasic,
kUIS9FrameNameSpriteSheet,
kUIS9FrameNameSpriteSheetRotated,
kUIS9BatchNodeScaledNoInsets,
kUIS9FrameNameSpriteSheetScaledNoInsets,
kUIS9FrameNameSpriteSheetRotatedScaledNoInsets,
kUIS9BatchNodeScaleWithCapInsets,
kUIS9FrameNameSpriteSheetInsets,
kUIS9FrameNameSpriteSheetInsetsScaled,
kUIS9FrameNameSpriteSheetRotatedInsets,
kUIS9_TexturePacker,
kUIS9FrameNameSpriteSheetRotatedInsetsScaled,
kUIS9FrameNameSpriteSheetRotatedSetCapInsetLater,
kUIS9CascadeOpacityAndColor,
kUIS9ZOrder,
kUIS9Flip,
kUIS9ChangeAnchorPoint,
2013-12-23 15:35:35 +08:00
kUITestMax
};
class UISceneManager : public Ref
2013-09-16 20:54:13 +08:00
{
public:
UISceneManager();
~UISceneManager();
/** Returns the singleton of the ui scene manager. */
static UISceneManager * sharedUISceneManager();
static void purgeUISceneManager();
/** Returns the next ui scene. */
cocos2d::Scene *nextUIScene();
/** Returns the previous ui scene. */
cocos2d::Scene *previousUIScene();
/** Returns the current control scene. */
cocos2d::Scene *currentUIScene();
/** UI scene id. */
2013-12-23 15:35:35 +08:00
CC_SYNTHESIZE(int, _currentUISceneId, CurrentUISceneId)
CC_SYNTHESIZE(int, _minUISceneId, MinUISceneId)
CC_SYNTHESIZE(int, _maxUISceneId, MaxUISceneId)
2013-09-16 20:54:13 +08:00
};
#endif /* defined(__TestCpp__UISceneManager__) */