| cocos2d-x 3.0 | 
   
)- 类列表 - 类索引 - 类继承关系 - 类成员
全部) 类) 命名空间) 文件) 函数) 变量) 类型定义) 枚举) 枚举值) 属性) 友元) 宏定义) 组) 页)
Public 类型 | Public 成员函数 | 静态 Public 成员函数 | Public 属性 | Protected 成员函数 | Protected 属性 | 所有成员列表
ListView类 参考
#include 
类 ListView 继承关系图:
 
  
| ## Public 成员函数 | |
| ListView () | |
| Default constructor(默认构造函数) 更多… | |
| virtual | ~ListView () | 
| Default destructor(默认虚构函数) 更多… | |
| void | setItemModel (Widget model) | 
| 设置listview的(item model)项模型 更多… | |
| void | pushBackDefaultItem () | 
| 压栈一个默认项(通过克隆创建的)进listView. 更多… | |
| void | insertDefaultItem (ssize_t index) | 
| 插入一个默认项(通过克隆创建的)进listView. 更多… | |
| void | pushBackCustomItem (Widget item) | 
| 压栈一个自定义项(通过克隆创建的)进listView. 更多… | |
| void | insertCustomItem (Widget item, ssize_t index) | 
| 插入一个自定义项(通过克隆创建的)进listView. 更多… | |
| void | removeLastItem () | 
| 移除listview的最后项. 更多… | |
| void | removeItem (ssize_t index) | 
| 移除一个索引和参数相同的项. 更多… | |
| void | removeAllItems () | 
| Widget | getItem (ssize_t index) | 
| 返回一个索引和参数相同的项. 更多… | |
| Vector< Widget > & | getItems () | 
| 返回项的集合. 更多… | |
| ssize_t | getIndex (Widget item) const | 
| 返回项的索引. 更多… | |
| void | setGravity (Gravity gravity) | 
| 改变listview的重力. 更多… | |
| void | setItemsMargin (float margin) | 
| 改变各项之间的边距(margin). 更多… | |
| float | getItemsMargin () | 
| virtual void | sortAllChildren () override | 
| 在绘画之前,排列所有的孩子数组一次,而不是每次添加或者删除子节点时都排序。 这个方法可以大量地提高性能。 更多… | |
| ssize_t | getCurSelectedIndex () const | 
| CC_DEPRECATED_ATTRIBUTE void | addEventListenerListView (Ref target, SEL_ListViewEvent selector) | 
| void | addEventListener (const ccListViewCallback &callback) | 
| virtual void | setDirection (Direction dir) override | 
| 改变scrollview的滑动方向. 更多… | |
| virtual std::string | getDescription () const override | 
| 返回widget的类名称 更多… | |
| void | requestRefreshView () | 
| void | refreshView () | 
  Public 成员函数 继承自 ScrollView | |
| ScrollView () | |
| 默认构造函数 更多… | |
| virtual | ~ScrollView () | 
| 默认析构函数 更多… | |
| Direction | getDirection () | 
| 获取滚动视图当前的滚动方向 更多… | |
| Layout | getInnerContainer () | 
| 获取该滚动视图的内部容器(inner container) 更多… | |
| void | scrollToBottom (float time, bool attenuated) | 
| 将滚动视图的内部容器(inner container)滚动至滚动视图的底部边界(bottom boundary) 更多… | |
| void | scrollToTop (float time, bool attenuated) | 
| 将滚动视图的内部容器(inner container)滚动至滚动视图的顶部边界(top boundary) 更多… | |
| void | scrollToLeft (float time, bool attenuated) | 
| 将滚动视图的内部容器(inner container)滚动至滚动视图的左边界(left boundary) 更多… | |
| void | scrollToRight (float time, bool attenuated) | 
| 将滚动视图的内部容器(inner container)滚动至滚动视图的右边界(right boundary) 更多… | |
| void | scrollToTopLeft (float time, bool attenuated) | 
| 将滚动视图的内部容器(inner container)滚动至滚动视图的左上边界(top and left boundary) 更多… | |
| void | scrollToTopRight (float time, bool attenuated) | 
| 将滚动视图的内部容器(inner container)滚动至滚动视图的右上边界(top and right boundary) 更多… | |
| void | scrollToBottomLeft (float time, bool attenuated) | 
| 将滚动视图的内部容器(inner container)滚动至滚动视图的左下边界(bottom and left boundary) 更多… | |
| void | scrollToBottomRight (float time, bool attenuated) | 
| 将滚动视图的内部容器(inner container)滚动至滚动视图的右下边界(bottom and right boundary) 更多… | |
| void | scrollToPercentVertical (float percent, float time, bool attenuated) | 
| 将滚动视图的内部容器(inner container)滚动至滚动视图上沿垂直方向一定比例的位置(vertical percent position) 更多… | |
| void | scrollToPercentHorizontal (float percent, float time, bool attenuated) | 
| 将滚动视图的内部容器(inner container)滚动至滚动视图上沿水平方向一定比例的位置(horizontal percent position) 更多… | |
| void | scrollToPercentBothDirection (const Vec2 &percent, float time, bool attenuated) | 
| 将滚动视图的内部容器(inner container)滚动至滚动视图上沿水平方向一定比例且沿垂直方向一定比例的位置(both direction percent position) 更多… | |
| void | jumpToBottom () | 
| 将滚动视图的内部容器(inner container)直接移动(move)至滚动视图的底部边界(bottom boundary) 更多… | |
| void | jumpToTop () | 
| 将滚动视图的内部容器(inner container)直接移动(move)至滚动视图的顶部边界(top boundary) 更多… | |
| void | jumpToLeft () | 
| 将滚动视图的内部容器(inner container)直接移动(move)至滚动视图的左边界(left boundary) 更多… | |
| void | jumpToRight () | 
| 将滚动视图的内部容器(inner container)直接移动(move)至滚动视图的右边界(right boundary) 更多… | |
| void | jumpToTopLeft () | 
| 将滚动视图的内部容器(inner container)直接移动(move)至滚动视图的左上边界(top and left boundary) 更多… | |
| void | jumpToTopRight () | 
| 将滚动视图的内部容器(inner container)直接移动(move)至滚动视图的右上边界(top and right boundary) 更多… | |
| void | jumpToBottomLeft () | 
| 将滚动视图的内部容器(inner container)直接移动(move)至滚动视图的左下边界(bottom and left boundary) 更多… | |
| void | jumpToBottomRight () | 
| 将滚动视图的内部容器(inner container)直接移动(move)至滚动视图的右下边界(bottom and right boundary) 更多… | |
| void | jumpToPercentVertical (float percent) | 
| 将滚动视图的内部容器(inner container)直接移动(move)至滚动视图上沿垂直方向一定比例的位置(vertical percent position) 更多… | |
| void | jumpToPercentHorizontal (float percent) | 
| 将滚动视图的内部容器(inner container)直接移动(move)至滚动视图上沿水平方向一定比例的位置(horizontal percent position) 更多… | |
| void | jumpToPercentBothDirection (const Vec2 &percent) | 
| 将滚动视图的内部容器(inner container)直接移动(move)至滚动视图上沿水平方向一定比例且沿垂直方向一定比例的位置(both direction percent position) 更多… | |
| void | setInnerContainerSize (const Size &size) | 
| 改变滚动视图内部容器的尺寸(size) 更多… | |
| const Size & | getInnerContainerSize () const | 
| 获取该滚动视图内部容器的尺寸 更多… | |
| CC_DEPRECATED_ATTRIBUTE void | addEventListenerScrollView (Ref target, SEL_ScrollViewEvent selector) | 
| 添加由滚动事件触发的回调函数 更多… | |
| void | addEventListener (const ccScrollViewCallback &callback) | 
| virtual bool | onTouchBegan (Touch touch, Event unusedEvent) override | 
| virtual void | onTouchMoved (Touch touch, Event unusedEvent) override | 
| virtual void | onTouchEnded (Touch touch, Event unusedEvent) override | 
| virtual void | onTouchCancelled (Touch touch, Event unusedEvent) override | 
| virtual void | update (float dt) override | 
| void | setBounceEnabled (bool enabled) | 
| bool | isBounceEnabled () const | 
| void | setInertiaScrollEnabled (bool enabled) | 
| bool | isInertiaScrollEnabled () const | 
| virtual void | setLayoutType (Type type) override | 
| 设置 LayoutType. 更多… | |
| virtual Type | getLayoutType () const override | 
| 获取 LayoutType. 更多… | |
| virtual void | onEnter () override | 
| 每次当Node进入“stage”时才调用事件回调。 如果Node进入“stage”状态时伴随着一个转换(transition),那么事件将会在这个转换开始的时候被调用。 在onEnter过程中,你不能够接入“sister/brother”兄妹节点。 如果你重写了onEnter方法,你应该调用它的父类,e.g., Node::onEnter(). 更多… | |
  Public 成员函数 继承自 Layout | |
