diff --git a/cocos/2d/CCActionCamera.h b/cocos/2d/CCActionCamera.h index 18ca96af41..4ab7c1eac7 100644 --- a/cocos/2d/CCActionCamera.h +++ b/cocos/2d/CCActionCamera.h @@ -49,6 +49,7 @@ class CC_DLL ActionCamera : public ActionInterval // public: /** * @js ctor + * @lua new */ ActionCamera(); /** diff --git a/cocos/3d/CCAABB.h b/cocos/3d/CCAABB.h index 27814eadfd..4712f85145 100644 --- a/cocos/3d/CCAABB.h +++ b/cocos/3d/CCAABB.h @@ -44,11 +44,13 @@ class CC_DLL AABB public: /** * Constructor. + * @lua new */ AABB(); /** * Constructor. + * @lua new */ AABB(const Vec3& min, const Vec3& max); diff --git a/cocos/3d/CCAnimation3D.h b/cocos/3d/CCAnimation3D.h index 09588c6c33..8a5b4b0853 100644 --- a/cocos/3d/CCAnimation3D.h +++ b/cocos/3d/CCAnimation3D.h @@ -70,7 +70,11 @@ public: /**get duration*/ float getDuration() const { return _duration; } - /**get bone curve*/ + /** + * get bone curve + * + * @lua NA + */ Curve* getBoneCurveByName(const std::string& name) const; const std::unordered_map& getBoneCurves() const {return _boneCurves;} diff --git a/cocos/3d/CCAnimationCurve.h b/cocos/3d/CCAnimationCurve.h index 9708d0349b..131900f20b 100644 --- a/cocos/3d/CCAnimationCurve.h +++ b/cocos/3d/CCAnimationCurve.h @@ -54,6 +54,8 @@ enum class EvaluateType /** * @brief curve of bone's position, rotation or scale + * + * @lua NA */ template class AnimationCurve: public Ref diff --git a/cocos/3d/CCBillBoard.h b/cocos/3d/CCBillBoard.h index f1bc07d8c6..57964b3bff 100644 --- a/cocos/3d/CCBillBoard.h +++ b/cocos/3d/CCBillBoard.h @@ -96,7 +96,11 @@ public: /** update billboard's transform and turn it towards camera */ 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; diff --git a/cocos/3d/CCBundle3D.h b/cocos/3d/CCBundle3D.h index 6dd3cd1331..be67fc208e 100644 --- a/cocos/3d/CCBundle3D.h +++ b/cocos/3d/CCBundle3D.h @@ -45,6 +45,7 @@ class Data; * c3t text file * c3b binary file * @js NA + * @lua NA */ class CC_DLL Bundle3D { diff --git a/cocos/3d/CCBundle3DData.h b/cocos/3d/CCBundle3DData.h index 307161d564..d19568ebd8 100644 --- a/cocos/3d/CCBundle3DData.h +++ b/cocos/3d/CCBundle3DData.h @@ -37,6 +37,7 @@ NS_CC_BEGIN /**mesh vertex attribute * @js NA +* @lua NA */ struct MeshVertexAttrib { @@ -53,6 +54,7 @@ struct MeshVertexAttrib /** model node data, since 3.3 * @js NA +* @lua NA */ struct ModelData { @@ -74,6 +76,7 @@ struct ModelData /** Node data, since 3.3 * @js NA +* @lua NA */ struct NodeData { @@ -107,6 +110,7 @@ struct NodeData /** node datas, since 3.3 * @js NA +* @lua NA */ struct NodeDatas { @@ -130,6 +134,7 @@ struct NodeDatas /**mesh data * @js NA +* @lua NA */ struct MeshData { @@ -185,6 +190,7 @@ public: /** mesh datas * @js NA +* @lua NA */ struct MeshDatas { @@ -206,6 +212,7 @@ struct MeshDatas /**skin data * @js NA +* @lua NA */ struct SkinData { @@ -277,6 +284,7 @@ struct SkinData /**material data, * @js NA +* @lua NA */ struct MaterialData { @@ -290,6 +298,7 @@ struct MaterialData /**new material, since 3.3 * @js NA +* @lua NA */ struct NTextureData { @@ -328,6 +337,7 @@ struct NMaterialData }; /** material datas, since 3.3 * @js NA +* @lua NA */ struct MaterialDatas { @@ -348,6 +358,7 @@ struct MaterialDatas }; /**animation data * @js NA +* @lua NA */ struct Animation3DData { @@ -420,6 +431,7 @@ public: /**reference data * @js NA +* @lua NA */ struct Reference { diff --git a/cocos/3d/CCBundleReader.h b/cocos/3d/CCBundleReader.h index dc81ffb844..62a45e0592 100644 --- a/cocos/3d/CCBundleReader.h +++ b/cocos/3d/CCBundleReader.h @@ -42,6 +42,7 @@ NS_CC_BEGIN /** * @brief BundleReader is an interface for reading sequence of bytes. * @js NA + * @lua NA */ class BundleReader: public cocos2d::Ref { diff --git a/cocos/3d/CCFrustum.h b/cocos/3d/CCFrustum.h index 2ea5eda944..0fb2d30d63 100755 --- a/cocos/3d/CCFrustum.h +++ b/cocos/3d/CCFrustum.h @@ -39,6 +39,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 + * @lua NA */ class CC_DLL Frustum { diff --git a/cocos/3d/CCMesh.h b/cocos/3d/CCMesh.h index c5ef7cf347..03175f5910 100644 --- a/cocos/3d/CCMesh.h +++ b/cocos/3d/CCMesh.h @@ -59,14 +59,28 @@ public: /**create mesh with vertex attributes*/ CC_DEPRECATED_ATTRIBUTE static Mesh* create(const std::vector& vertices, int perVertexSizeInFloat, const IndexArray& indices, int numIndex, const std::vector& attribs, int attribCount){ return create(vertices, perVertexSizeInFloat, indices, attribs); } + /** + * @lua NA + */ static Mesh* create(const std::vector& vertices, int perVertexSizeInFloat, const IndexArray& indices, const std::vector& attribs); - /** create mesh */ + /** + * create mesh + * @lua NA + */ static Mesh* create(const std::string& name, MeshIndexData* indexData, MeshSkin* skin = nullptr); - /**get vertex buffer*/ + /** + * get vertex buffer + * + * @lua NA + */ GLuint getVertexBuffer() const; - /**has vertex attribute?*/ + /** + * has vertex attribute? + * + * @lua NA + */ bool hasVertexAttrib(int attrib) const; /**get mesh vertex attribute count*/ ssize_t getMeshVertexAttribCount() const; @@ -84,13 +98,25 @@ public: void setVisible(bool visible); bool isVisible() const { return _visible; } - /**skin getter */ + /** + * skin getter + * + * @lua NA + */ MeshSkin* getSkin() const { return _skin; } - /**mesh index data getter */ + /** + * mesh index data getter + * + * @lua NA + */ MeshIndexData* getMeshIndexData() const { return _meshIndexData; } - /**get GLProgramState*/ + /** + * get GLProgramState + * + * @lua NA + */ GLProgramState* getGLProgramState() const { return _glProgramState; } /**name getter */ @@ -99,13 +125,29 @@ public: void setBlendFunc(const BlendFunc &blendFunc); const BlendFunc &getBlendFunc() const; - /** get primitive type*/ + /** + * get primitive type + * + * @lua NA + */ GLenum getPrimitiveType() const; - /**get index count*/ + /** + * get index count + * + * @lua NA + */ ssize_t getIndexCount() const; - /**get index format*/ + /** + * get index format + * + * @lua NA + */ GLenum getIndexFormat() const; - /**get index buffer*/ + /** + * get index buffer + * + * @lua NA + */ GLuint getIndexBuffer() const; /**get AABB*/ diff --git a/cocos/3d/CCMeshSkin.h b/cocos/3d/CCMeshSkin.h index 5209c6a0ad..66960aa4e1 100644 --- a/cocos/3d/CCMeshSkin.h +++ b/cocos/3d/CCMeshSkin.h @@ -45,6 +45,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 + * @lua NA */ class CC_DLL MeshSkin: public Ref { diff --git a/cocos/3d/CCMeshVertexIndexData.h b/cocos/3d/CCMeshVertexIndexData.h index aa406ab074..07a8c8fb27 100644 --- a/cocos/3d/CCMeshVertexIndexData.h +++ b/cocos/3d/CCMeshVertexIndexData.h @@ -52,6 +52,7 @@ class MeshVertexData; * the MeshIndexData class. * @brief the MeshIndexData contain all of the indices data which mesh need. * @js NA + * @lua NA */ class MeshIndexData : public Ref { diff --git a/cocos/3d/CCOBB.h b/cocos/3d/CCOBB.h index b45df08447..23466c40ad 100644 --- a/cocos/3d/CCOBB.h +++ b/cocos/3d/CCOBB.h @@ -46,11 +46,15 @@ public: /* * Construct obb from oriented bounding box + * + * @lua NA */ OBB(const AABB& aabb); /* * Construct obb from points + * + * @lua NA */ OBB(const Vec3* verts, int num); diff --git a/cocos/3d/CCObjLoader.h b/cocos/3d/CCObjLoader.h index d856c791c6..f21130edaa 100644 --- a/cocos/3d/CCObjLoader.h +++ b/cocos/3d/CCObjLoader.h @@ -24,6 +24,7 @@ NS_CC_BEGIN /** * @brief .obj file Loader * @js NA + * @lua NA **/ class ObjLoader { diff --git a/cocos/3d/CCPlane.h b/cocos/3d/CCPlane.h index 2c66cb845f..cc1baf822c 100755 --- a/cocos/3d/CCPlane.h +++ b/cocos/3d/CCPlane.h @@ -40,6 +40,7 @@ enum class PointSide /** * Defines plane * @js NA + * @lua NA **/ class CC_DLL Plane { diff --git a/cocos/3d/CCRay.h b/cocos/3d/CCRay.h index 3bd18c7f61..826719c6b8 100644 --- a/cocos/3d/CCRay.h +++ b/cocos/3d/CCRay.h @@ -46,11 +46,14 @@ class CC_DLL Ray public: /** * Constructor. + * + * @lua new */ Ray(); /** * Constructor. + * @lua NA */ Ray(const Ray& ray); @@ -59,11 +62,13 @@ public: * * @param origin The ray's origin. * @param direction The ray's direction. + * @lua new */ Ray(const Vec3& origin, const Vec3& direction); /** * Destructor. + * @lua NA */ ~Ray(); diff --git a/cocos/3d/CCSkeleton3D.h b/cocos/3d/CCSkeleton3D.h index 303917d009..50077d06a8 100644 --- a/cocos/3d/CCSkeleton3D.h +++ b/cocos/3d/CCSkeleton3D.h @@ -39,6 +39,7 @@ NS_CC_BEGIN /** * @brief Defines a basic hierachial structure of transformation spaces. + * @lua NA */ class CC_DLL Bone3D : public Ref { @@ -189,7 +190,9 @@ protected: class CC_DLL Skeleton3D: public Ref { public: - + /** + * @lua NA + */ static Skeleton3D* create(const std::vector& skeletondata); /**get total bone count*/ diff --git a/cocos/3d/CCSprite3D.h b/cocos/3d/CCSprite3D.h index 26c4496417..f143eb5fbe 100644 --- a/cocos/3d/CCSprite3D.h +++ b/cocos/3d/CCSprite3D.h @@ -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 */ 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 getMeshArrayByName(const std::string& name) const; /**get mesh*/ @@ -266,10 +270,18 @@ public: static Sprite3DCache* getInstance(); static void destroyInstance(); - /**get the SpriteData struct*/ + /** + * get the SpriteData struct + * + * @lua NA + */ 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); /**remove the SpriteData from Sprite3D by given the specified key*/ diff --git a/cocos/3d/CCSprite3DMaterial.h b/cocos/3d/CCSprite3DMaterial.h index 0201ad4509..25ac77accd 100644 --- a/cocos/3d/CCSprite3DMaterial.h +++ b/cocos/3d/CCSprite3DMaterial.h @@ -41,6 +41,7 @@ class Texture2D; /** * @brief the sprite3D material is only texture for now * @js NA + * @lua NA */ class Sprite3DMaterialCache { diff --git a/cocos/audio/include/AudioEngine.h b/cocos/audio/include/AudioEngine.h index 078075c91b..7cad808f6f 100644 --- a/cocos/audio/include/AudioEngine.h +++ b/cocos/audio/include/AudioEngine.h @@ -64,7 +64,12 @@ public: /* Minimum delay in between sounds */ double minDelay; - + + /** + * Defautl constructor + * + * @lua new + */ AudioProfile() : maxInstances(0) , minDelay(0.0) diff --git a/cocos/audio/include/SimpleAudioEngine.h b/cocos/audio/include/SimpleAudioEngine.h index ac4c9bc450..9508ba1c4e 100644 --- a/cocos/audio/include/SimpleAudioEngine.h +++ b/cocos/audio/include/SimpleAudioEngine.h @@ -73,6 +73,7 @@ public: * Release the shared Engine object. * * @warning It must be called before the application exit, or it will lead to memory leaks. + * @lua destroyInstance */ static void end(); diff --git a/cocos/base/CCAsyncTaskPool.h b/cocos/base/CCAsyncTaskPool.h index 71baf09521..3b700af671 100644 --- a/cocos/base/CCAsyncTaskPool.h +++ b/cocos/base/CCAsyncTaskPool.h @@ -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 callbackParam parameter used by the callback. * @param f task can be lambda function. + * @lua NA */ template inline void enqueue(TaskType type, const TaskCallBack& callback, void* callbackParam, F&& f); diff --git a/cocos/physics/CCPhysicsContact.h b/cocos/physics/CCPhysicsContact.h index d67c9bac52..cee52dfc75 100644 --- a/cocos/physics/CCPhysicsContact.h +++ b/cocos/physics/CCPhysicsContact.h @@ -89,13 +89,18 @@ public: /** Get previous contact data */ inline const PhysicsContactData* getPreContactData() const { return _preContactData; } - /** Get data. */ + /** + * Get data. + * @lua NA + */ inline void* getData() const { return _data; } /** * @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. + * + * @lua NA */ inline void setData(void* data) { _data = data; } diff --git a/cocos/renderer/CCGLProgramState.h b/cocos/renderer/CCGLProgramState.h index 5e7fb45998..42b0a32b79 100644 --- a/cocos/renderer/CCGLProgramState.h +++ b/cocos/renderer/CCGLProgramState.h @@ -48,7 +48,9 @@ class EventListenerCustom; 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 { @@ -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 { friend class GLProgram; diff --git a/cocos/ui/UIButton.h b/cocos/ui/UIButton.h index eecb09f348..17e2e87ebb 100644 --- a/cocos/ui/UIButton.h +++ b/cocos/ui/UIButton.h @@ -56,6 +56,8 @@ public: /** * Default destructor. + * + * @lua NA */ virtual ~Button(); diff --git a/cocos/ui/UICheckBox.h b/cocos/ui/UICheckBox.h index 427d7587f6..31c080c796 100644 --- a/cocos/ui/UICheckBox.h +++ b/cocos/ui/UICheckBox.h @@ -82,11 +82,15 @@ public: /** * Default constructor. + * + * @lua new */ CheckBox(); /** * Default destructor. + * + * @lua NA */ virtual ~CheckBox(); diff --git a/cocos/ui/UIEditBox/UIEditBox.h b/cocos/ui/UIEditBox/UIEditBox.h index 20dfbb908c..580bec1ad7 100644 --- a/cocos/ui/UIEditBox/UIEditBox.h +++ b/cocos/ui/UIEditBox/UIEditBox.h @@ -45,21 +45,18 @@ namespace ui { /** *@brief Editbox delgate class. * It's useful when you want to do some customization duing Editbox input event + * + * @js NA + * @lua NA */ class CC_GUI_DLL EditBoxDelegate { public: - /** - * @js NA - * @lua NA - */ virtual ~EditBoxDelegate() {}; /** * This method is called when an edit box gains focus after keyboard is shown. * @param editBox The edit box object that generated the event. - * @js NA - * @lua NA */ 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. * @param editBox The edit box object that generated the event. - * @js NA - * @lua NA */ virtual void editBoxEditingDidEnd(EditBox* editBox) {}; @@ -76,16 +71,12 @@ namespace ui { * This method is called when the edit box text was changed. * @param editBox The edit box object that generated the event. * @param text The new text. - * @js NA - * @lua NA */ 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. * @param editBox The edit box object that generated the event. - * @js NA - * @lua NA */ virtual void editBoxReturn(EditBox* editBox) = 0; @@ -217,6 +208,7 @@ namespace ui { /** * Constructor. * @js ctor + * @lua new */ EditBox(void); diff --git a/cocos/ui/UIHBox.h b/cocos/ui/UIHBox.h index a2bdf0da9f..e927f384e8 100644 --- a/cocos/ui/UIHBox.h +++ b/cocos/ui/UIHBox.h @@ -45,11 +45,15 @@ public: /** * Default constructor + * + * @lua new */ HBox(); /** * Default destructor + * + * @lua NA */ virtual ~HBox(); diff --git a/cocos/ui/UIImageView.h b/cocos/ui/UIImageView.h index 18ea52480d..03128db71f 100644 --- a/cocos/ui/UIImageView.h +++ b/cocos/ui/UIImageView.h @@ -47,11 +47,15 @@ class CC_GUI_DLL ImageView : public Widget public: /** * Default constructor + * + * @lua new */ ImageView(); /** * Default destructor + * + * @lua NA */ virtual ~ImageView(); diff --git a/cocos/ui/UILayout.h b/cocos/ui/UILayout.h index d2c1c8396b..bfa5972de9 100644 --- a/cocos/ui/UILayout.h +++ b/cocos/ui/UILayout.h @@ -117,11 +117,15 @@ public: /** * Default constructor + * + * @lua new */ Layout(); /** * Default destructor + * + * @lua NA */ virtual ~Layout(); @@ -368,7 +372,14 @@ public: */ void requestDoLayout(); + /** + * @lua NA + */ virtual void onEnter() override; + + /** + * @lua NA + */ virtual void onExit() override; /** diff --git a/cocos/ui/UILayoutComponent.h b/cocos/ui/UILayoutComponent.h index 195dca0b03..051cb2221f 100644 --- a/cocos/ui/UILayoutComponent.h +++ b/cocos/ui/UILayoutComponent.h @@ -43,11 +43,15 @@ namespace ui { public: /** * Default constructor + * + * @lua new */ LayoutComponent(); /** * Default destructor + * + * @lua NA */ ~LayoutComponent(); diff --git a/cocos/ui/UILayoutParameter.h b/cocos/ui/UILayoutParameter.h index bec11ca3e1..b9262ba23f 100644 --- a/cocos/ui/UILayoutParameter.h +++ b/cocos/ui/UILayoutParameter.h @@ -39,6 +39,7 @@ namespace ui { /** *@brief Margin of widget's in point. Margin value should be positive. + *@lua NA */ class CC_GUI_DLL Margin { @@ -135,6 +136,8 @@ public: }; /** * Default constructor. + * + * @lua new */ LayoutParameter() : _margin(Margin()) { @@ -143,6 +146,7 @@ public: /** * Default destructor. + * @lua NA */ virtual ~LayoutParameter(){}; @@ -241,6 +245,8 @@ public: /** * Default constructor. + * + * @lua new */ LinearLayoutParameter() : _linearGravity(LinearGravity::NONE) @@ -250,6 +256,8 @@ public: /** * Default destructor. + * + * @lua NA */ virtual ~LinearLayoutParameter(){}; @@ -326,6 +334,8 @@ public: /** * Default constructor + * + * @lua new */ RelativeLayoutParameter() : _relativeAlign(RelativeAlign::NONE), @@ -338,6 +348,8 @@ public: /** * Default destructor + * + * @lua NA */ virtual ~RelativeLayoutParameter(){}; diff --git a/cocos/ui/UIListView.h b/cocos/ui/UIListView.h index eb94bca674..379cb1b9bd 100644 --- a/cocos/ui/UIListView.h +++ b/cocos/ui/UIListView.h @@ -94,12 +94,14 @@ public: /** * Default constructor * @js ctor + * @lua new */ ListView(); /** * Default destructor * @js NA + * @lua NA */ virtual ~ListView(); diff --git a/cocos/ui/UILoadingBar.h b/cocos/ui/UILoadingBar.h index 29238d29ce..4117b4d8a4 100644 --- a/cocos/ui/UILoadingBar.h +++ b/cocos/ui/UILoadingBar.h @@ -60,12 +60,14 @@ public: /** * Default constructor. * @js ctor + * @lua new */ LoadingBar(); /** * Default destructor. * @js NA + * @lua NA */ virtual ~LoadingBar(); diff --git a/cocos/ui/UIPageView.h b/cocos/ui/UIPageView.h index e6fbb01ed8..8a1278b1bd 100644 --- a/cocos/ui/UIPageView.h +++ b/cocos/ui/UIPageView.h @@ -87,12 +87,14 @@ public: /** * Default constructor * @js ctor + * @lua new */ PageView(); /** * Default destructor * @js NA + * @lua NA */ virtual ~PageView(); @@ -200,6 +202,9 @@ public: virtual void setLayoutType(Type type) override{}; virtual Type getLayoutType() const override{return Type::ABSOLUTE;}; virtual std::string getDescription() const override; + /** + * @lua NA + */ virtual void onEnter() override; /** diff --git a/cocos/ui/UIRelativeBox.h b/cocos/ui/UIRelativeBox.h index af9b528a51..4f8b5b617f 100644 --- a/cocos/ui/UIRelativeBox.h +++ b/cocos/ui/UIRelativeBox.h @@ -48,12 +48,14 @@ public: /** * Default constructor. * @js ctor + * @lua new */ RelativeBox(); /** * Default destructor. * @js NA + * @lua NA */ virtual ~RelativeBox(); diff --git a/cocos/ui/UIRichText.h b/cocos/ui/UIRichText.h index 55a132a6f4..591ef8d7f9 100644 --- a/cocos/ui/UIRichText.h +++ b/cocos/ui/UIRichText.h @@ -56,12 +56,14 @@ public: /** * @brief Default constructor. * @js ctor + * @lua new */ RichElement(){}; /** * @brief Default destructor. * @js NA + * @lua NA */ virtual ~RichElement(){}; @@ -93,6 +95,7 @@ public: /** *@brief Default constructor. * @js ctor + * @lua new */ RichElementText(){_type = Type::TEXT;}; @@ -100,6 +103,7 @@ public: /** *@brief Default destructor. * @js NA + * @lua NA */ virtual ~RichElementText(){}; @@ -147,6 +151,7 @@ public: /** * @brief Default constructor. * @js ctor + * @lua new * */ RichElementImage(){_type = Type::IMAGE;}; @@ -155,6 +160,7 @@ public: /** * @brief Default destructor. * @js NA + * @lua NA */ virtual ~RichElementImage(){}; @@ -198,6 +204,7 @@ public: /** * @brief Default constructor. * @js ctor + * @lua new */ RichElementCustomNode(){_type = Type::CUSTOM;}; @@ -205,6 +212,7 @@ public: /** * @brief Default destructor. * @js NA + * @lua NA */ virtual ~RichElementCustomNode(){CC_SAFE_RELEASE(_customNode);}; @@ -246,12 +254,14 @@ public: /** * @brief Default constructor. * @js ctor + * @lua new */ RichText(); /** * @brief Default destructor. * @js NA + * @lua NA */ virtual ~RichText(); diff --git a/cocos/ui/UIScale9Sprite.h b/cocos/ui/UIScale9Sprite.h index 93b4fee475..1a90a725cd 100644 --- a/cocos/ui/UIScale9Sprite.h +++ b/cocos/ui/UIScale9Sprite.h @@ -56,6 +56,7 @@ namespace ui { /** * Default constructor. * @js ctor + * @lua new */ Scale9Sprite(); @@ -577,6 +578,10 @@ namespace ui { virtual void visit(Renderer *renderer, const Mat4 &parentTransform, uint32_t parentFlags) override; virtual void cleanup() override; + + /** + * @lua NA + */ virtual void onEnter() override; /** Event callback that is invoked when the Node enters in the 'stage'. diff --git a/cocos/ui/UIScrollView.h b/cocos/ui/UIScrollView.h index c32aeb591f..1195a30d06 100644 --- a/cocos/ui/UIScrollView.h +++ b/cocos/ui/UIScrollView.h @@ -107,12 +107,14 @@ public: /** * Default constructor * @js ctor + * @lua new */ ScrollView(); /** * Default destructor * @js NA + * @lua NA */ virtual ~ScrollView(); @@ -387,6 +389,10 @@ public: * Return the "class name" of widget. */ virtual std::string getDescription() const override; + + /** + * @lua NA + */ virtual void onEnter() override; /** diff --git a/cocos/ui/UISlider.h b/cocos/ui/UISlider.h index 603550743e..882dfec14c 100644 --- a/cocos/ui/UISlider.h +++ b/cocos/ui/UISlider.h @@ -67,12 +67,14 @@ public: /** * Default constructor. * @js ctor + * @lua new */ Slider(); /** * Default destructor. * @js NA + * @lua NA */ virtual ~Slider(); diff --git a/cocos/ui/UIText.h b/cocos/ui/UIText.h index f5fd85560d..6bf0e7a274 100644 --- a/cocos/ui/UIText.h +++ b/cocos/ui/UIText.h @@ -57,11 +57,15 @@ public: }; /** * Default constructor. + * + * @lua new */ Text(); /** * Default destructor. + * + * @lua NA */ virtual ~Text(); diff --git a/cocos/ui/UITextAtlas.h b/cocos/ui/UITextAtlas.h index 750ebb651e..85c2039cab 100644 --- a/cocos/ui/UITextAtlas.h +++ b/cocos/ui/UITextAtlas.h @@ -50,11 +50,15 @@ class CC_GUI_DLL TextAtlas : public Widget public: /** * Default constructor. + * + * @lua new */ TextAtlas(); /** * Default destructor. + * + * @lua NA */ virtual ~TextAtlas(); diff --git a/cocos/ui/UITextBMFont.h b/cocos/ui/UITextBMFont.h index 303f7b8a9b..0a7bf16a08 100644 --- a/cocos/ui/UITextBMFont.h +++ b/cocos/ui/UITextBMFont.h @@ -49,11 +49,15 @@ class CC_GUI_DLL TextBMFont : public Widget public: /** * Default constructor + * + * @lua new */ TextBMFont(); /** * Default destructor + * + * @lua NA */ virtual ~TextBMFont(); diff --git a/cocos/ui/UITextField.h b/cocos/ui/UITextField.h index ea96bb8abf..efbe13e002 100644 --- a/cocos/ui/UITextField.h +++ b/cocos/ui/UITextField.h @@ -40,6 +40,8 @@ namespace ui { /** * @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. + * + * @lua NA */ class CC_GUI_DLL UICCTextField: public TextFieldTTF, public TextFieldDelegate { diff --git a/cocos/ui/UIVBox.h b/cocos/ui/UIVBox.h index f8a1e53dcf..6613dd2ad7 100644 --- a/cocos/ui/UIVBox.h +++ b/cocos/ui/UIVBox.h @@ -45,11 +45,15 @@ public: /** * Default constructor + * + * @lua new */ VBox(); /** * Default destructor + * + * @lua NA */ virtual ~VBox(); diff --git a/cocos/ui/UIWidget.h b/cocos/ui/UIWidget.h index 2323b65bae..9514b485ba 100644 --- a/cocos/ui/UIWidget.h +++ b/cocos/ui/UIWidget.h @@ -154,11 +154,15 @@ public: typedef std::function ccWidgetEventCallback; /** * Default constructor + * + * @lua new */ Widget(void); /** * Default destructor + * + * @lua NA */ virtual ~Widget(); /** @@ -312,6 +316,7 @@ public: /** * Set a event handler to the widget in order to use cocostudio editor and framework * @param callback The callback in `ccWidgetEventCallback`. + * @lua NA */ virtual void addCCSEventListener(const ccWidgetEventCallback& callback); /**/ @@ -646,8 +651,14 @@ public: * @return A cloned widget copy of original. */ Widget* clone(); - + /** + * @lua NA + */ virtual void onEnter() override; + + /** + * @lua NA + */ virtual void onExit() override; /** diff --git a/extensions/GUI/CCControlExtension/CCControlColourPicker.h b/extensions/GUI/CCControlExtension/CCControlColourPicker.h index 1a6a146170..a124cc37cc 100644 --- a/extensions/GUI/CCControlExtension/CCControlColourPicker.h +++ b/extensions/GUI/CCControlExtension/CCControlColourPicker.h @@ -54,6 +54,7 @@ public: static ControlColourPicker* create(); /** * @js ctor + * @lua new */ ControlColourPicker(); /** diff --git a/extensions/GUI/CCControlExtension/CCControlPotentiometer.h b/extensions/GUI/CCControlExtension/CCControlPotentiometer.h index c70ec15e06..68c91d7a51 100644 --- a/extensions/GUI/CCControlExtension/CCControlPotentiometer.h +++ b/extensions/GUI/CCControlExtension/CCControlPotentiometer.h @@ -50,6 +50,7 @@ public: static ControlPotentiometer* create(const char* backgroundFile, const char* progressFile, const char* thumbFile); /** * @js ctor + * @lua new */ ControlPotentiometer(); /** diff --git a/extensions/GUI/CCControlExtension/CCControlSlider.h b/extensions/GUI/CCControlExtension/CCControlSlider.h index 500c660a17..e2196c6b8f 100644 --- a/extensions/GUI/CCControlExtension/CCControlSlider.h +++ b/extensions/GUI/CCControlExtension/CCControlSlider.h @@ -77,6 +77,7 @@ public: Sprite* selectedThumbSprite); /** * @js ctor + * @lua new */ ControlSlider(); /** diff --git a/extensions/GUI/CCControlExtension/CCControlStepper.h b/extensions/GUI/CCControlExtension/CCControlStepper.h index bd61ee2f1b..5a9c6800f5 100644 --- a/extensions/GUI/CCControlExtension/CCControlStepper.h +++ b/extensions/GUI/CCControlExtension/CCControlStepper.h @@ -54,6 +54,7 @@ public: static ControlStepper* create(Sprite *minusSprite, Sprite *plusSprite); /** * @js ctor + * @lua new */ ControlStepper(); /** diff --git a/extensions/GUI/CCControlExtension/CCControlSwitch.h b/extensions/GUI/CCControlExtension/CCControlSwitch.h index d77067303c..75f48e8d46 100644 --- a/extensions/GUI/CCControlExtension/CCControlSwitch.h +++ b/extensions/GUI/CCControlExtension/CCControlSwitch.h @@ -55,6 +55,7 @@ public: static ControlSwitch* create(Sprite *maskSprite, Sprite * onSprite, Sprite * offSprite, Sprite * thumbSprite); /** * @js ctor + * @lua new */ ControlSwitch(); /** diff --git a/extensions/GUI/CCScrollView/CCScrollView.h b/extensions/GUI/CCScrollView/CCScrollView.h index 08b328d894..b080dba8f3 100644 --- a/extensions/GUI/CCScrollView/CCScrollView.h +++ b/extensions/GUI/CCScrollView/CCScrollView.h @@ -93,6 +93,7 @@ public: static ScrollView* create(); /** * @js ctor + * @lua new */ ScrollView(); /** diff --git a/extensions/GUI/CCScrollView/CCTableView.h b/extensions/GUI/CCScrollView/CCTableView.h index d9fccb46f2..a3f58728db 100644 --- a/extensions/GUI/CCScrollView/CCTableView.h +++ b/extensions/GUI/CCScrollView/CCTableView.h @@ -188,6 +188,7 @@ public: static TableView* create(TableViewDataSource* dataSource, Size size, Node *container); /** * @js ctor + * @lua new */ TableView(); /** diff --git a/extensions/assets-manager/AssetsManager.h b/extensions/assets-manager/AssetsManager.h index f8221883b7..8cb4e48017 100644 --- a/extensions/assets-manager/AssetsManager.h +++ b/extensions/assets-manager/AssetsManager.h @@ -74,6 +74,7 @@ public: * @param versionFileUrl URL of version file. It should contain version code of new package. * @param storagePath The path to store downloaded resources. * @js NA + * @lua new */ AssetsManager(const char* packageUrl = NULL, const char* versionFileUrl = NULL, const char* storagePath = NULL); /** diff --git a/extensions/assets-manager/Manifest.h b/extensions/assets-manager/Manifest.h index 34700040a2..32657d49b4 100644 --- a/extensions/assets-manager/Manifest.h +++ b/extensions/assets-manager/Manifest.h @@ -163,7 +163,9 @@ protected: */ const std::string& getGroupVersion(const std::string &group) const; - /** @brief Gets assets. + /** + * @brief Gets assets. + * @lua NA */ const std::unordered_map& getAssets() const; diff --git a/extensions/physics-nodes/CCPhysicsDebugNode.h b/extensions/physics-nodes/CCPhysicsDebugNode.h index 16c0f56400..bdb4a8aaf6 100644 --- a/extensions/physics-nodes/CCPhysicsDebugNode.h +++ b/extensions/physics-nodes/CCPhysicsDebugNode.h @@ -32,13 +32,13 @@ struct cpSpace; 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: - - Chipmunk - - Objective-Chipmunk - - @since v2.1 + * Supported physics engines: + * - Chipmunk + * - Objective-Chipmunk + * @since v2.1 + * @lua NA */ class CC_EX_DLL PhysicsDebugNode : public DrawNode @@ -53,7 +53,6 @@ public: PhysicsDebugNode(); /** * @js NA - * @lua NA */ virtual ~PhysicsDebugNode(); diff --git a/extensions/physics-nodes/CCPhysicsSprite.h b/extensions/physics-nodes/CCPhysicsSprite.h index 1113354b7b..6dd88562f9 100644 --- a/extensions/physics-nodes/CCPhysicsSprite.h +++ b/extensions/physics-nodes/CCPhysicsSprite.h @@ -45,6 +45,7 @@ NS_CC_EXT_BEGIN - 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 - 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 {