Update comment for Lua

This commit is contained in:
samuele3hu 2015-03-30 15:47:47 +08:00
parent 30db8ab7fa
commit c3ad458a26
57 changed files with 264 additions and 41 deletions

View File

@ -49,6 +49,7 @@ class CC_DLL ActionCamera : public ActionInterval //<NSCopying>
public: public:
/** /**
* @js ctor * @js ctor
* @lua new
*/ */
ActionCamera(); ActionCamera();
/** /**

View File

@ -44,11 +44,13 @@ class CC_DLL AABB
public: public:
/** /**
* Constructor. * Constructor.
* @lua new
*/ */
AABB(); AABB();
/** /**
* Constructor. * Constructor.
* @lua new
*/ */
AABB(const Vec3& min, const Vec3& max); AABB(const Vec3& min, const Vec3& max);

View File

@ -70,7 +70,11 @@ public:
/**get duration*/ /**get duration*/
float getDuration() const { return _duration; } float getDuration() const { return _duration; }
/**get bone curve*/ /**
* get bone curve
*
* @lua NA
*/
Curve* getBoneCurveByName(const std::string& name) const; Curve* getBoneCurveByName(const std::string& name) const;
const std::unordered_map<std::string, Curve*>& getBoneCurves() const {return _boneCurves;} const std::unordered_map<std::string, Curve*>& getBoneCurves() const {return _boneCurves;}

View File

@ -54,6 +54,8 @@ enum class EvaluateType
/** /**
* @brief curve of bone's position, rotation or scale * @brief curve of bone's position, rotation or scale
*
* @lua NA
*/ */
template <int componentSize> template <int componentSize>
class AnimationCurve: public Ref class AnimationCurve: public Ref

View File

@ -96,7 +96,11 @@ public:
/** update billboard's transform and turn it towards camera */ /** update billboard's transform and turn it towards camera */
virtual void visit(Renderer *renderer, const Mat4& parentTransform, uint32_t parentFlags) override; virtual void visit(Renderer *renderer, const Mat4& parentTransform, uint32_t parentFlags) override;
/** draw BillBoard object */ /**
* draw BillBoard object.
*
* @lua NA
*/
virtual void draw(Renderer *renderer, const Mat4 &transform, uint32_t flags) override; virtual void draw(Renderer *renderer, const Mat4 &transform, uint32_t flags) override;

View File