| Layout () | |
| 默认构造函数(constructor) 更多… | |
| virtual | ~Layout () | 
| 默认析构函数(destructor) 更多… | |
| void | setBackGroundImage (const std::string &fileName, TextureResType texType=TextureResType::LOCAL) | 
| 为layout设置一个背景图片 更多… | |
| void | setBackGroundImageCapInsets (const Rect &capInsets) | 
| 如果背景图使用九宫(scale9)渲染(render),为layout的背景图片设置一个capinsets. 更多… | |
| const Rect & | getBackGroundImageCapInsets () | 
| void | setBackGroundColorType (BackGroundColorType type) | 
| 为layout设置颜色类型(Color Type). 更多… | |
| BackGroundColorType | getBackGroundColorType () | 
| void | setBackGroundImageScale9Enabled (bool enabled) | 
| 使用九宫渲染器(scale9 renderer)设置背景图片. 更多… | |
| bool | isBackGroundImageScale9Enabled () | 
| void | setBackGroundColor (const Color3B &color) | 
| 如果颜色类型(color type)为LAYOUT_COLOR_SOLID,为layout设置背景颜色. 更多… | |
| const Color3B & | getBackGroundColor () | 
| void | setBackGroundColor (const Color3B &startColor, const Color3B &endColor) | 
| 如果颜色类型(color type)为LAYOUT_COLOR_GRADIENT,为layout设置背景颜色. 更多… | |
| const Color3B & | getBackGroundStartColor () | 
| const Color3B & | getBackGroundEndColor () | 
| void | setBackGroundColorOpacity (GLubyte opacity) | 
| 为layout的背景设置不透明度(opacity). 更多… | |
| GLubyte | getBackGroundColorOpacity () | 
| void | setBackGroundColorVector (const Vec2 &vector) | 
| 如果颜色类型(color type)是 LAYOUT_COLOR_GRADIENT,为layout设置矢量(vector)背景色 更多… | |
| const Vec2 & | getBackGroundColorVector () | 
| void | setBackGroundImageColor (const Color3B &color) | 
| void | setBackGroundImageOpacity (GLubyte opacity) | 
| const Color3B & | getBackGroundImageColor () | 
| GLubyte | getBackGroundImageOpacity () | 
| void | removeBackGroundImage () | 
| 删除layout的背景图片. 更多… | |
| const Size & | getBackGroundImageTextureSize () const | 
| 获取背景纹理(texture)贴图的尺寸. 更多… | |
| void | setClippingType (ClippingType type) | 
| ClippingType | getClippingType () | 
| virtual bool | isClippingEnabled () | 
| 获取layout的裁剪(clipping)是否为可用. 更多… | |
| virtual void | visit (Renderer renderer, const Mat4 &parentTransform, bool parentTransformUpdated) override | 
| 访问节点的孩子,并且循环递归的绘制它们。 更多… | |
| void | requestDoLayout () | 
| virtual void | onExit () override | 
| 事件回调在每次Node离开“stage”时被调用。 如果Node离开‘stage’并开始变换(transition),此事件将在变换(transition)完成后被调用。 在 onExit执行期间你不能访问兄弟节点(sibling node)。 如果你 override onExit, 你应该调用其父节点的此方法, 例如, Node::onExit(). 更多… | |
| void | setLoopFocus (bool loop) | 
| 如果一个layout开启了循环集中(loop focused),则意味着此焦点(focus)将在此layout内部运动. 更多… | |
| bool | isLoopFocus () | 
| void | setPassFocusToChild (bool pass) | 
| bool | isPassFocusToChild () | 
| virtual Widget | findNextFocusedWidget (FocusDirection direction, Widget current) override | 
| 当一个widget在一个layout中,你可以调用此方法在指定的方向(specified direction)来获取下一个被聚焦的(focused)widget. 更多… | |
  Public 成员函数 继承自 Widget | |
