Merge pull request #11209 from VisualSJ/v3-docs

[ci skip] Add javascript notes...
This commit is contained in:
minggo 2015-03-30 09:30:29 +08:00
commit 85f80fefe5
46 changed files with 252 additions and 65 deletions

View File

@ -80,6 +80,7 @@ public:
* @return If you have custom stencil-based node with stencil drawing mechanics other then children-based,
* then this method should return true every time you wish stencil to be visited.
* By default returns true if has any children attached.
* @js NA
*/
virtual bool hasContent() const;
@ -114,22 +115,18 @@ public:
// Overrides
/**
* @js NA
* @lua NA
*/
virtual void onEnter() override;
/**
* @js NA
* @lua NA
*/
virtual void onEnterTransitionDidFinish() override;
/**
* @js NA
* @lua NA
*/
virtual void onExitTransitionDidStart() override;
/**
* @js NA
* @lua NA
*/
virtual void onExit() override;

View File

@ -42,6 +42,7 @@ NS_CC_BEGIN
/**
@brief Clipping Rectangle Node.
@details A node that clipped with specified rectangle.
@js NA
*/
class CC_DLL ClippingRectangleNode : public Node
{

View File

@ -49,7 +49,10 @@ public:
* @lua NA
*/
virtual ~ComponentContainer(void);
virtual Component* get(const std::string& name) const;
/**
* @js getComponent
*/
virtual Component* get(const std::string& name) const;
virtual bool add(Component *com);
virtual bool remove(const std::string& name);
virtual bool remove(Component *com);

View File

@ -63,6 +63,7 @@ public:
* @param point A Vec2 used to point.
* @param pointSize The point size.
* @param color The point color.
* @js NA
*/
void drawPoint(const Vec2& point, const float pointSize, const Color4F &color);
@ -71,6 +72,7 @@ public:
* @param position A Vec2 pointer.
* @param numberOfPoints The number of points.
* @param color The point color.
* @js NA
*/
void drawPoints(const Vec2 *position, unsigned int numberOfPoints, const Color4F &color);
@ -80,6 +82,7 @@ public:
* @param numberOfPoints The number of points.
* @param pointSize The point size.
* @param color The point color.
* @js NA
*/
void drawPoints(const Vec2 *position, unsigned int numberOfPoints, const float pointSize, const Color4F &color);
@ -88,6 +91,7 @@ public:
* @param origin The line origin.
* @param destination The line destination.
* @param color The line color.
* @js NA
*/
void drawLine(const Vec2 &origin, const Vec2 &destination, const Color4F &color);
@ -196,6 +200,7 @@ public:
* @param origin The rectangle origin.
* @param destination The rectangle destination.
* @param color The rectangle color.
* @js NA
*/
void drawSolidRect(const Vec2 &origin, const Vec2 &destination, const Color4F &color);
@ -204,6 +209,7 @@ public:
* @param poli A solid polygon given a pointer to CGPoint coordinates.
* @param numberOfPoints The number of vertices measured in points.
* @param color The solid polygon color.
* @js NA
*/
void drawSolidPoly(const Vec2 *poli, unsigned int numberOfPoints, const Color4F &color);
@ -215,6 +221,7 @@ public:
* @param scaleX The scale value in x.
* @param scaleY The scale value in y.
* @param color The solid circle color.
* @js NA
*/
void drawSolidCircle(const Vec2& center, float radius, float angle, unsigned int segments, float scaleX, float scaleY, const Color4F &color);
@ -224,6 +231,7 @@ public:
* @param angle The circle angel.
* @param segments The number of segments.
* @param color The solid circle color.
* @js NA
*/
void drawSolidCircle(const Vec2& center, float radius, float angle, unsigned int segments, const Color4F& color);
@ -247,6 +255,7 @@ public:
* @param fillColor The color will fill in polygon.
* @param borderWidth The border of line width.
* @param borderColor The border of line color.
* @js NA
*/
void drawPolygon(const Vec2 *verts, int count, const Color4F &fillColor, float borderWidth, const Color4F &borderColor);
@ -256,6 +265,7 @@ public:
* @param p2 The triangle vertex point.
* @param p3 The triangle vertex point.
* @param color The triangle color.
* @js NA
*/
void drawTriangle(const Vec2 &p1, const Vec2 &p2, const Vec2 &p3, const Color4F &color);
@ -266,13 +276,13 @@ public:
* @param to The destination of the bezier path.
* @param segments The The number of segments.
* @param color The quadratic bezier color.
* @js NA
*/
CC_DEPRECATED_ATTRIBUTE void drawQuadraticBezier(const Vec2& from, const Vec2& control, const Vec2& to, unsigned int segments, const Color4F &color);
/** Clear the geometry in the node's buffer. */
void clear();
/** Get the color mixed mode.
* @js NA
* @lua NA
*/
const BlendFunc& getBlendFunc() const;
@ -285,8 +295,17 @@ public:
*/
void setBlendFunc(const BlendFunc &blendFunc);
void onDraw(const Mat4 &transform, uint32_t flags);
void onDrawGLLine(const Mat4 &transform, uint32_t flags);
/**
* @js NA
*/
void onDraw(const Mat4 &transform, uint32_t flags);
/**
* @js NA
*/
void onDrawGLLine(const Mat4 &transform, uint32_t flags);
/**
* @js NA
*/
void onDrawGLPoint(const Mat4 &transform, uint32_t flags);
// Overrides

View File

@ -76,12 +76,21 @@ NS_CC_BEGIN
class PointArray;
/**
* @js cc.DrawingPrimitiveCanvas/cc.DrawingPrimitiveWebGL
*/
namespace DrawPrimitives
{
/** Initializes the drawing primitives. */
/**
* Initializes the drawing primitives.
* @js NA
*/
CC_DEPRECATED_ATTRIBUTE void CC_DLL init();
/** Frees allocated resources by the drawing primitives. */
/**
* Frees allocated resources by the drawing primitives.
* @js NA
*/
CC_DEPRECATED_ATTRIBUTE void CC_DLL free();
/** Draws a point given x and y coordinate measured in points
@ -169,6 +178,7 @@ namespace DrawPrimitives
* @param segments The number of segments.
* @param scaleX The scale value in x.
* @param scaleY The scale value in y.
* @js NA
*/
CC_DEPRECATED_ATTRIBUTE void CC_DLL drawSolidCircle(const Vec2& center, float radius, float angle, unsigned int segments, float scaleX, float scaleY);
@ -177,6 +187,7 @@ namespace DrawPrimitives
* @param radius The circle rotate of radius.
* @param angle The circle angel.
* @param segments The number of segments.
* @js NA
*/
CC_DEPRECATED_ATTRIBUTE void CC_DLL drawSolidCircle(const Vec2& center, float radius, float angle, unsigned int segments);
@ -229,6 +240,7 @@ namespace DrawPrimitives
* @param b The blue color with a unsigned bytes.
* @param a Alpha with a unsigned bytes.
* @since v2.0
* @js setDrawColor
*/
CC_DEPRECATED_ATTRIBUTE void CC_DLL setDrawColor4B(GLubyte r, GLubyte g, GLubyte b, GLubyte a);
@ -239,6 +251,7 @@ namespace DrawPrimitives
* @param b The blue color with an floats.
* @param a Alpha with an floats.
* @since v2.0
* @js setDrawColor
*/
CC_DEPRECATED_ATTRIBUTE void CC_DLL setDrawColor4F(GLfloat r, GLfloat g, GLfloat b, GLfloat a);

View File

@ -73,6 +73,7 @@ namespace experimental{
* http://www.cocos2d-iphone.org/wiki/doku.php/prog_guide:tiled_maps
* @since v3.2
* @js NA
*/
class CC_DLL TMXLayer : public Node

View File

@ -94,6 +94,7 @@ class TMXLayer;
* object->getProperty(name_of_the_property);
* @since v3.2
* @js NA
*/
class CC_DLL TMXTiledMap : public Node
{

View File

@ -27,6 +27,9 @@ THE SOFTWARE.
#include "platform/CCGL.h"
/**
* @js NA
*/
class GLBufferedNode
{
public:

View File

@ -103,6 +103,7 @@ public:
/**@{
Interface for custom action when before or after draw.
@js NA
*/
virtual void beforeBlit() {}
virtual void afterBlit() {}
@ -158,7 +159,6 @@ public:
*/
Vec3 getVertex(const Vec2& pos) const;
/** @deprecated Use getVertex() instead
* @js NA
* @lua NA
*/
CC_DEPRECATED_ATTRIBUTE Vec3 vertex(const Vec2& pos) const { return getVertex(pos); }
@ -168,13 +168,11 @@ public:
*/
Vec3 getOriginalVertex(const Vec2& pos) const;
/** @deprecated Use getOriginalVertex() instead
* @js NA
* @lua NA
*/
CC_DEPRECATED_ATTRIBUTE Vec3 originalVertex(const Vec2& pos) const { return getOriginalVertex(pos); }
/** Sets a new vertex at a given position.
* @js NA
* @lua NA
*/
void setVertex(const Vec2& pos, const Vec3& vertex);
@ -190,6 +188,7 @@ public:
/**@{
Getter and Setter for depth test state when blit.
@js NA
*/
void setNeedDepthTestForBlit( bool neededDepthTest) { _needDepthTestForBlit = neededDepthTest; }
bool getNeedDepthTestForBlit() const { return _needDepthTestForBlit; }
@ -233,7 +232,6 @@ public:
*/
Quad3 getTile(const Vec2& pos) const;
/** returns the tile at the given position
* @js NA
* @lua NA
*/
CC_DEPRECATED_ATTRIBUTE Quad3 tile(const Vec2& pos) const { return getTile(pos); }
@ -243,13 +241,11 @@ public:
*/
Quad3 getOriginalTile(const Vec2& pos) const;
/** returns the original tile (untransformed) at the given position
* @js NA
* @lua NA
*/
CC_DEPRECATED_ATTRIBUTE Quad3 originalTile(const Vec2& pos) const { return getOriginalTile(pos); }
/** Sets a new tile.
* @js NA
* @lua NA
*/
void setTile(const Vec2& pos, const Quad3& coords);

View File

@ -106,6 +106,7 @@ typedef struct _ttfConfig
* - http://www.n4te.com/hiero/hiero.jnlp (Free, Java)
* - http://slick.cokeandcode.com/demos/hiero.jnlp (Free, Java)
* - http://www.angelcode.com/products/bmfont/ (Free, Windows only)
* @js NA
*/
class CC_DLL Label : public SpriteBatchNode, public LabelProtocol
{

View File

@ -86,6 +86,9 @@ public:
virtual const std::string& getString(void) const override;
virtual void updateAtlasValues() override;
/**
* @js NA
*/
virtual std::string getDescription() const override;
#if CC_LABELATLAS_DEBUG_DRAW

View File

@ -84,17 +84,23 @@ public:
static Menu* create(MenuItem* item, ...) CC_REQUIRES_NULL_TERMINATION;
#endif
/** Creates a Menu with a Array of MenuItem objects. */
/**
* Creates a Menu with a Array of MenuItem objects.
* @js NA
*/
static Menu* createWithArray(const Vector<MenuItem*>& arrayOfItems);
/**
* Creates a Menu with it's item, then use addChild() to add
* other items. It is used for script, it can't init with undetermined
* number of variables.
* @js NA
*/
static Menu* createWithItem(MenuItem* item);
/** Creates a Menu with MenuItem objects. */
/** Creates a Menu with MenuItem objects.
* @js NA
*/
static Menu* createWithItems(MenuItem *firstItem, va_list args);
/** Align items vertically. */
@ -119,7 +125,9 @@ public:
/** Align items in rows of columns. */
void alignItemsInColumns(int columns, va_list args);
/** Align items in array of columns. */
/** Align items in array of columns.
* @js NA
*/
void alignItemsInColumnsWithArray(const ValueVector& rows);
/** Align items in columns of rows. */
@ -128,7 +136,9 @@ public:
/** Align items in columns of rows. */
void alignItemsInRows(int rows, va_list args);
/** Align items in array of rows. */
/** Align items in array of rows.
* @js NA
*/
void alignItemsInRowsWithArray(const ValueVector& columns);
/**

View File

@ -79,6 +79,9 @@ public:
/** Returns whether or not the item is selected. */
virtual bool isSelected() const;
/**
* @js NA
*/
virtual void onExit() override;
/** Set the callback to the menu item.
@ -90,12 +93,13 @@ public:
void setCallback(const ccMenuCallback& callback);
/** Set the target/selector of the menu item.
* @js NA
* @lua NA
*/
CC_DEPRECATED_ATTRIBUTE void setTarget(Ref *rec, SEL_MenuHandler selector);
/**
* @js NA
*/
virtual std::string getDescription() const override;
CC_CONSTRUCTOR_ACCESS:
@ -115,7 +119,6 @@ CC_CONSTRUCTOR_ACCESS:
virtual ~MenuItem();
/** Initializes a MenuItem with a target/selector.
* @js NA
* @lua NA
*/
bool initWithCallback(const ccMenuCallback& callback);
@ -275,11 +278,13 @@ public:
* c++ can not overload static and non-static member functions with the same parameter types.
* so change the name to setFontSizeObj.
* @js setFontSize
* @js NA
*/
void setFontSizeObj(int size);
/** get font size .
* @js getFontSize
* @js NA
*/
int getFontSizeObj() const;
CC_DEPRECATED_ATTRIBUTE int fontSizeObj() const { return getFontSizeObj(); };
@ -289,15 +294,19 @@ public:
* c++ can not overload static and non-static member functions with the same parameter types.
* so change the name to setFontNameObj.
* @js setFontName
* @js NA
*/
void setFontNameObj(const std::string& name);
/** Returns the name of the Font.
* @js getFontNameObj
* @js NA
*/
const std::string& getFontNameObj() const;
/** Deprecated Use getFontNameObj() instead. */
/** Deprecated Use getFontNameObj() instead.
* @js NA
*/
CC_DEPRECATED_ATTRIBUTE const std::string& fontNameObj() const { return getFontNameObj(); }
CC_CONSTRUCTOR_ACCESS:

View File

@ -141,6 +141,9 @@ public:
/// @} end of Children and Parent
/**
* @js NA
*/
virtual void visit(Renderer *renderer, const Mat4 &parentTransform, uint32_t parentFlags) override;
virtual void cleanup() override;

View File

@ -113,7 +113,9 @@ public:
*/
virtual void beginWithClear(float r, float g, float b, float a, float depthValue, int stencilValue);
/** End is key word of lua, use other name to export to lua. */
/** End is key word of lua, use other name to export to lua.
* @js NA
*/
inline void endToLua(){ end();};
/** Ends grabbing. */
@ -145,6 +147,7 @@ public:
*
* @param flipImage Whether or not to flip image.
* @return An image.
* @js NA
*/
Image* newImage(bool flipImage = true);
@ -272,6 +275,7 @@ public:
/** Flag: Use stack matrix computed from scene hierarchy or generate new modelView and projection matrix.
*
* @param keepMatrix Wether or not use stack matrix computed from scene hierarchy or generate new modelView and projection matrix.
* @js NA
*/
void setKeepMatrix(bool keepMatrix);
/**Used for grab part of screen to a texture.
@ -285,8 +289,14 @@ public:
/** FIXME: should be procted.
* but due to a bug in PowerVR + Android,
* the constructor is public again.
* @js ctor
*/
RenderTexture();
/**
* @js NA
* @lua NA
*/
virtual ~RenderTexture();
/** Initializes a RenderTexture object with width and height in Points and a pixel format, only RGB and RGBA formats are valid.
*

View File

@ -244,7 +244,9 @@ public:
* Returns the current displayed frame.
*/
virtual SpriteFrame* getSpriteFrame() const;
/** @deprecated Use `getSpriteFrame()` instead. */
/** @deprecated Use `getSpriteFrame()` instead.
* @js NA
*/
CC_DEPRECATED_ATTRIBUTE virtual SpriteFrame* getDisplayFrame() const { return getSpriteFrame(); }
/** @deprecated Use `getSpriteFrame()` instead. */
CC_DEPRECATED_ATTRIBUTE virtual SpriteFrame* displayFrame() const { return getSpriteFrame(); };
@ -345,7 +347,9 @@ public:
* @lua NA
*/
CC_DEPRECATED_ATTRIBUTE bool isFlipX() { return isFlippedX(); };
/** @deprecated Use setFlippedX() instead */
/** @deprecated Use setFlippedX() instead
* @js NA
*/
CC_DEPRECATED_ATTRIBUTE void setFlipX(bool flippedX) { setFlippedX(flippedX); };
/**
@ -368,9 +372,13 @@ public:
/// @} End of Sprite properties getter/setters
/** @deprecated Use isFlippedY() instead. */
/** @deprecated Use isFlippedY() instead.
* @js NA
*/
CC_DEPRECATED_ATTRIBUTE bool isFlipY() { return isFlippedY(); };
/** @deprecated Use setFlippedY() instead. */
/** @deprecated Use setFlippedY() instead.
* @js NA
*/
CC_DEPRECATED_ATTRIBUTE void setFlipY(bool flippedY) { setFlippedY(flippedY); };
//
@ -393,6 +401,9 @@ public:
inline const BlendFunc& getBlendFunc() const override { return _blendFunc; }
/// @}
/**
* @js NA
*/
virtual std::string getDescription() const override;
/// @{
@ -429,7 +440,9 @@ public:
/// @}
CC_CONSTRUCTOR_ACCESS:
/**
* @js ctor
*/
Sprite();
virtual ~Sprite();
@ -500,7 +513,6 @@ CC_CONSTRUCTOR_ACCESS:
*
* @param filename The path to an image file in local file system.
* @return True if the sprite is initialized properly, false otherwise.
* @js init
* @lua init
*/
virtual bool initWithFile(const std::string& filename);
@ -515,7 +527,6 @@ CC_CONSTRUCTOR_ACCESS:
* @param filename The path to an image file in local file system.
* @param rect The rectangle assigned the content area from texture.
* @return True if the sprite is initialized properly, false otherwise.
* @js init
* @lua init
*/
virtual bool initWithFile(const std::string& filename, const Rect& rect);

View File

@ -183,11 +183,13 @@ public:
*/
virtual void setBlendFunc(const BlendFunc &blendFunc) override;
/**
* @js NA
* @lua NA
*/
virtual const BlendFunc& getBlendFunc() const override;
/**
* @js NA
*/
virtual void visit(Renderer *renderer, const Mat4 &parentTransform, uint32_t parentFlags) override;
using Node::addChild;
@ -195,10 +197,19 @@ public:
virtual void addChild(Node * child, int zOrder, const std::string &name) override;
virtual void reorderChild(Node *child, int zOrder) override;
virtual void removeChild(Node *child, bool cleanup) override;
virtual void removeChild(Node *child, bool cleanup) override;
/**
* @js NA
*/
virtual void removeAllChildrenWithCleanup(bool cleanup) override;
virtual void sortAllChildren() override;
virtual void draw(Renderer *renderer, const Mat4 &transform, uint32_t flags) override;
virtual void sortAllChildren() override;
/**
* @js NA
*/
virtual void draw(Renderer *renderer, const Mat4 &transform, uint32_t flags) override;
/**
* @js NA
*/
virtual std::string getDescription() const override;
/** Inserts a quad at a certain index into the texture atlas. The Sprite won't be added into the children array.

View File

@ -109,6 +109,9 @@ public:
* @return Returns the tile (Sprite) at a given a tile coordinate.
*/
Sprite* getTileAt(const Vec2& tileCoordinate);
/**
* @js NA
*/
CC_DEPRECATED_ATTRIBUTE Sprite* tileAt(const Vec2& tileCoordinate) { return getTileAt(tileCoordinate); };
/** Returns the tile gid at a given tile coordinate. It also returns the tile flags.
@ -118,7 +121,10 @@ public:
* @param flags Tile flags.
* @return Returns the tile gid at a given tile coordinate. It also returns the tile flags.
*/
uint32_t getTileGIDAt(const Vec2& tileCoordinate, TMXTileFlags* flags = nullptr);
uint32_t getTileGIDAt(const Vec2& tileCoordinate, TMXTileFlags* flags = nullptr);
/**
* @js NA
*/
CC_DEPRECATED_ATTRIBUTE uint32_t tileGIDAt(const Vec2& tileCoordinate, TMXTileFlags* flags = nullptr){
return getTileGIDAt(tileCoordinate, flags);
};
@ -155,7 +161,10 @@ public:
* @param tileCoordinate The tile coordinate.
* @return The position in points of a given tile coordinate.
*/
Vec2 getPositionAt(const Vec2& tileCoordinate);
Vec2 getPositionAt(const Vec2& tileCoordinate);
/**
* @js NA
*/
CC_DEPRECATED_ATTRIBUTE Vec2 positionAt(const Vec2& tileCoordinate) { return getPositionAt(tileCoordinate); };
/** Return the value for the specific property name.
@ -163,7 +172,10 @@ public:
* @param propertyName The specific property name.
* @return Return the value for the specific property name.
*/
Value getProperty(const std::string& propertyName) const;
Value getProperty(const std::string& propertyName) const;
/**
* @js NA
*/
CC_DEPRECATED_ATTRIBUTE Value propertyNamed(const std::string& propertyName) const { return getProperty(propertyName); };
/** Creates the tiles. */
@ -227,6 +239,7 @@ public:
/** Set tileset information for the layer.
*
* @param info The tileset information for the layer.
* @js NA
*/
inline void setTileSet(TMXTilesetInfo* info) {
CC_SAFE_RETAIN(info);
@ -275,6 +288,9 @@ public:
virtual void addChild(Node * child, int zOrder, int tag) override;
// super method
void removeChild(Node* child, bool cleanup) override;
/**
* @js NA
*/
virtual std::string getDescription() const override;
protected:

View File

@ -71,6 +71,7 @@ public:
*
* @param propertyName The specific property name.
* @return Return the value for the specific property name.
* @js NA
*/
Value getProperty(const std::string& propertyName) const;

View File

@ -125,6 +125,7 @@ public:
* @param tmxString A TMX formatted XML string.
* @param resourcePath The path to TMX resources.
* @return An autorelease object.
* @js NA
*/
static TMXTiledMap* createWithXML(const std::string& tmxString, const std::string& resourcePath);
@ -246,7 +247,9 @@ public:
_properties = properties;
};
/** Get the description. */
/** Get the description.
* @js NA
*/
virtual std::string getDescription() const override;
CC_CONSTRUCTOR_ACCESS:

View File

@ -46,6 +46,7 @@ class CC_DLL TextFieldDelegate
public:
/**
* Desctructor for TextFieldDelegate.
* @js NA
*/
virtual ~TextFieldDelegate() {}
@ -91,6 +92,7 @@ public:
/**
*@brief If the sender doesn't want to draw, return true.
* @js NA
*/
virtual bool onVisit(TextFieldTTF * sender,Renderer *renderer, const Mat4 &transform, uint32_t flags)
{
@ -115,10 +117,14 @@ public:
*/
virtual ~TextFieldTTF();
/** Creates a TextFieldTTF from a fontname, alignment, dimension and font size. */
/** Creates a TextFieldTTF from a fontname, alignment, dimension and font size.
* @js NA
*/
static TextFieldTTF * textFieldWithPlaceHolder(const std::string& placeholder, const Size& dimensions, TextHAlignment alignment, const std::string& fontName, float fontSize);
/** Creates a TextFieldTTF from a fontname and font size. */
/** Creates a TextFieldTTF from a fontname and font size.
* @js NA
*/
static TextFieldTTF * textFieldWithPlaceHolder(const std::string& placeholder, const std::string& fontName, float fontSize);
/** Initializes the TextFieldTTF with a font name, alignment, dimension and font size. */
@ -141,12 +147,10 @@ public:
// properties
//////////////////////////////////////////////////////////////////////////
/**
* @js NA
* @lua NA
*/
inline TextFieldDelegate* getDelegate() const { return _delegate; };
/**
* @js NA
* @lua NA
*/
inline void setDelegate(TextFieldDelegate* delegate) { _delegate = delegate; };
@ -210,12 +214,14 @@ public:
* Set enable secure text entry represention.
* If you want to display password in TextField, this option is very helpful.
*@param value Whether or not to display text with secure text entry.
* @js NA
*/
virtual void setSecureTextEntry(bool value);
/**
* Query whether the currently display mode is secure text entry or not.
*@return Whether current text is displayed as secure text entry.
* @js NA
*/
virtual bool isSecureTextEntry();

View File

@ -50,6 +50,7 @@ IMPORTANT:
This class is deprecated. It is maintained for compatibility reasons only.
You SHOULD not use this class.
Instead, use the newer TMX file format: TMXTiledMap
@js NA
*/
class CC_DLL TileMapAtlas : public AtlasNode
{

View File

@ -44,6 +44,7 @@ class Data;
* There are two types of bundle files, c3t and c3b.
* c3t text file
* c3b binary file
* @js NA
*/
class CC_DLL Bundle3D
{

View File

@ -35,7 +35,9 @@
NS_CC_BEGIN
/**mesh vertex attribute*/
/**mesh vertex attribute
* @js NA
*/
struct MeshVertexAttrib
{
//attribute size
@ -49,7 +51,9 @@ struct MeshVertexAttrib
};
/** model node data, since 3.3 */
/** model node data, since 3.3
* @js NA
*/
struct ModelData
{
std::string subMeshId;
@ -68,7 +72,9 @@ struct ModelData
}
};
/** Node data, since 3.3 */
/** Node data, since 3.3
* @js NA
*/
struct NodeData
{
std::string id;
@ -99,7 +105,9 @@ struct NodeData
};
/** node datas, since 3.3 */
/** node datas, since 3.3
* @js NA
*/
struct NodeDatas
{
std::vector<NodeData*> skeleton; //skeleton
@ -120,7 +128,9 @@ struct NodeDatas
}
};
/**mesh data*/
/**mesh data
* @js NA
*/
struct MeshData
{
typedef std::vector<unsigned short> IndexArray;
@ -173,7 +183,9 @@ public:
}
};
/** mesh datas */
/** mesh datas
* @js NA
*/
struct MeshDatas
{
std::vector<MeshData*> meshDatas;
@ -192,7 +204,9 @@ struct MeshDatas
}
};
/**skin data*/
/**skin data
* @js NA
*/
struct SkinData
{
std::vector<std::string> skinBoneNames; //skin bones affect skin
@ -261,7 +275,9 @@ struct SkinData
};
/**material data, */
/**material data,
* @js NA
*/
struct MaterialData
{
std::map<int, std::string> texturePaths; //submesh id, texture path
@ -272,7 +288,9 @@ struct MaterialData
};
/**new material, since 3.3 */
/**new material, since 3.3
* @js NA
*/
struct NTextureData
{
enum class Usage {
@ -308,7 +326,9 @@ struct NMaterialData
return nullptr;
}
};
/** material datas, since 3.3 */
/** material datas, since 3.3
* @js NA
*/
struct MaterialDatas
{
std::vector<NMaterialData> materials;
@ -326,7 +346,9 @@ struct MaterialDatas
return nullptr;
}
};
/**animation data*/
/**animation data
* @js NA
*/
struct Animation3DData
{
public:
@ -396,7 +418,9 @@ public:
}
};
/**reference data*/
/**reference data
* @js NA
*/
struct Reference
{
public:

View File

@ -41,6 +41,7 @@ NS_CC_BEGIN
/**
* @brief BundleReader is an interface for reading sequence of bytes.
* @js NA
*/
class BundleReader: public cocos2d::Ref
{

View File

@ -38,6 +38,7 @@ class Camera;
/**
* the frustum is a six-side geometry, usually use the frustum to do fast-culling:
* check a entity whether is a potential visible entity
* @js NA
*/
class CC_DLL Frustum
{

View File

@ -44,6 +44,7 @@ class Skeleton3D;
/**
* @brief MeshSkin, A class maintain a collection of bones that affect Mesh vertex.
* And it is responsible for computing matrix palletes that used by skin mesh rendering.
* @js NA
*/
class CC_DLL MeshSkin: public Ref
{

View File

@ -51,6 +51,7 @@ class MeshVertexData;
/**
* the MeshIndexData class.
* @brief the MeshIndexData contain all of the indices data which mesh need.
* @js NA
*/
class MeshIndexData : public Ref
{

View File

@ -37,6 +37,7 @@ NS_CC_BEGIN
/**
* Oritened Bounding Box(OBB)
* @brief the OBB is similar to the AABB but the bounding box has the same direction as Sprite3D. so it's collistion detection more precise than AABB
* @js NA
*/
class CC_DLL OBB
{

View File

@ -23,6 +23,7 @@ NS_CC_BEGIN
/**
* @brief .obj file Loader
* @js NA
**/
class ObjLoader
{

View File

@ -39,6 +39,7 @@ enum class PointSide
/**
* Defines plane
* @js NA
**/
class CC_DLL Plane
{

View File

@ -39,6 +39,7 @@ NS_CC_BEGIN
/**
* @brief Ray is a line with one end. usually use it to check intersects with some object,such as Plane, OBB, AABB
* @js NA
**/
class CC_DLL Ray
{

View File

@ -40,6 +40,7 @@ class Texture2D;
/**
* @brief the sprite3D material is only texture for now
* @js NA
*/
class Sprite3DMaterialCache
{

View File

@ -48,6 +48,7 @@ NS_CC_BEGIN
/**
* @class AsyncTaskPool
* @brief This class allows to perform background operations without having to manipulate threads.
* @js NA
*/
class CC_DLL AsyncTaskPool
{

View File

@ -63,12 +63,10 @@ public:
*/
virtual ~IMEDelegate();
/**
* @js NA
* @lua NA
*/
virtual bool attachWithIME();
/**
* @js NA
* @lua NA
*/
virtual bool detachWithIME();

View File

@ -56,21 +56,18 @@ public:
/**
* @brief Dispatches the input text from IME.
* @js NA
* @lua NA
*/
void dispatchInsertText(const char * text, size_t len);
/**
* @brief Dispatches the delete-backward operation.
* @js NA
* @lua NA
*/
void dispatchDeleteBackward();
/**
* @brief Get the content text from IMEDelegate, retrieved previously from IME.
* @js NA
* @lua NA
*/
const std::string& getContentText();
@ -79,22 +76,18 @@ public:
// dispatch keyboard notification
//////////////////////////////////////////////////////////////////////////
/**
* @js NA
* @lua NA
*/
void dispatchKeyboardWillShow(IMEKeyboardNotificationInfo& info);
/**
* @js NA
* @lua NA
*/
void dispatchKeyboardDidShow(IMEKeyboardNotificationInfo& info);
/**
* @js NA
* @lua NA
*/
void dispatchKeyboardWillHide(IMEKeyboardNotificationInfo& info);
/**
* @js NA
* @lua NA
*/
void dispatchKeyboardDidHide(IMEKeyboardNotificationInfo& info);

View File

@ -48,6 +48,7 @@ NS_CC_BEGIN
* Similar to std::unordered_map, but it will manage reference count automatically internally.
* Which means it will invoke Ref::retain() when adding an element, and invoke Ref::release() when removing an element.
* @warning The element should be `Ref` or its sub-class.
* @js NA
* @lua NA
*/
template <class K, class V>

View File

@ -60,6 +60,7 @@ enum ccScriptType {
/**
* This classes is wrapped to store the handler corresponding to the Lua function pointer and assign the handler a unique id
* @js NA
*/
class ScriptHandlerEntry : public Ref
{
@ -120,6 +121,7 @@ protected:
/**
* The SchedulerScriptHandlerEntry is used to store the handler corresponding to the Lua function pointer and assign the handler a unique id like ScriptHandlerEntry.
* Meanwhile,create a timer that named TimerScriptHandler to execute the Lua function corresponding to the handler in the interval time if the SchedulerScriptHandlerEntry object isn't paused.
* @js NA
*/
class SchedulerScriptHandlerEntry : public ScriptHandlerEntry
{
@ -201,6 +203,7 @@ private:
/**
* @cond
* @js NA
*/
class TouchScriptHandlerEntry : public ScriptHandlerEntry
{
@ -239,6 +242,7 @@ private:
/**
* @endcond
* @js NA
*/
/** ScriptEventType enum*/
@ -260,6 +264,7 @@ enum ScriptEventType
/**
* For Lua, Wrapper the script data that should be used to find the handler corresponding to the Lua function by the nativeobject pointer and store the value pointer which would be converted concretely by the different events,then the converted data would be passed into the Lua stack.
* @js NA
*/
struct BasicScriptData
{
@ -293,6 +298,7 @@ struct BasicScriptData
/**
* For Lua, the SchedulerScriptData is used to find the Lua function pointer by the handler, then call the Lua function by push the elapse into the Lua stack as a parameter when scheduler update event is triggered.
* @js NA
*/
struct SchedulerScriptData
{
@ -329,6 +335,7 @@ struct SchedulerScriptData
/**
* For Lua, the TouchesScriptData is used to find the Lua function pointer by the nativeObject, then call the Lua function by push touches data and actionType into the Lua stack as the parameters when the touches event is triggered.
* @js NA
*/
struct TouchesScriptData
{
@ -378,6 +385,7 @@ struct TouchesScriptData
/**
* For Lua, the TouchScriptData is used to find the Lua function pointer by the nativeObject, then call the Lua function by push touch data and actionType convered to string type into the Lua stack as the parameters when the touch event is triggered.
* @js NA
*/
struct TouchScriptData
{
@ -428,6 +436,7 @@ struct TouchScriptData
/**
* For Lua, the KeypadScriptData is used to find the Lua function pointer by the nativeObject, then call the Lua function by push the actionType convered to string type into the Lua stack as the parameters when the Keypad event is triggered.
* @js NA
*/
struct KeypadScriptData
{
@ -461,6 +470,7 @@ struct KeypadScriptData
/**
* For Lua, the CommonScriptData is used to find the Lua function pointer by the handler, then call the Lua function by push the eventName, eventSource(if it not nullptr), eventSourceClassName(if it is nullptr or "", and the eventSource is not nullptr,would give the default string "cc.Ref") into the Lua stack as the parameter when the common event such as is triggered.
* @js NA
*/
struct CommonScriptData
{
@ -519,6 +529,7 @@ struct CommonScriptData
/**
* The ScriptEvent wrapper the different script data corresponding to the ScriptEventType in to the unified struct.
* when the corresponding event is triggered, we could call the `sendEvent` of ScriptEngineProtocol to handle the event.
* @js NA
*/
struct ScriptEvent
{
@ -554,6 +565,7 @@ struct ScriptEvent
* Don't make ScriptEngineProtocol inherits from Object since setScriptEngine is invoked only once in AppDelegate.cpp,
* It will affect the lifecycle of ScriptEngine instance, the autorelease pool will be destroyed before destructing ScriptEngine.
* So a crash will appear on Win32 if you click the close button.
* @js NA
*/
class CC_DLL ScriptEngineProtocol
{
@ -701,6 +713,7 @@ class Node;
* ScriptEngineManager is a singleton which manager an object instance of ScriptEngineProtocl, such as LuaEngine.
*
* @since v0.99.5-x-0.8.5
* @js NA
*/
class CC_DLL ScriptEngineManager
{

View File

@ -93,11 +93,13 @@ public:
/**
* Default constructor
* @js ctor
*/
ListView();
/**
* Default destructor
* @js NA
*/
virtual ~ListView();

View File

@ -59,11 +59,13 @@ public:
/**
* Default constructor.
* @js ctor
*/
LoadingBar();
/**
* Default destructor.
* @js NA
*/
virtual ~LoadingBar();

View File

@ -86,11 +86,13 @@ public:
/**
* Default constructor
* @js ctor
*/
PageView();
/**
* Default destructor
* @js NA
*/
virtual ~PageView();

View File

@ -47,11 +47,13 @@ public:
/**
* Default constructor.
* @js ctor
*/
RelativeBox();
/**
* Default destructor.
* @js NA
*/
virtual ~RelativeBox();

View File

@ -55,11 +55,13 @@ public:
/**
* @brief Default constructor.
* @js ctor
*/
RichElement(){};
/**
* @brief Default destructor.
* @js NA
*/
virtual ~RichElement(){};
@ -90,12 +92,14 @@ public:
/**
*@brief Default constructor.
* @js ctor
*/
RichElementText(){_type = Type::TEXT;};
/**
*@brief Default destructor.
* @js NA
*/
virtual ~RichElementText(){};
@ -142,6 +146,7 @@ public:
/**
* @brief Default constructor.
* @js ctor
*
*/
RichElementImage(){_type = Type::IMAGE;};
@ -149,6 +154,7 @@ public:
/**
* @brief Default destructor.
* @js NA
*/
virtual ~RichElementImage(){};
@ -191,12 +197,14 @@ public:
/**
* @brief Default constructor.
* @js ctor
*/
RichElementCustomNode(){_type = Type::CUSTOM;};
/**
* @brief Default destructor.
* @js NA
*/
virtual ~RichElementCustomNode(){CC_SAFE_RELEASE(_customNode);};
@ -237,11 +245,13 @@ public:
/**
* @brief Default constructor.
* @js ctor
*/
RichText();
/**
* @brief Default destructor.
* @js NA
*/
virtual ~RichText();

View File

@ -403,6 +403,7 @@ namespace ui {
* @param rotated Whether the sprite is rotated or not.
* @param capInsets The Values to use for the cap insets.
* @return True if update success, false otherwise.
* @js NA
*/
virtual bool updateWithSprite(Sprite* sprite,
const Rect& rect,
@ -419,6 +420,7 @@ namespace ui {
* @param originalSize The origial size of the sprite.
* @param capInsets The Values to use for the cap insets.
* @return True if update success, false otherwise.
* @js NA
*/
virtual bool updateWithSprite(Sprite* sprite,
const Rect& rect,
@ -559,6 +561,7 @@ namespace ui {
* @brief Toggle 9-slice feature.
* If Scale9Sprite is 9-slice disabled, the Scale9Sprite will rendered as a normal sprite.
* @param enabled True to enable 9-slice, false otherwise.
* @js NA
*/
void setScale9Enabled(bool enabled);
@ -566,6 +569,7 @@ namespace ui {
* @brief Query whether the Scale9Sprite is enable 9-slice or not.
*
* @return True if 9-slice is enabled, false otherwise.
* @js NA
*/
bool isScale9Enabled()const;

View File

@ -106,11 +106,13 @@ public:
/**
* Default constructor
* @js ctor
*/
ScrollView();
/**
* Default destructor
* @js NA
*/
virtual ~ScrollView();

View File

@ -66,11 +66,13 @@ public:
typedef std::function<void(Ref*,EventType)> ccSliderCallback;
/**
* Default constructor.
* @js ctor
*/
Slider();
/**
* Default destructor.
* @js NA
*/
virtual ~Slider();
@ -132,12 +134,14 @@ public:
/**
* Sets capinsets for progress bar slider, if slider is using scale9 renderer.
* @param capInsets Capinsets for progress bar slider.
* @js NA
*/
void setCapInsetProgressBarRebderer(const Rect &capInsets);
/**
* Gets capinsets for progress bar slider, if slider is using scale9 renderer.
* @return Capinsets for progress bar slider.
* @js NA
*/
const Rect& getCapInsetsProgressBarRebderer()const;