@ -45,6 +45,7 @@ class Data;
* c3t text file * c3t text file
* c3b binary file * c3b binary file
* @js NA * @js NA
* @lua NA
*/ */
class CC_DLL Bundle3D class CC_DLL Bundle3D
{ {

View File

@ -37,6 +37,7 @@ NS_CC_BEGIN
/**mesh vertex attribute /**mesh vertex attribute
* @js NA * @js NA
* @lua NA
*/ */
struct MeshVertexAttrib struct MeshVertexAttrib
{ {
@ -53,6 +54,7 @@ struct MeshVertexAttrib
/** model node data, since 3.3 /** model node data, since 3.3
* @js NA * @js NA
* @lua NA
*/ */
struct ModelData struct ModelData
{ {
@ -74,6 +76,7 @@ struct ModelData
/** Node data, since 3.3 /** Node data, since 3.3
* @js NA * @js NA
* @lua NA
*/ */
struct NodeData struct NodeData
{ {
@ -107,6 +110,7 @@ struct NodeData
/** node datas, since 3.3 /** node datas, since 3.3
* @js NA * @js NA
* @lua NA
*/ */
struct NodeDatas struct NodeDatas
{ {
@ -130,6 +134,7 @@ struct NodeDatas
/**mesh data /**mesh data
* @js NA * @js NA
* @lua NA
*/ */
struct MeshData struct MeshData
{ {
@ -185,6 +190,7 @@ public:
/** mesh datas /** mesh datas
* @js NA * @js NA
* @lua NA
*/ */
struct MeshDatas struct MeshDatas
{ {
@ -206,6 +212,7 @@ struct MeshDatas
/**skin data /**skin data
* @js NA * @js NA
* @lua NA
*/ */
struct SkinData struct SkinData
{ {
@ -277,6 +284,7 @@ struct SkinData
/**material data, /**material data,
* @js NA * @js NA
* @lua NA
*/ */
struct MaterialData struct MaterialData
{ {
@ -290,6 +298,7 @@ struct MaterialData
/**new material, since 3.3 /**new material, since 3.3
* @js NA * @js NA
* @lua NA
*/ */
struct NTextureData struct NTextureData
{ {
@ -328,6 +337,7 @@ struct NMaterialData
}; };
/** material datas, since 3.3 /** material datas, since 3.3
* @js NA * @js NA
* @lua NA
*/ */
struct MaterialDatas struct MaterialDatas
{ {
@ -348,6 +358,7 @@ struct MaterialDatas
}; };
/**animation data /**animation data
* @js NA * @js NA
* @lua NA
*/ */
struct Animation3DData struct Animation3DData
{ {
@ -420,6 +431,7 @@ public:
/**reference data /**reference data
* @js NA * @js NA
* @lua NA
*/ */
struct Reference struct Reference
{ {

View File

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

View File

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

View File

@ -59,14 +59,28 @@ public:
/**create mesh with vertex attributes*/ /**create mesh with vertex attributes*/
CC_DEPRECATED_ATTRIBUTE static Mesh* create(const std::vector<float>& vertices, int perVertexSizeInFloat, const IndexArray& indices, int numIndex, const std::vector<MeshVertexAttrib>& attribs, int attribCount){ return create(vertices, perVertexSizeInFloat, indices, attribs); } CC_DEPRECATED_ATTRIBUTE static Mesh* create(const std::vector<float>& vertices, int perVertexSizeInFloat, const IndexArray& indices, int numIndex, const std::vector<MeshVertexAttrib>& attribs, int attribCount){ return create(vertices, perVertexSizeInFloat, indices, attribs); }
/**
* @lua NA
*/
static Mesh* create(const std::vector<float>& vertices, int perVertexSizeInFloat, const IndexArray& indices, const std::vector<MeshVertexAttrib>& attribs); static Mesh* create(const std::vector<float>& vertices, int perVertexSizeInFloat, const IndexArray& indices, const std::vector<MeshVertexAttrib>& attribs);
/** create mesh */ /**
* create mesh
* @lua NA
*/
static Mesh* create(const std::string& name, MeshIndexData* indexData, MeshSkin* skin = nullptr); static Mesh* create(const std::string& name, MeshIndexData* indexData, MeshSkin* skin = nullptr);
/**get vertex buffer*/ /**
* get vertex buffer
*
* @lua NA
*/
GLuint getVertexBuffer() const; GLuint getVertexBuffer() const;
/**has vertex attribute?*/ /**
* has vertex attribute?
*
* @lua NA
*/
bool hasVertexAttrib(int attrib) const; bool hasVertexAttrib(int attrib) const;
/**get mesh vertex attribute count*/ /**get mesh vertex attribute count*/
ssize_t getMeshVertexAttribCount() const; ssize_t getMeshVertexAttribCount() const;
@ -84,13 +98,25 @@ public:
void setVisible(bool visible); void setVisible(bool visible);
bool isVisible() const { return _visible; } bool isVisible() const { return _visible; }
/**skin getter */ /**
* skin getter
*
* @lua NA
*/
MeshSkin* getSkin() const { return _skin; } MeshSkin* getSkin() const { return _skin; }
/**mesh index data getter */ /**
* mesh index data getter
*
* @lua NA
*/
MeshIndexData* getMeshIndexData() const { return _meshIndexData; } MeshIndexData* getMeshIndexData() const { return _meshIndexData; }
/**get GLProgramState*/ /**
* get GLProgramState
*
* @lua NA
*/
GLProgramState* getGLProgramState() const { return _glProgramState; } GLProgramState* getGLProgramState() const { return _glProgramState; }
/**name getter */ /**name getter */
@ -99,13 +125,29 @@ public:
void setBlendFunc(const BlendFunc &blendFunc); void setBlendFunc(const BlendFunc &blendFunc);
const BlendFunc &getBlendFunc() const; const BlendFunc &getBlendFunc() const;
/** get primitive type*/ /**
* get primitive type
*
* @lua NA
*/
GLenum getPrimitiveType() const; GLenum getPrimitiveType() const;
/**get index count*/ /**
* get index count
*
* @lua NA
*/
ssize_t getIndexCount() const; ssize_t getIndexCount() const;
/**get index format*/ /**
* get index format
*
* @lua NA
*/
GLenum getIndexFormat() const; GLenum getIndexFormat() const;
/**get index buffer*/ /**
* get index buffer
*
* @lua NA
*/
GLuint getIndexBuffer() const; GLuint getIndexBuffer() const;
/**get AABB*/ /**get AABB*/

View File

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

View File

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

View File

@ -46,11 +46,15 @@ public:
/* /*
* Construct obb from oriented bounding box * Construct obb from oriented bounding box
*
* @lua NA
*/ */
OBB(const AABB& aabb); OBB(const AABB& aabb);
/* /*
* Construct obb from points * Construct obb from points
*
* @lua NA
*/ */
OBB(const Vec3* verts, int num); OBB(const Vec3* verts, int num);

View File

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

View File

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

View File

@ -46,11 +46,14 @@ class CC_DLL Ray
public: public:
/** /**
* Constructor. * Constructor.
*
* @lua new
*/ */
Ray(); Ray();
/** /**
* Constructor. * Constructor.
* @lua NA
*/ */
Ray(const Ray& ray); Ray(const Ray& ray);
@ -59,11 +62,13 @@ public:
* *
* @param origin The ray's origin. * @param origin The ray's origin.
* @param direction The ray's direction. * @param direction The ray's direction.
* @lua new
*/ */
Ray(const Vec3& origin, const Vec3& direction); Ray(const Vec3& origin, const Vec3& direction);
/** /**
* Destructor. * Destructor.
* @lua NA
*/ */
~Ray(); ~Ray();

View File

@ -39,6 +39,7 @@ NS_CC_BEGIN
/** /**
* @brief Defines a basic hierachial structure of transformation spaces. * @brief Defines a basic hierachial structure of transformation spaces.
* @lua NA
*/ */
class CC_DLL Bone3D : public Ref class CC_DLL Bone3D : public Ref
{ {
@ -189,7 +190,9 @@ protected:
class CC_DLL Skeleton3D: public Ref class CC_DLL Skeleton3D: public Ref
{ {
public: public:
/**
* @lua NA
*/
static Skeleton3D* create(const std::vector<NodeData*>& skeletondata); static Skeleton3D* create(const std::vector<NodeData*>& skeletondata);
/**get total bone count*/ /**get total bone count*/

View File

@ -90,7 +90,11 @@ public:
/**get Mesh by Name, it returns the first one if there are more than one mesh with the same name */ /**get Mesh by Name, it returns the first one if there are more than one mesh with the same name */
Mesh* getMeshByName(const std::string& name) const; Mesh* getMeshByName(const std::string& name) const;
/** get mesh array by name, returns all meshes with the given name */ /**
* get mesh array by name, returns all meshes with the given name
*
* @lua NA
*/
std::vector<Mesh*> getMeshArrayByName(const std::string& name) const; std::vector<Mesh*> getMeshArrayByName(const std::string& name) const;
/**get mesh*/ /**get mesh*/
@ -266,10 +270,18 @@ public:
static Sprite3DCache* getInstance(); static Sprite3DCache* getInstance();
static void destroyInstance(); static void destroyInstance();
/**get the SpriteData struct*/ /**
* get the SpriteData struct
*
* @lua NA
*/
Sprite3DData* getSpriteData(const std::string& key) const; Sprite3DData* getSpriteData(const std::string& key) const;
/**add the SpriteData into Sprite3D by given the specified key*/ /**
* add the SpriteData into Sprite3D by given the specified key
*
* @lua NA
*/
bool addSprite3DData(const std::string& key, Sprite3DData* spritedata); bool addSprite3DData(const std::string& key, Sprite3DData* spritedata);
/**remove the SpriteData from Sprite3D by given the specified key*/ /**remove the SpriteData from Sprite3D by given the specified key*/

View File

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

View File

@ -65,6 +65,11 @@ public:
/* Minimum delay in between sounds */ /* Minimum delay in between sounds */
double minDelay; double minDelay;
/**
* Defautl constructor
*
* @lua new
*/
AudioProfile() AudioProfile()
: maxInstances(0) : maxInstances(0)
, minDelay(0.0) , minDelay(0.0)

View File

@ -73,6 +73,7 @@ public:
* Release the shared Engine object. * Release the shared Engine object.
* *
* @warning It must be called before the application exit, or it will lead to memory leaks. * @warning It must be called before the application exit, or it will lead to memory leaks.
* @lua destroyInstance
*/ */
static void end(); static void end();

View File

@ -87,6 +87,7 @@ public:
* @param callback callback when the task is finished. The callback is called in the main thread instead of task thread. * @param callback callback when the task is finished. The callback is called in the main thread instead of task thread.
* @param callbackParam parameter used by the callback. * @param callbackParam parameter used by the callback.
* @param f task can be lambda function. * @param f task can be lambda function.
* @lua NA
*/ */
template<class F> template<class F>
inline void enqueue(TaskType type, const TaskCallBack& callback, void* callbackParam, F&& f); inline void enqueue(TaskType type, const TaskCallBack& callback, void* callbackParam, F&& f);

View File

@ -89,13 +89,18 @@ public:
/** Get previous contact data */ /** Get previous contact data */
inline const PhysicsContactData* getPreContactData() const { return _preContactData; } inline const PhysicsContactData* getPreContactData() const { return _preContactData; }
/** Get data. */ /**
* Get data.
* @lua NA
*/
inline void* getData() const { return _data; } inline void* getData() const { return _data; }
/** /**
* @brief Set data to contact. * @brief Set data to contact.
* You must manage the memory yourself, Generally you can set data at contact begin, and distory it at contact seperate. * You must manage the memory yourself, Generally you can set data at contact begin, and distory it at contact seperate.
*
* @lua NA
*/ */
inline void setData(void* data) { _data = data; } inline void setData(void* data) { _data = data; }

View File

@ -48,7 +48,9 @@ class EventListenerCustom;
class EventCustom; class EventCustom;
/** /**
Uniform Value, which is used to store to value send to openGL pipe line by glUniformXXX. * Uniform Value, which is used to store to value send to openGL pipe line by glUniformXXX.
*
* @lua NA
*/ */
class CC_DLL UniformValue class CC_DLL UniformValue
{ {
@ -134,7 +136,11 @@ protected:
*/ */
}; };
/**Vertex Attribute Value, which is an abstraction of VertexAttribute and data pointer.*/ /**
* Vertex Attribute Value, which is an abstraction of VertexAttribute and data pointer.
*
* @lua NA
*/
class CC_DLL VertexAttribValue class CC_DLL VertexAttribValue
{ {
friend class GLProgram; friend class GLProgram;

View File

@ -56,6 +56,8 @@ public:
/** /**
* Default destructor. * Default destructor.
*
* @lua NA
*/ */
virtual ~Button(); virtual ~Button();

View File

@ -82,11 +82,15 @@ public:
/** /**
* Default constructor. * Default constructor.
*
* @lua new
*/ */
CheckBox(); CheckBox();
/** /**
* Default destructor. * Default destructor.
*
* @lua NA
*/ */
virtual ~CheckBox(); virtual ~CheckBox();

View File

@ -45,21 +45,18 @@ namespace ui {
/** /**
*@brief Editbox delgate class. *@brief Editbox delgate class.
* It's useful when you want to do some customization duing Editbox input event * It's useful when you want to do some customization duing Editbox input event
*
* @js NA
* @lua NA
*/ */
class CC_GUI_DLL EditBoxDelegate class CC_GUI_DLL EditBoxDelegate
{ {
public: public:
/**
* @js NA
* @lua NA
*/
virtual ~EditBoxDelegate() {}; virtual ~EditBoxDelegate() {};
/** /**
* This method is called when an edit box gains focus after keyboard is shown. * This method is called when an edit box gains focus after keyboard is shown.
* @param editBox The edit box object that generated the event. * @param editBox The edit box object that generated the event.
* @js NA
* @lua NA
*/ */
virtual void editBoxEditingDidBegin(EditBox* editBox) {}; virtual void editBoxEditingDidBegin(EditBox* editBox) {};
@ -67,8 +64,6 @@ namespace ui {
/** /**
* This method is called when an edit box loses focus after keyboard is hidden. * This method is called when an edit box loses focus after keyboard is hidden.
* @param editBox The edit box object that generated the event. * @param editBox The edit box object that generated the event.
* @js NA
* @lua NA
*/ */
virtual void editBoxEditingDidEnd(EditBox* editBox) {}; virtual void editBoxEditingDidEnd(EditBox* editBox) {};
@ -76,16 +71,12 @@ namespace ui {
* This method is called when the edit box text was changed. * This method is called when the edit box text was changed.
* @param editBox The edit box object that generated the event. * @param editBox The edit box object that generated the event.
* @param text The new text. * @param text The new text.
* @js NA
* @lua NA
*/ */
virtual void editBoxTextChanged(EditBox* editBox, const std::string& text) {}; virtual void editBoxTextChanged(EditBox* editBox, const std::string& text) {};
/** /**
* This method is called when the return button was pressed or the outside area of keyboard was touched. * This method is called when the return button was pressed or the outside area of keyboard was touched.
* @param editBox The edit box object that generated the event. * @param editBox The edit box object that generated the event.
* @js NA
* @lua NA
*/ */
virtual void editBoxReturn(EditBox* editBox) = 0; virtual void editBoxReturn(EditBox* editBox) = 0;
@ -217,6 +208,7 @@ namespace ui {
/** /**
* Constructor. * Constructor.
* @js ctor * @js ctor
* @lua new
*/ */
EditBox(void); EditBox(void);

View File

@ -45,11 +45,15 @@ public:
/** /**
* Default constructor * Default constructor
*
* @lua new
*/ */
HBox(); HBox();
/** /**
* Default destructor * Default destructor
*
* @lua NA
*/ */
virtual ~HBox(); virtual ~HBox();

View File

@ -47,11 +47,15 @@ class CC_GUI_DLL ImageView : public Widget
public: public:
/** /**
* Default constructor * Default constructor
*
* @lua new
*/ */
ImageView(); ImageView();
/** /**
* Default destructor * Default destructor
*
* @lua NA
*/ */
virtual ~ImageView(); virtual ~ImageView();

View File

@ -117,11 +117,15 @@ public:
/** /**
* Default constructor * Default constructor
*
* @lua new
*/ */
Layout(); Layout();
/** /**
* Default destructor * Default destructor
*
* @lua NA
*/ */
virtual ~Layout(); virtual ~Layout();
@ -368,7 +372,14 @@ public:
*/ */
void requestDoLayout(); void requestDoLayout();
/**
* @lua NA
*/
virtual void onEnter() override; virtual void onEnter() override;
/**
* @lua NA
*/
virtual void onExit() override; virtual void onExit() override;
/** /**

View File

@ -43,11 +43,15 @@ namespace ui {
public: public:
/** /**
* Default constructor * Default constructor
*
* @lua new
*/ */
LayoutComponent(); LayoutComponent();
/** /**
* Default destructor * Default destructor
*
* @lua NA
*/ */
~LayoutComponent(); ~LayoutComponent();

View File

@ -39,6 +39,7 @@ namespace ui {
/** /**
*@brief Margin of widget's in point. Margin value should be positive. *@brief Margin of widget's in point. Margin value should be positive.
*@lua NA
*/ */
class CC_GUI_DLL Margin class CC_GUI_DLL Margin
{ {
@ -135,6 +136,8 @@ public:
}; };
/** /**
* Default constructor. * Default constructor.
*
* @lua new
*/ */
LayoutParameter() : _margin(Margin()) LayoutParameter() : _margin(Margin())
{ {
@ -143,6 +146,7 @@ public:
/** /**
* Default destructor. * Default destructor.
* @lua NA
*/ */
virtual ~LayoutParameter(){}; virtual ~LayoutParameter(){};
@ -241,6 +245,8 @@ public:
/** /**
* Default constructor. * Default constructor.
*
* @lua new
*/ */
LinearLayoutParameter() LinearLayoutParameter()
: _linearGravity(LinearGravity::NONE) : _linearGravity(LinearGravity::NONE)
@ -250,6 +256,8 @@ public:
/** /**
* Default destructor. * Default destructor.
*
* @lua NA
*/ */
virtual ~LinearLayoutParameter(){}; virtual ~LinearLayoutParameter(){};
@ -326,6 +334,8 @@ public:
/** /**
* Default constructor * Default constructor
*
* @lua new
*/ */
RelativeLayoutParameter() RelativeLayoutParameter()
: _relativeAlign(RelativeAlign::NONE), : _relativeAlign(RelativeAlign::NONE),
@ -338,6 +348,8 @@ public:
/** /**
* Default destructor * Default destructor
*
* @lua NA
*/ */
virtual ~RelativeLayoutParameter(){}; virtual ~RelativeLayoutParameter(){};

View File

@ -94,12 +94,14 @@ public:
/** /**
* Default constructor * Default constructor
* @js ctor * @js ctor
* @lua new
*/ */
ListView(); ListView();
/** /**
* Default destructor * Default destructor
* @js NA * @js NA
* @lua NA
*/ */
virtual ~ListView(); virtual ~ListView();

View File

@ -60,12 +60,14 @@ public:
/** /**
* Default constructor. * Default constructor.
* @js ctor * @js ctor
* @lua new
*/ */
LoadingBar(); LoadingBar();
/** /**
* Default destructor. * Default destructor.
* @js NA * @js NA
* @lua NA
*/ */
virtual ~LoadingBar(); virtual ~LoadingBar();

View File

@ -87,12 +87,14 @@ public:
/** /**
* Default constructor * Default constructor
* @js ctor * @js ctor
* @lua new
*/ */
PageView(); PageView();
/** /**
* Default destructor * Default destructor
* @js NA * @js NA
* @lua NA
*/ */
virtual ~PageView(); virtual ~PageView();
@ -200,6 +202,9 @@ public:
virtual void setLayoutType(Type type) override{}; virtual void setLayoutType(Type type) override{};
virtual Type getLayoutType() const override{return Type::ABSOLUTE;}; virtual Type getLayoutType() const override{return Type::ABSOLUTE;};
virtual std::string getDescription() const override; virtual std::string getDescription() const override;
/**
* @lua NA
*/
virtual void onEnter() override; virtual void onEnter() override;
/** /**

View File

@ -48,12 +48,14 @@ public:
/** /**
* Default constructor. * Default constructor.
* @js ctor * @js ctor
* @lua new
*/ */
RelativeBox(); RelativeBox();
/** /**
* Default destructor. * Default destructor.
* @js NA * @js NA
* @lua NA
*/ */
virtual ~RelativeBox(); virtual ~RelativeBox();

View File

@ -56,12 +56,14 @@ public:
/** /**
* @brief Default constructor. * @brief Default constructor.
* @js ctor * @js ctor
* @lua new
*/ */
RichElement(){}; RichElement(){};
/** /**
* @brief Default destructor. * @brief Default destructor.
* @js NA * @js NA
* @lua NA
*/ */
virtual ~RichElement(){}; virtual ~RichElement(){};
@ -93,6 +95,7 @@ public:
/** /**
*@brief Default constructor. *@brief Default constructor.
* @js ctor * @js ctor
* @lua new
*/ */
RichElementText(){_type = Type::TEXT;}; RichElementText(){_type = Type::TEXT;};
@ -100,6 +103,7 @@ public:
/** /**
*@brief Default destructor. *@brief Default destructor.
* @js NA * @js NA
* @lua NA
*/ */
virtual ~RichElementText(){}; virtual ~RichElementText(){};
@ -147,6 +151,7 @@ public:
/** /**
* @brief Default constructor. * @brief Default constructor.
* @js ctor * @js ctor
* @lua new
* *
*/ */
RichElementImage(){_type = Type::IMAGE;}; RichElementImage(){_type = Type::IMAGE;};
@ -155,6 +160,7 @@ public:
/** /**
* @brief Default destructor. * @brief Default destructor.
* @js NA * @js NA
* @lua NA
*/ */
virtual ~RichElementImage(){}; virtual ~RichElementImage(){};
@ -198,6 +204,7 @@ public:
/** /**
* @brief Default constructor. * @brief Default constructor.
* @js ctor * @js ctor
* @lua new
*/ */
RichElementCustomNode(){_type = Type::CUSTOM;}; RichElementCustomNode(){_type = Type::CUSTOM;};
@ -205,6 +212,7 @@ public:
/** /**
* @brief Default destructor. * @brief Default destructor.
* @js NA * @js NA
* @lua NA
*/ */
virtual ~RichElementCustomNode(){CC_SAFE_RELEASE(_customNode);}; virtual ~RichElementCustomNode(){CC_SAFE_RELEASE(_customNode);};
@ -246,12 +254,14 @@ public:
/** /**
* @brief Default constructor. * @brief Default constructor.
* @js ctor * @js ctor
* @lua new
*/ */
RichText(); RichText();
/** /**
* @brief Default destructor. * @brief Default destructor.
* @js NA * @js NA
* @lua NA
*/ */
virtual ~RichText(); virtual ~RichText();

View File

@ -56,6 +56,7 @@ namespace ui {
/** /**
* Default constructor. * Default constructor.
* @js ctor * @js ctor
* @lua new
*/ */
Scale9Sprite(); Scale9Sprite();
@ -577,6 +578,10 @@ namespace ui {
virtual void visit(Renderer *renderer, const Mat4 &parentTransform, uint32_t parentFlags) override; virtual void visit(Renderer *renderer, const Mat4 &parentTransform, uint32_t parentFlags) override;
virtual void cleanup() override; virtual void cleanup() override;
/**
* @lua NA
*/
virtual void onEnter() override; virtual void onEnter() override;
/** Event callback that is invoked when the Node enters in the 'stage'. /** Event callback that is invoked when the Node enters in the 'stage'.

View File

@ -107,12 +107,14 @@ public:
/** /**
* Default constructor * Default constructor
* @js ctor * @js ctor
* @lua new
*/ */
ScrollView(); ScrollView();
/** /**
* Default destructor * Default destructor
* @js NA * @js NA
* @lua NA
*/ */
virtual ~ScrollView(); virtual ~ScrollView();
@ -387,6 +389,10 @@ public:
* Return the "class name" of widget. * Return the "class name" of widget.
*/ */
virtual std::string getDescription() const override; virtual std::string getDescription() const override;
/**
* @lua NA
*/
virtual void onEnter() override; virtual void onEnter() override;
/** /**

View File

@ -67,12 +67,14 @@ public:
/** /**
* Default constructor. * Default constructor.
* @js ctor * @js ctor
* @lua new
*/ */
Slider(); Slider();
/** /**
* Default destructor. * Default destructor.
* @js NA * @js NA
* @lua NA
*/ */
virtual ~Slider(); virtual ~Slider();

View File

@ -57,11 +57,15 @@ public:
}; };
/** /**
* Default constructor. * Default constructor.
*
* @lua new
*/ */
Text(); Text();
/** /**
* Default destructor. * Default destructor.
*
* @lua NA
*/ */
virtual ~Text(); virtual ~Text();

View File

@ -50,11 +50,15 @@ class CC_GUI_DLL TextAtlas : public Widget
public: public:
/** /**
* Default constructor. * Default constructor.
*
* @lua new
*/ */
TextAtlas(); TextAtlas();
/** /**
* Default destructor. * Default destructor.
*
* @lua NA
*/ */
virtual ~TextAtlas(); virtual ~TextAtlas();

View File

@ -49,11 +49,15 @@ class CC_GUI_DLL TextBMFont : public Widget
public: public:
/** /**
* Default constructor * Default constructor
*
* @lua new
*/ */
TextBMFont(); TextBMFont();
/** /**
* Default destructor * Default destructor
*
* @lua NA
*/ */
virtual ~TextBMFont(); virtual ~TextBMFont();

View File

@ -40,6 +40,8 @@ namespace ui {
/** /**
* @brief A helper class which inherit from @see `TextFieldTTF` and implements the @see `TextFieldDelegate` protocol. * @brief A helper class which inherit from @see `TextFieldTTF` and implements the @see `TextFieldDelegate` protocol.
* It is mainly be used internally by @see `UITextField` class. * It is mainly be used internally by @see `UITextField` class.
*
* @lua NA
*/ */
class CC_GUI_DLL UICCTextField: public TextFieldTTF, public TextFieldDelegate class CC_GUI_DLL UICCTextField: public TextFieldTTF, public TextFieldDelegate
{ {

View File

@ -45,11 +45,15 @@ public:
/** /**
* Default constructor * Default constructor
*
* @lua new
*/ */
VBox(); VBox();
/** /**
* Default destructor * Default destructor
*
* @lua NA
*/ */
virtual ~VBox(); virtual ~VBox();

View File

@ -154,11 +154,15 @@ public:
typedef std::function<void(Ref*, int)> ccWidgetEventCallback; typedef std::function<void(Ref*, int)> ccWidgetEventCallback;
/** /**
* Default constructor * Default constructor
*
* @lua new
*/ */
Widget(void); Widget(void);
/** /**
* Default destructor * Default destructor
*
* @lua NA
*/ */
virtual ~Widget(); virtual ~Widget();
/** /**
@ -312,6 +316,7 @@ public:
/** /**
* Set a event handler to the widget in order to use cocostudio editor and framework * Set a event handler to the widget in order to use cocostudio editor and framework
* @param callback The callback in `ccWidgetEventCallback`. * @param callback The callback in `ccWidgetEventCallback`.
* @lua NA
*/ */
virtual void addCCSEventListener(const ccWidgetEventCallback& callback); virtual void addCCSEventListener(const ccWidgetEventCallback& callback);
/**/ /**/
@ -646,8 +651,14 @@ public:
* @return A cloned widget copy of original. * @return A cloned widget copy of original.
*/ */
Widget* clone(); Widget* clone();
/**
* @lua NA
*/
virtual void onEnter() override; virtual void onEnter() override;
/**
* @lua NA
*/
virtual void onExit() override; virtual void onExit() override;
/** /**

View File

@ -54,6 +54,7 @@ public:
static ControlColourPicker* create(); static ControlColourPicker* create();
/** /**
* @js ctor * @js ctor
* @lua new
*/ */
ControlColourPicker(); ControlColourPicker();
/** /**

View File

@ -50,6 +50,7 @@ public:
static ControlPotentiometer* create(const char* backgroundFile, const char* progressFile, const char* thumbFile); static ControlPotentiometer* create(const char* backgroundFile, const char* progressFile, const char* thumbFile);
/** /**
* @js ctor * @js ctor
* @lua new
*/ */
ControlPotentiometer(); ControlPotentiometer();
/** /**

View File

@ -77,6 +77,7 @@ public:
Sprite* selectedThumbSprite); Sprite* selectedThumbSprite);
/** /**
* @js ctor * @js ctor
* @lua new
*/ */
ControlSlider(); ControlSlider();
/** /**

View File

@ -54,6 +54,7 @@ public:
static ControlStepper* create(Sprite *minusSprite, Sprite *plusSprite); static ControlStepper* create(Sprite *minusSprite, Sprite *plusSprite);
/** /**
* @js ctor * @js ctor
* @lua new
*/ */
ControlStepper(); ControlStepper();
/** /**

View File

@ -55,6 +55,7 @@ public:
static ControlSwitch* create(Sprite *maskSprite, Sprite * onSprite, Sprite * offSprite, Sprite * thumbSprite); static ControlSwitch* create(Sprite *maskSprite, Sprite * onSprite, Sprite * offSprite, Sprite * thumbSprite);
/** /**
* @js ctor * @js ctor
* @lua new
*/ */
ControlSwitch(); ControlSwitch();
/** /**

View File

@ -93,6 +93,7 @@ public:
static ScrollView* create(); static ScrollView* create();
/** /**
* @js ctor * @js ctor
* @lua new
*/ */
ScrollView(); ScrollView();
/** /**

View File

@ -188,6 +188,7 @@ public:
static TableView* create(TableViewDataSource* dataSource, Size size, Node *container); static TableView* create(TableViewDataSource* dataSource, Size size, Node *container);
/** /**
* @js ctor * @js ctor
* @lua new
*/ */
TableView(); TableView();
/** /**

View File

@ -74,6 +74,7 @@ public:
* @param versionFileUrl URL of version file. It should contain version code of new package. * @param versionFileUrl URL of version file. It should contain version code of new package.
* @param storagePath The path to store downloaded resources. * @param storagePath The path to store downloaded resources.
* @js NA * @js NA
* @lua new
*/ */
AssetsManager(const char* packageUrl = NULL, const char* versionFileUrl = NULL, const char* storagePath = NULL); AssetsManager(const char* packageUrl = NULL, const char* versionFileUrl = NULL, const char* storagePath = NULL);
/** /**

View File

@ -163,7 +163,9 @@ protected:
*/ */
const std::string& getGroupVersion(const std::string &group) const; const std::string& getGroupVersion(const std::string &group) const;
/** @brief Gets assets. /**
* @brief Gets assets.
* @lua NA
*/ */
const std::unordered_map<std::string, Asset>& getAssets() const; const std::unordered_map<std::string, Asset>& getAssets() const;

View File

@ -32,13 +32,13 @@ struct cpSpace;
NS_CC_EXT_BEGIN NS_CC_EXT_BEGIN
/** /**
A BaseData that draws the components of a physics engine. * A BaseData that draws the components of a physics engine.
Supported physics engines: * Supported physics engines:
- Chipmunk * - Chipmunk
- Objective-Chipmunk * - Objective-Chipmunk
* @since v2.1
@since v2.1 * @lua NA
*/ */
class CC_EX_DLL PhysicsDebugNode : public DrawNode class CC_EX_DLL PhysicsDebugNode : public DrawNode
@ -53,7 +53,6 @@ public:
PhysicsDebugNode(); PhysicsDebugNode();
/** /**
* @js NA * @js NA
* @lua NA
*/ */
virtual ~PhysicsDebugNode(); virtual ~PhysicsDebugNode();

View File

@ -45,6 +45,7 @@ NS_CC_EXT_BEGIN
- Position and rotation are going to updated from the physics body - Position and rotation are going to updated from the physics body
- If you update the rotation or position manually, the physics body will be updated - If you update the rotation or position manually, the physics body will be updated
- You can't enble both Chipmunk support and Box2d support at the same time. Only one can be enabled at compile time - You can't enble both Chipmunk support and Box2d support at the same time. Only one can be enabled at compile time
* @lua NA
*/ */
class CC_EX_DLL PhysicsSprite : public Sprite class CC_EX_DLL PhysicsSprite : public Sprite
{ {