| Widget (void) | |
| 默认构造函数 更多… | |
| virtual | ~Widget () | 
| 默认析构函数 更多… | |
| virtual void | setEnabled (bool enabled) | 
| 设置widget是否为可用 更多… | |
| bool | isEnabled () const | 
| 判断该widget是否可用 更多… | |
| void | setBright (bool bright) | 
| 设置widget是否为亮色(对应可用状态) 更多… | |
| bool | isBright () const | 
| 判断该widget是否为亮色 更多… | |
| virtual void | setTouchEnabled (bool enabled) | 
| 设置widget是否可以响应触摸。 更多… | |
| void | setBrightStyle (BrightStyle style) | 
| 设置widget的亮色风格(bright style) 更多… | |
| bool | isTouchEnabled () const | 
| 判定该widget是否可以响应触摸 更多… | |
| bool | isHighlighted () const | 
| 判定该widget是否为高亮(对应被选中状态) 更多… | |
| void | setHighlighted (bool hilight) | 
| 设置该widget是否处于高亮状态(对应被选中状态) 更多… | |
| float | getLeftInParent () | 
| 获取该widget左边界横坐标 更多… | |
| float | getBottomInParent () | 
| 获取该widget底部边界纵坐标 更多… | |
| float | getRightInParent () | 
| 获取该widget右边界横坐标 更多… | |
| float | getTopInParent () | 
| 获取该widget顶部边界纵坐标 更多… | |
| CC_DEPRECATED_ATTRIBUTE void | addTouchEventListener (Ref target, SEL_TouchEvent selector) | 
| 为菜单项的目标/选择器设置触摸事件 更多… | |
| void | addTouchEventListener (ccWidgetTouchCallback callback) | 
| virtual void | setPosition (const Vec2 &pos) override | 
| 改变该widget在OpenGL坐标系中的绝对位置坐标(x,y) 更多… | |
| void | setPositionPercent (const Vec2 &percent) | 
| 改变该widget在OpenGL坐标系中的相对百分比位置坐标(x,y) 更多… | |
| const Vec2 & | getPositionPercent () | 
| 获取该widget在OpenGL坐标系中的相对百分比位置坐标(x,y) 更多… | |
| void | setPositionType (PositionType type) | 
| 改变该widget的位置坐标类型 更多… | |
| PositionType | getPositionType () const | 
| 获取该widget的位置坐标类型 更多… | |
| virtual void | setFlippedX (bool flippedX) | 
| 设置该widget是否应该被水平翻转. 更多… | |
| virtual bool | isFlippedX () | 
| 返回表明该widget是否被水平翻转的标识 更多… | |
| virtual void | setFlippedY (bool flippedY) | 
| 设置该widget是否应该被垂直翻转. 更多… | |
| virtual bool | isFlippedY () | 
| 返回表明该widget是否被垂直翻转的标识 更多… | |
| virtual void | setColor (const Color3B &color) override | 
| virtual void | setOpacity (GLubyte opacity) override | 
| const Color3B & | getColor () const override | 
| GLubyte | getOpacity () const override | 
| CC_DEPRECATED_ATTRIBUTE bool | isFlipX () | 
| CC_DEPRECATED_ATTRIBUTE void | setFlipX (bool flipX) | 
| CC_DEPRECATED_ATTRIBUTE bool | isFlipY () | 
| CC_DEPRECATED_ATTRIBUTE void | setFlipY (bool flipY) | 
| bool | clippingParentAreaContainPoint (const Vec2 &pt) | 
| const Vec2 & | getTouchStartPos () | 
| const Vec2 & | getTouchMovePos () | 
| const Vec2 & | getTouchEndPos () | 
| void | setName (const std::string &name) | 
| 改变widget的名字,使用名字可以更轻松地识别出该widget 更多… | |
| const std::string & | getName () const | 
| 返回widget的名字,使用名字可以更轻松地识别出该widget 更多… | |
| virtual void | setSize (const Size &size) | 
| 改变widget的尺寸(size) 更多… | |
| virtual void | setSizePercent (const Vec2 &percent) | 
| 改变widget的百分比尺寸(percent size) 更多… | |
| void | setSizeType (SizeType type) | 
| 改变widget的尺寸类型(size type) 更多… | |
| SizeType | getSizeType () const | 
| 获取widget的尺寸类型(size type) 更多… | |
| const Size & | getSize () const | 
| 返回widget的尺寸(size) 更多… | |
| const Size & | getCustomSize () const | 
| virtual const Size & | getLayoutSize () | 
| const Vec2 & | getSizePercent () const | 
| 返回widget的尺寸百分比 更多… | |
| virtual bool | hitTest (const Vec2 &pt) | 
| 检查一个点是否在该widget所在区域 更多… | |
| void | setLayoutParameter (LayoutParameter parameter) | 
| 为widget设置LayoutParameter 更多… | |
| LayoutParameter | getLayoutParameter (LayoutParameter::Type type) | 
| 获取widget的LayoutParameter 更多… | |
| virtual void | ignoreContentAdaptWithSize (bool ignore) | 
| 忽略widget的尺寸(size) 更多… | |
| bool | isIgnoreContentAdaptWithSize () const | 
| 检查该widget的尺寸(size)是否被忽略 更多… | |
| Vec2 | getWorldPosition () | 
| 获取widget在全局中的位置坐标 更多… | |
| virtual Node | getVirtualRenderer () | 
| 获取widget的虚拟渲染器 更多… | |
| virtual const Size & | getVirtualRendererSize () const | 
| 获取widget的content size 更多… | |
| Widget | clone () | 
| void | updateSizeAndPosition () | 
| void | updateSizeAndPosition (const Size &parentSize) | 
| void | setActionTag (int tag) | 
| int | getActionTag () | 
| bool | isFocused () | 
| void | setFocused (bool focus) | 
| bool | isFocusEnabled () | 
| void | setFocusEnabled (bool enable) | 
| virtual Widget | findNextFocusedWidget (FocusDirection direction, Widget current) | 
| 当一个widget处于某一个layout中的时候,你可以通过调用这个方法在指定的方向获取下一个被focus的widget 如果一个widget没有在一个layout中,调用这个方法会获得该widget自身 更多… | |
| void | requestFocus () | 
| 当一个widget调用了这个方法,这个widget会立刻被focus 更多… | |
| void | onFocusChange (Widget widgetLostFocus, Widget widgetGetFocus) | 
| 这个方法会在focus状态发生改变的时候被调用 更多… | |
| void | dispatchFocusEvent (Widget widgetLoseFocus, Widget widgetGetFocus) | 
| 通过EventDispatcher来调度EventFocus 更多… | |
| Widget | getCurrentFocusedWidget (bool isWidget) | 
| 不管你想要调用这个方法去获得什么样的widget对象,这个方法会返回给你被focus的widget 更多… | |
  Public 成员函数 继承自 ProtectedNode | |
| virtual void | cleanup () override | 
| 暂停所有的活动着的动作和调度器。 更多… | |
| virtual void | onEnterTransitionDidFinish () override | 
| 当Node进入“stage”时,事件回调被调用。 如果Node进入‘stage’并开始变换(transition),此事件将在变换(transition)完成后被调用。 如果你 override onEnterTransitionDidFinish, 你应该调用其父节点的此方法, 例如: Node::onEnterTransitionDidFinish() NA NA 更多… | |
| virtual void | onExitTransitionDidStart () override | 
| 事件回调在每次Node离开“stage”时被调用。 如果Node离开‘stage’并开始变换(transition),此事件将在变换(transition)开始时被调用。 NA NA 更多… | |
| virtual void | updateDisplayedOpacity (GLubyte parentOpacity) override | 
| virtual void | updateDisplayedColor (const Color3B &parentColor) override | 
| virtual void | disableCascadeColor () override | 
| virtual | ~ProtectedNode () | 
| virtual void | addProtectedChild (Node child) | 
| 添加一个z-order为0的child到容器中。 更多… | |
| virtual void | addProtectedChild (Node child, int localZOrder) | 
| 添加一个child(定义localZOrder)到容器中。 更多… | |
| virtual void | addProtectedChild (Node child, int localZOrder, int tag) | 
| 添加一个child(定义localZOrder,定义tag)到容器中。 更多… | |
| virtual Node | getProtectedChildByTag (int tag) | 
| 从容器中获取child及其tag 更多… | |
| virtual void | removeProtectedChild (Node child, bool cleanup=true) | 
| 从容器中删除一个child。它也将清除所有运行中的动作(取决于cleanup的参数)。 更多… | |
| virtual void | removeProtectedChildByTag (int tag, bool cleanup=true) | 
| 根据tag的值(value)来删除child。它也将清除所有运行中的动作(取决于cleanup的参数)。 更多… | |
| virtual void | removeAllProtectedChildren () | 
| 删除容器中所有child。 更多… | |
| virtual void | removeAllProtectedChildrenWithCleanup (bool cleanup) | 
| 删除容器中所有child,并清理所有运行中的动作(取决于cleanup的参数)。 更多… | |
| virtual void | reorderProtectedChild (Node child, int localZOrder) | 
| 重新排序(reorders)一个child依据其新z值(z vlaue)。(此z值应为localZOrder的值,原文简写为z value。译者注) 更多… | |
| virtual void | sortAllProtectedChildren () | 
| 在绘制之前整理子节点数组(children array),而不是每次子节点(child node)被添加或重新排序(reordered)时。 此方法可以大大提高性能。 更多… | |
  Public 成员函数 继承自 Node | |
| virtual bool | isRunning () const | 
| 返回节点是否是“running(活动的)”。 更多… | |
| void | scheduleUpdateWithPriorityLua (int handler, int priority) | 
| lua script的时间表 NA 更多… | |
| virtual void | draw (Renderer renderer, const Mat4 &transform, bool transformUpdated) | 
| 重写这个方法来绘制你自己的节点。 以下的GL状态是默认开启的: 更多… | |
| virtual void | draw () final | 
| virtual void | visit () final | 
| virtual Scene | getScene () | 
返回包含Node(节点)的Scene(场景)。 如果这个节点不属于任何的场景,它将返回nullptr。 这个函数循环递归地调用parent->getScene() 直到父类是一个Scene对象。结果不会被缓存。只有当这个函数被用在一个循环中时,用户才会缓存这个结果。 更多…
 | |
| virtual Rect | getBoundingBox () const | 
| 返回 一个AABB(轴向包围盒)在它的父坐标系中。 更多… | |
| virtual CC_DEPRECATED_ATTRIBUTE Rect | boundingBox () const | 
| virtual void | setEventDispatcher (EventDispatcher dispatcher) | 
| virtual EventDispatcher | getEventDispatcher () const | 
| virtual GLubyte | getDisplayedOpacity () const | 
| virtual bool | isCascadeOpacityEnabled () const | 
| virtual void | setCascadeOpacityEnabled (bool cascadeOpacityEnabled) | 
| virtual const Color3B & | getDisplayedColor () const | 
| virtual bool | isCascadeColorEnabled () const | 
| virtual void | setCascadeColorEnabled (bool cascadeColorEnabled) | 
| virtual void | setOpacityModifyRGB (bool bValue) | 
| virtual bool | isOpacityModifyRGB () const | 
| virtual | ~Node () | 
| virtual bool | init () | 
| virtual void | setLocalZOrder (int localZOrder) | 
| LocalZOrder是“key”(关键)来分辨节点和它兄弟节点的相关性。 更多… | |
| virtual CC_DEPRECATED_ATTRIBUTE void | setZOrder (int localZOrder) | 
| virtual void | _setLocalZOrder (int z) | 
| virtual int | getLocalZOrder () const | 
| 得到这个节点的局部Z顺序 更多… | |
| virtual CC_DEPRECATED_ATTRIBUTE int | getZOrder () const | 
| virtual void | setGlobalZOrder (float globalZOrder) | 
| 定义渲染节点的顺序 拥有全局Z顺序越小的节点,最先渲染 更多… | |
| virtual float | getGlobalZOrder () const | 
| 返回节点的全局Z顺序。 更多… | |
| virtual void | setScaleX (float scaleX) | 
| 设置节点的缩放(x)。 更多… | |
| virtual float | getScaleX () const | 
| 返回该节点的X轴的缩放因子。 更多… | |
| virtual void | setScaleY (float scaleY) | 
| 设置节点的缩放(y)。 更多… | |
| virtual float | getScaleY () const | 
| 返回该节点的Y轴的缩放因子。 更多… | |
| virtual void | setScaleZ (float scaleZ) | 
| 改变该节点的Z轴的缩放因子。 更多… | |
| virtual float | getScaleZ () const | 
| 返回该节点的梓州的缩放因子。 更多… | |
| virtual void | setScale (float scale) | 
| 设置几点的缩放(x,y,z). 更多… | |
| virtual float | getScale () const | 
| 得到该节点的缩放因子,当X轴和Y轴有相同的缩放因子时。 更多… | |
| virtual void | setScale (float scaleX, float scaleY) | 
| 设置节点的缩放(x,y). 更多… | |
| virtual const Vec2 & | getPosition () const | 
| 得到在父节点坐标系中节点的位置(x,y)。 更多… | |
| virtual void | setPosition (float x, float y) | 
| 设置节点在它父节点坐标系中的位置(x,y)。 更多… | |
| virtual void | getPosition (float x, float y) const | 
| 用一个更有效率的方法设置位置,返回两个数字而不是Vec2对象。 更多… | |
| virtual void | setPositionX (float x) | 
| 分别得到或者设置位置的X或者Y轴坐标系 这些方法被绑定使用在在Lua和JavaScript。 更多… | |
| virtual float | getPositionX (void) const | 
| virtual void | setPositionY (float y) | 
| virtual float | getPositionY (void) const | 
| virtual void | setPosition3D (const Vec3 &position) | 
| 设置在父节点坐标系中的位置(x,y,z)。 更多… | |
| virtual Vec3 | getPosition3D () const | 
| 返回父坐标系的位置(X,Y,Z)。 更多… | |
| virtual void | setPositionZ (float positionZ) | 
| 设置位置的“z”轴坐标系,是OpneGL Z 定点值。 更多… | |
| virtual CC_DEPRECATED_ATTRIBUTE void | setVertexZ (float vertexZ) | 
| virtual float | getPositionZ () const | 
| 得到该节点的Z轴坐标系的位置。 更多… | |
| virtual CC_DEPRECATED_ATTRIBUTE float | getVertexZ () const | 
| virtual void | setSkewX (float skewX) | 
| 改变该节点X轴的倾斜角,单位是度。 更多… | |
| virtual float | getSkewX () const | 
| 返回该节点的X轴倾斜角,单位是度。 更多… | |
| virtual void | setSkewY (float skewY) | 
| 改变该节点Y轴的倾斜角,单位是度。 更多… | |
| virtual float | getSkewY () const | 
| 返回该节点的Y轴倾斜角,单位是度。 更多… | |
| virtual void | setAnchorPoint (const Vec2 &anchorPoint) | 
| 设置锚点,用百分比表示。 更多… | |
| virtual const Vec2 & | getAnchorPoint () const | 
| 返回用百分比表示的锚点。 更多… | |
| virtual const Vec2 & | getAnchorPointInPoints () const | 
| 返回绝对像素的锚点 更多… | |
| virtual void | setContentSize (const Size &contentSize) | 
| 设置不转换节点的大小。 更多… | |
| virtual const Size & | getContentSize () const | 
| 返回未转换节点的大小。 更多… | |
| virtual void | setVisible (bool visible) | 
| 设置节点是否可见。 更多… | |
| virtual bool | isVisible () const | 
| 决定节点是否可见。 更多… | |
| virtual void | setRotation (float rotation) | 
| 设置节点的旋转(angle)角度。 更多… | |
| virtual float | getRotation () const | 
| 返回节点的旋转角度。 更多… | |
| virtual void | setRotation3D (const Vec3 &rotation) | 
| 设置(X,Y,Z)旋转角度。 对3d旋转非常有用。 更多… | |
| virtual Vec3 | getRotation3D () const | 
| 返回(X,Y,Z)的旋转角度。 更多… | |
| virtual void | setRotationSkewX (float rotationX) | 
| 设置节点X轴的旋转角度,表现为水平旋转倾斜。 更多… | |
| virtual CC_DEPRECATED_ATTRIBUTE void | setRotationX (float rotationX) | 
| virtual float | getRotationSkewX () const | 
| 得到X轴节点的旋转角度,表现为水平旋转倾斜(horizontal rotation skew). 更多… | |
| virtual CC_DEPRECATED_ATTRIBUTE float | getRotationX () const | 
| virtual void | setRotationSkewY (float rotationY) | 
| 设置Y轴节点的旋转角度,表现为垂直旋转倾斜。 更多… | |
| virtual CC_DEPRECATED_ATTRIBUTE void | setRotationY (float rotationY) | 
| virtual float | getRotationSkewY () const | 
| 得到节点Y轴的旋转角度,表现为垂直旋转倾斜(vertical rotational skew. 更多… | |
| virtual CC_DEPRECATED_ATTRIBUTE float | getRotationY () const | 
| void | setOrderOfArrival (int orderOfArrival) | 
| 设置到达顺序,当这个节点和其他子节点有相同的ZOrder时。 更多… | |
| int | getOrderOfArrival () const | 
| 返回到达顺序,指出哪一个子类先被添加。 更多… | |
| CC_DEPRECATED_ATTRIBUTE void | setGLServerState (int serverState) | 
| CC_DEPRECATED_ATTRIBUTE int | getGLServerState () const | 
| virtual void | ignoreAnchorPointForPosition (bool ignore) | 
| 设置抹点为(0,0)当你摆放这个节点的时候。 更多… | |
| virtual bool | isIgnoreAnchorPointForPosition () const | 
| 得到节点的锚点是否为(0,0),当你摆放这个节点时。 更多… | |
| virtual void | setParent (Node parent) | 
| 设置父节点Sets the parent node 更多… | |
| virtual Node | getParent () | 
| 返回指向父节点的指针。 更多… | |
| virtual const Node | getParent () const | 
| virtual void | removeFromParent () | 
| 从父节点中删除一个节点,有一个cleanup参数。 如果这个节点是一个孤节点,那么什么都不会发生。 更多… | |
| virtual void | removeFromParentAndCleanup (bool cleanup) | 
| 从父节点中删除一个节点 如果这个节点是一个孤节点,那么什么都不会发生。 更多… | |
| virtual void | removeChildByTag (int tag, bool cleanup=true) | 
| 从一个容器中删除一个孩子通过标记值。取决于cleanup参数同时会清除所有的活动的动作。 更多… | |
| virtual void | reorderChild (Node child, int localZOrder) | 
| 对一个孩子重新排序,设定一个新的z轴的值。 更多… | |
| virtual int | getTag () const | 
| 返回一个用来更简单分辨节点的标记。 更多… | |
| virtual void | setTag (int tag) | 
| 改变这个用来更容易分辨节点的标记。 更多… | |
| virtual void | getUserData () | 
| 返回一个自定义用户数据的指针。 更多… | |
| virtual const void | getUserData () const | 
| NA NA 更多… | |
| virtual void | setUserData (void userData) | 
| 设置一个自定义用户数据的指针。 更多… | |
| virtual Ref | getUserObject () | 
| 返回一个用户分配的对象 更多… | |
| virtual const Ref | getUserObject () const | 
| NA NA 更多… | |
| virtual void | setUserObject (Ref userObject) | 
| 返回一个用户分配的对象 更多… | |
| GLProgram | getGLProgram () | 
| 返回当前用于这个节点的GLProgram (shader) 更多… | |
| CC_DEPRECATED_ATTRIBUTE GLProgram | getShaderProgram () | 
| GLProgramState | getGLProgramState () | 
| void | setGLProgramState (GLProgramState glProgramState) | 
| void | setGLProgram (GLProgram glprogram) | 
| 为这个节点设置着色器程序 更多… | |
| CC_DEPRECATED_ATTRIBUTE void | setShaderProgram (GLProgram glprogram) | 
| virtual void | setActionManager (ActionManager actionManager) | 
| 设置被所有动作使用的ActionManager对象。 更多… | |
| virtual ActionManager | getActionManager () | 
| 得到被所有动作使用的ActionManager对象。 更多… | |
| virtual const ActionManager | getActionManager () const | 
| Action | runAction (Action action) | 
| 执行一个动作,并且返回执行的该动作。 更多… | |
| void | stopAllActions () | 
| 停止并且删除所有的动作从活动动作列表中。 更多… | |
| void | stopAction (Action action) | 
| 停止并且删除所有的动作从活动动作列表中。 更多… | |
| void | stopActionByTag (int tag) | 
| 通过动作的标记从活动动作列表中删除一个动作。 更多… | |
| Action | getActionByTag (int tag) | 
| 通过动作的标记从活动动作列表中得到一个动作。 更多… | |
| ssize_t | getNumberOfRunningActions () const | 
| 返回活动着的动作加上正在调度运行的动作的总数 (在actionsToAdd状态的动作和动作数组中的). 更多… | |
| CC_DEPRECATED_ATTRIBUTE ssize_t | numberOfRunningActions () const | 
| virtual void | setScheduler (Scheduler scheduler) | 
| 设置一个调度器对象来用于调度所有的“update”和定时器。 更多… | |
| virtual Scheduler | getScheduler () | 
| 得到调度器对象。 更多… | |
| virtual const Scheduler | getScheduler () const | 
| bool | isScheduled (SEL_SCHEDULE selector) | 
| 检查是否一个选择器是预定的。 更多… | |
| void | scheduleUpdate (void) | 
| 调度“update”方法。 更多… | |
| void | scheduleUpdateWithPriority (int priority) | 
| 调度这个"update"方法伴随着一个自定义优先级。 更多… | |
| void | unscheduleUpdate (void) | 
| void | schedule (SEL_SCHEDULE selector, float interval, unsigned int repeat, float delay) | 
| 调度一个自定义的选择器。 更多… | |
| void | schedule (SEL_SCHEDULE selector, float interval) | 
| 调度一个自定义的选择器伴随着一个以秒为单位的内部时间。 更多… | |
| void | scheduleOnce (SEL_SCHEDULE selector, float delay) | 
| 调度一个只运行一次的选择器,伴随着一个0或者更大的延期。 更多… | |
| void | schedule (SEL_SCHEDULE selector) | 
| 调度一个自定义的选择器,这个调度后的选择器将会以每帧为时间间隔。 更多… | |
| void | unschedule (SEL_SCHEDULE selector) | 
| 不调度一个自定义的选择器。 更多… | |
| void | unscheduleAllSelectors (void) | 
| 不调度所有的调度过的选择器: 自定义选择器, 和 'update' 选择器。 动作不受这个方法的影响。 NA 更多… | |
| void | resume (void) | 
| 恢复所有的调度过的选择器,动作和事件监听器。 这个方法被onEnter方法在内部调用。 更多… | |
| void | pause (void) | 
| 暂停所有的调度过的选择器,动作和事件监听器。 这个方法被onExit方法在内部调用。 更多… | |
| CC_DEPRECATED_ATTRIBUTE void | resumeSchedulerAndActions (void) | 
| 恢复所有的调度过的选择器,动作和事件监听器。 这个方法被onEnter方法在内部调用。 更多… | |
| CC_DEPRECATED_ATTRIBUTE void | pauseSchedulerAndActions (void) | 
| 暂停所有的调度过的选择器,动作和事件监听器。 这个方法被onExit方法在内部调用。 更多… | |
| virtual void | updateTransform () | 
| 递归的调用孩子的updateTransform()方法。 更多… | |
| virtual const Mat4 & | getNodeToParentTransform () const | 
| 返回这个将节点(局部)的空间坐标系转换成父节点的空间坐标系的矩阵。 这个矩阵以像素为单位。 更多… | |
| virtual AffineTransform | getNodeToParentAffineTransform () const | 
| virtual void | setNodeToParentTransform (const Mat4 &transform) | 
| 手动设置变换矩阵。 更多… | |
| virtual CC_DEPRECATED_ATTRIBUTE AffineTransform | nodeToParentTransform () const | 
| virtual const Mat4 & | getParentToNodeTransform () const | 
| 返回这个将父节点的空间坐标系转换成节点(局部)的空间坐标系转的矩阵。 这个矩阵以像素为单位。 更多… | |
| virtual AffineTransform | getParentToNodeAffineTransform () const | 
| virtual CC_DEPRECATED_ATTRIBUTE AffineTransform | parentToNodeTransform () const | 
| virtual Mat4 | getNodeToWorldTransform () const | 
| 返回世界仿射变换矩阵。矩阵单位是像素。 更多… | |
| virtual AffineTransform | getNodeToWorldAffineTransform () const | 
| virtual CC_DEPRECATED_ATTRIBUTE AffineTransform | nodeToWorldTransform () const | 
| virtual Mat4 | getWorldToNodeTransform () const | 
| 返回逆世界仿射变换矩阵。矩阵单位是像素。 更多… | |
| virtual AffineTransform | getWorldToNodeAffineTransform () const | 
| virtual CC_DEPRECATED_ATTRIBUTE AffineTransform | worldToNodeTransform () const | 
| Vec2 | convertToNodeSpace (const Vec2 &worldPoint) const | 
| 将Vec2 转换成节点 (局部) 空间坐标系。结果按以Points为单位。 更多… | |
| Vec2 | convertToWorldSpace (const Vec2 &nodePoint) const | 
| 将Vec2转换成世界空间坐标系。结果按以Points为单位。 更多… | |
| Vec2 | convertToNodeSpaceAR (const Vec2 &worldPoint) const | 
| 将Vec2转换成节点(局部)空间坐标系. 更多… | |
| Vec2 | convertToWorldSpaceAR (const Vec2 &nodePoint) const | 
| 将局部的Vec2转换成世界空间坐标系。结果按以Points为单位。 将returned/received节点的point当作相对应的锚点。 更多… | |
| Vec2 | convertTouchToNodeSpace (Touch touch) const | 
| 一个方便的方法将触摸转换成Vec2 更多… | |
| Vec2 | convertTouchToNodeSpaceAR (Touch touch) const | 
| 将Touch (世界坐标系) 转换成局部坐标系。这个方法是AR (相对的锚点). 更多… | |
| void | setAdditionalTransform (Mat4 additionalTransform) | 
| 为节点设置一个附加转换矩阵。 更多… | |
| void | setAdditionalTransform (const AffineTransform &additionalTransform) | 
| Component | getComponent (const std::string &pName) | 
| 通过名字得到组件 更多… | |
| virtual bool | addComponent (Component pComponent) | 
| 添加一个组件 更多… | |
| virtual bool | removeComponent (const std::string &pName) | 
| 通过名字删除一个组件 更多… | |
| virtual void | removeAllComponents () | 
| 删除所有组件 更多… | |
  Public 成员函数 继承自 Ref | |
| void | retain () | 
| 保留所有权. 更多… | |
| void | release () | 
| 立即释放所有权. 更多… | |
| Ref | autorelease () | 
| 自动释放所有权在不久的将来. 更多… | |
| unsigned int | getReferenceCount () const | 
| 返回Ref对象当前的引用计数. 更多… | |
| virtual | ~Ref () | 
| NA NA 更多… | |
  Public 成员函数 继承自 UIScrollInterface | |
| virtual | ~UIScrollInterface () | 
| ## 静态 Public 成员函数 | |
| static ListView | create () | 
| 分配并初始化. 更多… | |
  静态 Public 成员函数 继承自 ScrollView | |
| static ScrollView | create () | 
| 分配并初始化 更多… | |
  静态 Public 成员函数 继承自 Layout | |
| static Layout | create () | 
| 分配(Allocates)并初始化(initializes)一个布局(layout). 更多… | |
  静态 Public 成员函数 继承自 Widget | |
| static Widget | create () | 
| 分配空间并初始化widget 更多… | |
  静态 Public 成员函数 继承自 ProtectedNode | |
| static ProtectedNode | create (void) | 
  静态 Public 成员函数 继承自 Node | |
| static Node | create (void) | 
| 分配并且初始化一个节点. 更多… | |
| ## Public 属性 | |
| CC_CONSTRUCTOR_ACCESS | pad0: virtual bool init() override | 
  Public 属性 继承自 ScrollView | |
| CC_CONSTRUCTOR_ACCESS | pad0: virtual bool init() override | 
  Public 属性 继承自 Layout | |
| std::function< int(FocusDirection, Widget )> | onPassFocusToChild | 
| 指定一个用户定义函数(user-defined functor),以确定哪个layout的子widget将被聚焦(focused). 更多… | |
| CC_CONSTRUCTOR_ACCESS | pad0: virtual bool init() override | 
  Public 属性 继承自 Widget | |
| CC_CONSTRUCTOR_ACCESS | pad0: virtual bool init() override | 
| std::function< void(Widget , Widget )> | onFocusChanged | 
| std::function< Widget (FocusDirection)> | onNextFocusedWidget | 
  Public 属性 继承自 ProtectedNode | |
| CC_CONSTRUCTOR_ACCESS | pad0: ProtectedNode() | 
  Public 属性 继承自 Node | |
| CC_CONSTRUCTOR_ACCESS | pad0: Node() | 
| ## Protected 成员函数 | |
| virtual void | addChild (Node child) override | 
| 添加一个子节点到容器内,z-order是0. 更多… | |
| virtual void | addChild (Node child, int zOrder) override | 
| 在内部容器中加入一个子节点(child)并确定其在画布中的z-order 更多… | |
| virtual void | addChild (Node child, int zOrder, int tag) override | 
| 在内部容器中加入一个子节点(child)并确定其在画布中的z-order和其在父节点中的标签(tag) 更多… | |
| virtual void | removeChild (Node widget, bool cleanup=true) override | 
| 从容器中删除一个孩子,取决于cleanup参数同时会清除所有的活动的动作。 更多… | |
| virtual void | removeAllChildren () override | 
| 使用cleanup清空容器(container)中的所有子节点(children) 更多… | |
| virtual void | removeAllChildrenWithCleanup (bool cleanup) override | 
| 清空容器(container)中的所有子节点(children),同时也清空所有运行中的动作(取决于cleanup的参数). 更多… | |
| virtual Vector< Node > & | getChildren () override | 
| 返回子节点数组。 更多… | |
| virtual const Vector< Node > & | getChildren () const override | 
| virtual ssize_t | getChildrenCount () const override | 
| 返回子节点的总数 更多… | |
| virtual Node | getChildByTag (int tag) override | 
| 从容器中得到一个子节点通过它的标记。 更多… | |
| virtual Widget | getChildByName (const std::string &name) override | 
| 通过名字从容器中获取一个子节点 更多… | |
| void | updateInnerContainerSize () | 
| void | remedyLayoutParameter (Widget item) | 
| virtual void | onSizeChanged () override | 
| virtual Widget | createCloneInstance () override | 
| virtual void | copySpecialProperties (Widget model) override | 
| virtual void | copyClonedWidgetChildren (Widget model) override | 
| void | selectedItemEvent (int state) | 
| virtual void | interceptTouchEvent (int handleState, Widget sender, const Vec2 &touchPoint) override | 
  Protected 成员函数 继承自 ScrollView | |
| virtual void | initRenderer () override | 
| void | moveChildren (float offsetX, float offsetY) | 
| void | autoScrollChildren (float dt) | 
| void | bounceChildren (float dt) | 
| void | checkBounceBoundary () | 
| bool | checkNeedBounce () | 
| void | startAutoScrollChildrenWithOriginalSpeed (const Vec2 &dir, float v, bool attenuated, float acceleration) | 
| void | startAutoScrollChildrenWithDestination (const Vec2 &des, float time, bool attenuated) | 
| void | jumpToDestination (const Vec2 &des) | 
| void | stopAutoScrollChildren () | 
| void | startBounceChildren (float v) | 
| void | stopBounceChildren () | 
| bool | checkCustomScrollDestination (float touchOffsetX, float touchOffsetY) | 
| virtual bool | scrollChildren (float touchOffsetX, float touchOffsetY) | 
| bool | bounceScrollChildren (float touchOffsetX, float touchOffsetY) | 
| void | startRecordSlidAction () | 
| virtual void | endRecordSlidAction () | 
| virtual void | handlePressLogic (const Vec2 &touchPoint) override | 
| virtual void | handleMoveLogic (const Vec2 &touchPoint) override | 
| virtual void | handleReleaseLogic (const Vec2 &touchPoint) override | 
| virtual void | checkChildInfo (int handleState, Widget sender, const Vec2 &touchPoint) override | 
| void | recordSlidTime (float dt) | 
| void | scrollToTopEvent () | 
| void | scrollToBottomEvent () | 
| void | scrollToLeftEvent () | 
| void | scrollToRightEvent () | 
| void | scrollingEvent () | 
| void | bounceTopEvent () | 
| void | bounceBottomEvent () | 
| void | bounceLeftEvent () | 
| void | bounceRightEvent () | 
| virtual void | setClippingEnabled (bool able) override | 
| 改变layout可裁剪(clip)其内容(content)及child. 更多… | |
| virtual void | doLayout () override | 
  Protected 成员函数 继承自 Layout | |
| void | addBackGroundImage () | 
| void | supplyTheLayoutParameterLackToChild (Widget child) | 
| void | stencilClippingVisit (Renderer renderer, const Mat4 &parentTransform, bool parentTransformUpdated) | 
| void | scissorClippingVisit (Renderer renderer, const Mat4 &parentTransform, bool parentTransformUpdated) | 
| void | setStencilClippingSize (const Size &size) | 
| const Rect & | getClippingRect () | 
| void | onBeforeVisitStencil () | 
| void | onAfterDrawStencil () | 
| void | onAfterVisitStencil () | 
| void | onBeforeVisitScissor () | 
| void | onAfterVisitScissor () | 
| void | updateBackGroundImageColor () | 
| void | updateBackGroundImageOpacity () | 
| void | updateBackGroundImageRGBA () | 
| LayoutExecutant | createCurrentLayoutExecutant () | 
| Size | getLayoutContentSize () const | 
| 获取layout的内容大小(size),它将积累(accumulate)所有子节点(children)的内容大小. 更多… | |
| int | findNearestChildWidgetIndex (FocusDirection direction, Widget baseWidget) | 
| 当layout获得焦点,layout要传递焦点(focus)给其child,它将使用此方法判定传递给哪个child. 更多… | |
| int | findFarestChildWidgetIndex (FocusDirection direction, Widget baseWidget) | 
| 当layout获得焦点,layout要传递焦点(focus)给其child,它将使用此方法判定传递给哪个child. 更多… | |
| float | caculateNearestDistance (Widget baseWidget) | 
| 计算 baseWidget 和 layout 的 children 之间的最近距离. 更多… | |
| float | caculateFarestDistance (Widget baseWidget) | 
| 计算 baseWidget 和 layout 的 children 之间的最远距离. 更多… | |
| void | findProperSearchingFunctor (FocusDirection dir, Widget baseWidget) | 
| 当layout传递焦点(focus)给其child,使用此方法确定使用哪种算法(algorithm),使用最近距离(nearest)或者最远距离(farest)算法,或者都不使用. 更多… | |
| Widget | findFirstNonLayoutWidget () | 
| 在此layout中查找第一个 non-layout widget 更多… | |
| int | findFirstFocusEnabledWidgetIndex () | 
| 在layout中查找第一个焦点可用(focus enabled)的 widget 索引(index), 它将递回(recusive) 搜索到的 child widget 更多… | |
| Widget | findFocusEnabledChildWidgetByIndex (ssize_t index) | 
| 通过索引(index)在layout中查找焦点可用(focus enabled)的child Widget 更多… | |
| Vec2 | getWorldCenterPoint (Widget node) | 
| 在世界坐标空间(world space)中获取一个widget的中点(center point) 更多… | |
| Widget | getNextFocusedWidget (FocusDirection direction, Widget current) | 
| 这个方法将被nextFocusedWidget立即调用. 更多… | |
| Widget | getPreviousFocusedWidget (FocusDirection direction, Widget current) | 
| 这个方法将被nextFocusedWidget立即调用. 更多… | |
| Widget | getChildWidgetByIndex (ssize_t index) | 
| 在 _children 数组中找到第n个元素. 更多… | |
| bool | isLastWidgetInContainer (Widget widget, FocusDirection direction) | 
| 根据所有父元素(parents)判断是否为最后的元素. 更多… | |
| bool | isWidgetAncestorSupportLoopFocus (Widget widget, FocusDirection direction) | 
| 查找任何使用布局(layout)类型作为方向的父 widget . 更多… | |
| Widget | passFocusToChild (FocusDirection direction, Widget current) | 
| 传递焦点(focus)给layout的下一个焦点可用(focus enabled)的child 更多… | |
| bool | checkFocusEnabledChild () | 
| 如果在layout中没有焦点可用(focus enabled)的child,它将返回false,否则返回true. 更多… | |
  Protected 成员函数 继承自 Widget | |
| virtual void | onPressStateChangedToNormal () | 
| virtual void | onPressStateChangedToPressed () | 
| virtual void | onPressStateChangedToDisabled () | 
| void | pushDownEvent () | 
| void | moveEvent () | 
| void | releaseUpEvent () | 
| void | cancelUpEvent () | 
| virtual void | updateTextureColor () | 
| virtual void | updateTextureOpacity () | 
| virtual void | updateTextureRGBA () | 
| virtual void | updateFlippedX () | 
| virtual void | updateFlippedY () | 
| void | updateColorToRenderer (Node renderer) | 
| void | updateOpacityToRenderer (Node renderer) | 
| void | updateRGBAToRenderer (Node renderer) | 
| void | copyProperties (Widget model) | 
| Widget | getWidgetParent () | 
| void | updateContentSizeWithTextureSize (const Size &size) | 
| virtual void | adaptRenderers () | 
| bool | isAncestorsEnabled () | 
| Widget | getAncensterWidget (Node node) | 
| bool | isAncestorsVisible (Node node) | 
  Protected 成员函数 继承自 ProtectedNode | |
| void | insertProtectedChild (Node child, int z) | 
| helper重新排序一个child 更多… | |
  Protected 成员函数 继承自 Node | |
| void | childrenAlloc (void) | 
| 较慢的分配 更多… | |
| void | insertChild (Node child, int z) | 
| 记录孩子的助手 更多… | |
| void | detachChild (Node child, ssize_t index, bool doCleanup) | 
| 删除一个孩子,调用child->onExit(), 从子数列中做清理,并删除它。 更多… | |
| Vec2 | convertToWindowSpace (const Vec2 &nodePoint) const | 
| 转换cocos2d 坐标系到用户界面窗口坐标 更多… | |
| Mat4 | transform (const Mat4 &parentTransform) | 
| virtual void | updateCascadeOpacity () | 
| virtual void | disableCascadeOpacity () | 
| virtual void | updateCascadeColor () | 
| virtual void | updateColor () | 
  Protected 成员函数 继承自 Ref | |
| Ref () | |
| 构造函数 更多… | |
| ## 额外继承的成员函数 | |
  静态 Public 属性 继承自 Node | |
| static const int | INVALID_TAG = -1 | 
| 默认的标记用于所有的节点 更多… | |
  静态 Protected 属性 继承自 Widget | |
| static Widget | _focusedWidget | 
| 储存唯一一个处于被focus状态的widget 更多… | |
| static Widget | _realFocusedWidget | 
  静态 Protected 属性 继承自 Node | |
| static int | s_globalOrderOfArrival | 
成员类型定义说明
| typedef std::function<void(Ref*, EventType)> ccListViewCallback | 
成员枚举类型说明
 
 
  |  strong | 
| 枚举值 | |
|---|---|
| ON_SELECTED_ITEM_START | |
| ON_SELECTED_ITEM_END | 
 
 
  |  strong | 
| 枚举值 | |
|---|---|
| LEFT | |
| RIGHT | |
| CENTER_HORIZONTAL | |
| TOP | |
| BOTTOM | |
| CENTER_VERTICAL | 
构造及析构函数说明
| ListView | ( | ) | 
Default constructor(默认构造函数)
 
 
  |  virtual | 
Default destructor(默认虚构函数)
成员函数说明
 
 
  |  inlineoverrideprotectedvirtual | 
添加一个子节点到容器内,z-order是0.
如果子节点被添加到了一个“running(活动着的)”节点,那么'onEnter'喝 'onEnterTransitionDidFinish' 将会立即调用。
- 参数
 child一个子节点。
重载 ScrollView .
 
 
  |  inlineoverrideprotectedvirtual | 
在内部容器中加入一个子节点(child)并确定其在画布中的z-order
如果在一个running节点上添加子节点,'onEnter'和'onEnterTransitionDidFinish'方法会被立刻调用
- 参数
 child一个子节点(A child node) zOrderZ order 用于确定绘图时的优先级. 具体细节轻参考setLocalZOrder(int)
重载 ScrollView .
 
 
  |  inlineoverrideprotectedvirtual | 
在内部容器中加入一个子节点(child)并确定其在画布中的z-order和其在父节点中的标签(tag)
如果在一个running节点上添加子节点,'onEnter'和'onEnterTransitionDidFinish'方法会被立刻调用
- 参数
 child一个子节点(A child node) zOrderZ order 用于确定绘图时的优先级. 具体细节轻参考setLocalZOrder(int) tag一个有助于辨认不同节点的整型变量. 具体细节请参考setTag(int)
重载 ScrollView .
| void addEventListener | ( | const ccListViewCallback & | callback | ) | 
| CC_DEPRECATED_ATTRIBUTE void addEventListenerListView | ( | Ref * | target, | 
| SEL_ListViewEvent | selector | ||
| ) | 
 
 
  |  overrideprotectedvirtual | 
重载 ScrollView .
 
 
  |  overrideprotectedvirtual | 
重载 ScrollView .
 
 
  |  static | 
分配并初始化.
 
 
  |  overrideprotectedvirtual | 
重载 ScrollView .
 
 
  |  inlineoverrideprotectedvirtual | 
通过名字从容器中获取一个子节点
- 参数
 name用于找到所需widget子节点的关键字(key)
- 返回
 - 名字与输入的参数相同的widget
 
重载 ScrollView .
 
 
  |  inlineoverrideprotectedvirtual | 
从容器中得到一个子节点通过它的标记。
- 参数
 tag一个标识符用于找到子节点。
- 返回
 - 一个标记与输入的参数相同的节点对象。
 
重载 ScrollView .
 
 
  |  inlineoverrideprotectedvirtual | 
返回子节点数组。
- 返回
 - 子节点数组。
 
重载 ScrollView .
 
 
  |  inlineoverrideprotectedvirtual | 
重载 ScrollView .
 
 
  |  inlineoverrideprotectedvirtual | 
返回子节点的总数
- 返回
 - 子节点的总数
 
重载 ScrollView .
| ssize_t getCurSelectedIndex | ( | ) | const | 
 
 
  |  overridevirtual | 
返回widget的类名称
重载 ScrollView .
| ssize_t getIndex | ( | Widget * | item | ) | const | 
返回项的索引.
- 参数
 item需要被.
- 返回
 - 项的索引
 
| Widget* getItem | ( | ssize_t | index | ) | 
返回一个索引和参数相同的项.
- 参数
 index项的索引.
- 返回
 - 返回widget 项.
 
| Vector<Widget*>& getItems | ( | ) | 
返回项的集合.
| float getItemsMargin | ( | ) | 
| void insertCustomItem | ( | Widget * | item, | 
| ssize_t | index | ||
| ) | 
插入一个自定义项(通过克隆创建的)进listView.
| void insertDefaultItem | ( | ssize_t | index | ) | 
插入一个默认项(通过克隆创建的)进listView.
 
 
  |  overrideprotectedvirtual | 
重载 ScrollView .
 
 
  |  overrideprotectedvirtual | 
重载 ScrollView .
| void pushBackCustomItem | ( | Widget * | item | ) | 
压栈一个自定义项(通过克隆创建的)进listView.
| void pushBackDefaultItem | ( | ) | 
压栈一个默认项(通过克隆创建的)进listView.
| void refreshView | ( | ) | 
 
 
  |  protected | 
 
 
  |  inlineoverrideprotectedvirtual | 
使用cleanup清空容器(container)中的所有子节点(children)
- 参见
 removeAllChildrenWithCleanup(bool)
重载 ScrollView .
 
 
  |  inlineoverrideprotectedvirtual | 
清空容器(container)中的所有子节点(children),同时也清空所有运行中的动作(取决于cleanup的参数).
- 参数
 cleanup为 true 时所有运行中的动作及容器中的子节点都将被清空, 为 false 则不会. removeAllChildren removeAllChildren
重载 ScrollView .
| void removeAllItems | ( | ) | 
 
 
  |  inlineoverrideprotectedvirtual | 
从容器中删除一个孩子,取决于cleanup参数同时会清除所有的活动的动作。
- 参数
 child被删除的子节点。 cleanuptrue 在这个节点上所有的动作和回调都会被删除, false 就不会删除。
重载 ScrollView .
| void removeItem | ( | ssize_t | index | ) | 
移除一个索引和参数相同的项.
- 参数
 index项的索引.
| void removeLastItem | ( | ) | 
移除listview的最后项.
| void requestRefreshView | ( | ) | 
 
 
  |  protected | 
 
 
  |  overridevirtual | 
改变scrollview的滑动方向.
- 参见
 - SCROLLVIEW_DIR SCROLLVIEW_DIR_VERTICAL垂直方向滑动, SCROLLVIEW_DIR_HORIZONTAL 水平方向滑动
 
- 参数
 SCROLLVIEW_DIR
重载 ScrollView .
| void setGravity | ( | Gravity | gravity | ) | 
改变listview的重力.
| void setItemModel | ( | Widget * | model | ) | 
设置listview的(item model)项模型
添加一个默认项时一个模型将会被克隆.
- 参数
 modellistview的项模型
| void setItemsMargin | ( | float | margin | ) | 
改变各项之间的边距(margin).
- 参数
 margin
 
 
  |  overridevirtual | 
在绘画之前,排列所有的孩子数组一次,而不是每次添加或者删除子节点时都排序。 这个方法可以大量地提高性能。
- 注解
 - 不要手动调用这个方法,除非一个添加过的子节点将要被删除在这个结构内。
 
重载 Layout .
 
 
  |  protected | 
类成员变量说明
| CC_CONSTRUCTOR_ACCESS pad0 | 
 
 
  |  protected | 
 
 
  |  protected | 
 
 
  |  protected | 
 
 
  |  protected | 
 
 
  |  protected | 
 
 
  |  protected | 
 
 
  |  protected | 
 
 
  |  protected | 
 
 
  |  protected | 
该类的文档由以下文件生成:
- /Users/zeroyang/Documents/github/cocos2d-x/cocos/ui/UIListView.h
 
 Public 类型 继承自 
