Merge pull request #14218 from mogemimi/fix-typos

Fix typos in documentation
This commit is contained in:
pandamicro 2015-10-26 09:37:41 +08:00
commit 8f2ed70f36
22 changed files with 55 additions and 55 deletions

View File

@ -498,7 +498,7 @@ CC_CONSTRUCTOR_ACCESS:
*
* After initialization, the offset will be (0,0).
*
* @param texture A pointer to an exisiting Texture2D object.
* @param texture A pointer to an existing Texture2D object.
* You can use a Texture2D object for many sprites.
* @param rect Only the contents inside rect of this texture will be applied for this sprite.
* @return True if the sprite is initialized properly, false otherwise.
@ -532,7 +532,7 @@ CC_CONSTRUCTOR_ACCESS:
* A SpriteFrame will be fetched from the SpriteFrameCache by name.
* If the SpriteFrame doesn't exist it will raise an exception.
*
* @param spriteFrameName A key string that can fected a volid SpriteFrame from SpriteFrameCache.
* @param spriteFrameName A key string that can fected a valid SpriteFrame from SpriteFrameCache.
* @return True if the sprite is initialized properly, false otherwise.
*/
virtual bool initWithSpriteFrameName(const std::string& spriteFrameName);

View File

@ -159,7 +159,7 @@ public:
inline void setDelegate(TextFieldDelegate* delegate) { _delegate = delegate; };
/**
* Query the currently inputed charater count.
* Query the currently inputed character count.
*@return The total input character count.
*/
inline int getCharCount() const { return _charCount; };
@ -214,7 +214,7 @@ public:
virtual const std::string& getPlaceHolder() const;
/**
* Set enable secure text entry represention.
* Set enable secure text entry representation.
* 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

View File

@ -68,7 +68,7 @@ public:
static HttpClient *getInstance();
/**
* Relase the instance of HttpClient.
* Release the instance of HttpClient.
*/
static void destroyInstance();

View File

@ -78,7 +78,7 @@ public:
/**
* Constructor.
* Because HttpRequest object will be used between UI thead and network thread,
* Because HttpRequest object will be used between UI thread and network thread,
requestObj->autorelease() is forbidden to avoid crashes in AutoreleasePool
new/retain/release still works, which means you need to release it manually
Please refer to HttpRequestTest.cpp to find its usage.
@ -214,7 +214,7 @@ public:
/**
* Set user-customed data of HttpRequest object.
* You can attach a customed data in each request, and get it back in response callback.
* But you need to new/delete the data pointer manully.
* But you need to new/delete the data pointer manually.
*
* @param pUserData the string pointer
*/

View File

@ -66,7 +66,7 @@ public:
/**
* Destructor, it will be called in HttpClient internal.
* Users don't need to desturct HttpResponse object manully.
* Users don't need to destruct HttpResponse object manually.
*/
virtual ~HttpResponse()
{
@ -141,7 +141,7 @@ public:
}
/**
* Get the rror buffer which will tell you more about the reason why http request failed.
* Get the error buffer which will tell you more about the reason why http request failed.
* @return const char* the pointer that point to _errorBuffer.
*/
inline const char* getErrorBuffer()
@ -228,7 +228,7 @@ protected:
// properties
HttpRequest* _pHttpRequest; /// the corresponding HttpRequest pointer who leads to this response
bool _succeed; /// to indecate if the http reqeust is successful simply
bool _succeed; /// to indecate if the http request is successful simply
std::vector<char> _responseData; /// the returned raw data. You can also dump it as a string
std::vector<char> _responseHeader; /// the returned raw header data. You can also dump it as a string
long _responseCode; /// the status code returned from libcurl, e.g. 200, 404

View File

@ -105,7 +105,7 @@ public:
/**
* This is kept for backwards compatibility, connect is now fired as a socket.io event "connect"
*
* This function would be called when the related SIOClient object recevie messages that mean it have connected to endpoint successfully.
* This function would be called when the related SIOClient object receive messages that mean it have connected to endpoint successfully.
*
* @param client the connected SIOClient object.
*/
@ -113,7 +113,7 @@ public:
/**
* This is kept for backwards compatibility, message is now fired as a socket.io event "message"
*
* This function would be called wwhen the related SIOClient object recevie message or json message.
* This function would be called when the related SIOClient object receive message or json message.
*
* @param client the connected SIOClient object.
* @param data the message,it could be json message
@ -122,7 +122,7 @@ public:
/**
* Pure virtual callback function, this function should be overrided by the subclass.
*
* This function would be called when the related SIOClient object disconnect or recevie disconnect signal.
* This function would be called when the related SIOClient object disconnect or receive disconnect signal.
*
* @param client the connected SIOClient object.
*/
@ -130,7 +130,7 @@ public:
/**
* Pure virtual callback function, this function should be overrided by the subclass.
*
* This function would be called wwhen the related SIOClient object recevie error signal or didn't connect the endpoint but do some network operation,eg.,send and emit,etc.
* This function would be called when the related SIOClient object receive error signal or didn't connect the endpoint but do some network operation, eg.,send and emit,etc.
*
* @param client the connected SIOClient object.
* @param data the error message

View File

@ -185,7 +185,7 @@ public:
/**
* @brief Gets current state of connection.
* @return State the state value coule be State::CONNECTING, State::OPEN, State::CLOSING or State::CLOSED
* @return State the state value could be State::CONNECTING, State::OPEN, State::CLOSING or State::CLOSED
*/
State getReadyState();

View File

@ -44,7 +44,7 @@ NS_CC_BEGIN
class Physics3DRigidBody;
/** @brief Physics3DConstraint: Constraint affects the movement of physics object, it usually connet one or two physics object. There are some types of physics constraints. */
/** @brief Physics3DConstraint: Constraint affects the movement of physics object, it usually connect one or two physics object. There are some types of physics constraints. */
class CC_DLL Physics3DConstraint : public Ref
{
public:

View File

@ -58,7 +58,7 @@ public:
/**
* You can inherit from platform dependent implementation of FileUtils, such as FileUtilsAndroid,
* and use this function to set delegate, then FileUtils will invoke delegate's implementation.
* Fox example, your resources are encrypted, so you need to decrypt it after reading data from
* For example, your resources are encrypted, so you need to decrypt it after reading data from
* resources, then you can implement all getXXX functions, and engine will invoke your own getXX
* functions when reading data of resources.
*

View File

@ -500,7 +500,7 @@ void Device::setKeepScreenOn(bool value)
}
/*!
@brief Only works on iOS devices that support vibration (such as iPhone). Shoud only be used for important alerts. Use risks rejection in iTunes Store.
@brief Only works on iOS devices that support vibration (such as iPhone). Should only be used for important alerts. Use risks rejection in iTunes Store.
@param duration ignored for iOS
*/
void Device::vibrate(float duration)

View File

@ -80,7 +80,7 @@ public:
/** Returns the Command type. */
inline Type getType() const { return _type; }
/** Retruns whether is transparent. */
/** Returns whether is transparent. */
inline bool isTransparent() const { return _isTransparent; }
/** Set transparent flag. */

View File

@ -53,7 +53,7 @@ cocos2d::log(__VA_ARGS__); \
/**
* If the typename of userdata at the given accepteable index of stack is equal to type it return true,otherwise return false .
* If def != 0, lo could greater than the top index of stack, return value is true.
* If the value of the given index is nil, retrun value also is true.
* If the value of the given index is nil, return value also is true.
*
* @param L the current lua_State.
* @param lo the given accpetable index of stack.
@ -68,7 +68,7 @@ extern bool luaval_is_usertype(lua_State* L,int lo,const char* type, int def);
* @name luaval_to_native
* The following function are all used to convert the Lua values at the given acceptable index to the corresponding c++ values.
* If the Lua values can be converted the return value is true, otherwise return false.
* If it happens error during the conversion process, it outputs the error msg in the console to provide infromation about the name of calling function, the typename of value at the given acceptable index, and so on.
* If it happens error during the conversion process, it outputs the error msg in the console to provide information about the name of calling function, the typename of value at the given acceptable index, and so on.
* @{
**/

View File

@ -62,7 +62,7 @@ public:
*
* @param root The be searched root widget.
* @param name The widget name.
* @return Widget isntance pointer.
* @return Widget instance pointer.
*/
static Widget* seekWidgetByName(Widget* root, const std::string& name);

View File

@ -209,7 +209,7 @@ public:
/**
* Query background image scale9 enable status.
*@return Whehter background image is scale9 enabled or not.
*@return Whether background image is scale9 enabled or not.
*/
bool isBackGroundImageScale9Enabled()const;
@ -521,15 +521,15 @@ protected:
int findFarthestChildWidgetIndex(FocusDirection direction, Widget* baseWidget);
/**
* caculate the nearest distance between the baseWidget and the children of the layout
*@param the base widget which will be used to caculate the distance between the layout's children and itself
* calculate the nearest distance between the baseWidget and the children of the layout
*@param the base widget which will be used to calculate the distance between the layout's children and itself
*@return return the nearest distance between the baseWidget and the layout's children
*/
float calculateNearestDistance(Widget* baseWidget);
/**
* caculate the farthest distance between the baseWidget and the children of the layout
*@param the base widget which will be used to caculate the distance between the layout's children and itself
* calculate the farthest distance between the baseWidget and the children of the layout
*@param the base widget which will be used to calculate the distance between the layout's children and itself
*@return return the farthest distance between the baseWidget and the layout's children
*/
@ -546,7 +546,7 @@ protected:
Widget *findFirstNonLayoutWidget();
/**
* find the fisrt focus enabled widget index in the layout, it will recusive searching the child widget
* find the first focus enabled widget index in the layout, it will recursive searching the child widget
*/
int findFirstFocusEnabledWidgetIndex();
@ -577,7 +577,7 @@ protected:
Widget* getPreviousFocusedWidget(FocusDirection direction, Widget *current);
/**
* find the nth elment in the _children array. Only the Widget descendant object will be returned
* find the nth element in the _children array. Only the Widget descendant object will be returned
*@param index The index of a element in the _children array
*/
Widget* getChildWidgetByIndex(ssize_t index)const;

View File

@ -146,7 +146,7 @@ namespace ui {
/**
* Whether position percentX is enabled or not.
*@return True if position percertX is enable, false otherwise.
*@return True if position percentX is enable, false otherwise.
*/
bool isPositionPercentXEnabled()const;
@ -314,7 +314,7 @@ namespace ui {
void setPercentWidth(float percentWidth);
/**
* Query whehter percent height is enabled or not.
* Query whether percent height is enabled or not.
*@return True if percent height is enabled, false otherwise.
*/
bool isPercentHeightEnabled()const;
@ -338,7 +338,7 @@ namespace ui {
void setSizeHeight(float height);
/**
* Query percent hieght of owner.
* Query percent height of owner.
*@return Percent height in float.
*/
float getPercentHeight()const;

View File

@ -197,7 +197,7 @@ public:
/**
* @brief Get all the pages in the PageView.
* @return A vector of Layout pionters.
* @return A vector of Layout pointers.
*/
Vector<Layout*>& getPages();

View File

@ -67,7 +67,7 @@ typedef void (Ref::*SEL_ScrollViewEvent)(Ref*, ScrollviewEventType);
/**
* Layout container for a view hierarchy that can be scrolled by the user, allowing it to be larger than the physical display.
* It holds a inner `Layout` container for storing child items hironzontally or vertically.
* It holds a inner `Layout` container for storing child items horizontally or vertically.
*/
class CC_GUI_DLL ScrollView : public Layout
{

View File

@ -205,7 +205,7 @@ public:
/**
* Sets the rendering size of the text, you should call this method
* along with calling `ignoreContentAdaptWithSize(false)`, otherwise the text area
* size is caculated by the real size of the text content.
* size is calculated by the real size of the text content.
*
* @param size The text rendering area size.
*

View File

@ -59,7 +59,7 @@ public:
virtual void onEnter() override;
/**
* Create a UICCTextField intance with a placeholder, a fontName and a fontSize.
* Create a UICCTextField instance with a placeholder, a fontName and a fontSize.
*@param placeholder Placeholder in string.
*@param fontName Font name in string.
*@param fontSize Font size in float.
@ -104,8 +104,8 @@ public:
bool isMaxLengthEnabled()const;
/**
* Set maxmize length.
*@param length The maxmize length in integer.
* Set maximize length.
*@param length The maximize length in integer.
*/
void setMaxLength(int length);
@ -116,7 +116,7 @@ public:
int getMaxLength()const;
/**
* Return the total inputed charaters.
* Return the total inputed characters.
*@return Total inputed character count.
*/
int getCharCount()const;
@ -577,7 +577,7 @@ public:
* @return A delimitation zone.
*/
virtual Size getAutoRenderSize();
//overide functions.
//override functions.
virtual Size getVirtualRendererSize() const override;
virtual Node* getVirtualRenderer() override;
virtual void onEnter() override;

View File

@ -76,7 +76,7 @@ namespace experimental{
virtual void setFileName(const std::string& videoPath);
/**
* @brief Get the local video filie name.
* @brief Get the local video file name.
*
* @return The video file name.
*/

View File

@ -607,9 +607,9 @@ bool Widget::isHighlighted() const
return _highlight;
}
void Widget::setHighlighted(bool hilight)
void Widget::setHighlighted(bool highlight)
{
_highlight = hilight;
_highlight = highlight;
if (_bright)
{
if (_highlight)

View File

@ -234,18 +234,18 @@ public:
/**
* Determines if the widget is highlighted
*
* @return true if the widget is highlighted, false if the widget is not hignlighted .
* @return true if the widget is highlighted, false if the widget is not highlighted.
*/
bool isHighlighted() const;
/**
* Sets whether the widget is hilighted
* Sets whether the widget is highlighted
*
* The default value is false, a widget is default to not hilighted
* The default value is false, a widget is default to not highlighted
*
* @param hilight true if the widget is hilighted, false if the widget is not hilighted.
* @param highlight true if the widget is highlighted, false if the widget is not highlighted.
*/
void setHighlighted(bool hilight);
void setHighlighted(bool highlight);
/**
* Gets the left boundary position of this widget in parent's coordination system.
@ -371,7 +371,7 @@ public:
/**
* Sets whether the widget should be flipped horizontally or not.
*
* @param flippedX true if the widget should be flipped horizaontally, false otherwise.
* @param flippedX true if the widget should be flipped horizontally, false otherwise.
*/
virtual void setFlippedX(bool flippedX);
@ -382,7 +382,7 @@ public:
* Also, flipping relies on widget's anchor point.
* Internally, it just use setScaleX(-1) to flip the widget.
*
* @return true if the widget is flipped horizaontally, false otherwise.
* @return true if the widget is flipped horizontally, false otherwise.
*/
virtual bool isFlippedX()const{return _flippedX;};
@ -610,12 +610,12 @@ public:
* Set true will ignore user defined content size which means
* the widget size is always equal to the return value of `getVirtualRendererSize`.
*
* @param ignore set member variabl _ignoreSize to ignore
* @param ignore set member variable _ignoreSize to ignore
*/
virtual void ignoreContentAdaptWithSize(bool ignore);
/**
* Query whether the widget ignores user deinfed content size or not
* Query whether the widget ignores user defined content size or not
*
* @return True means ignore user defined content size, false otherwise.
*/
@ -852,7 +852,7 @@ CC_CONSTRUCTOR_ACCESS:
/*
* @brief Sends the touch event to widget's parent, if a widget wants to handle touch event under another widget,
* it must overide this function.
* it must override this function.
* @param event the touch event type, it could be BEGAN/MOVED/CANCELED/ENDED
* @param parent
* @param point
@ -868,7 +868,7 @@ CC_CONSTRUCTOR_ACCESS:
/**
* This method is called when a focus change event happens
*@param widgetLostFocus The widget which lose its focus
*@param widgetGetFocus The widget whihc get its focus
*@param widgetGetFocus The widget which get its focus
*@return void
*/
void onFocusChange(Widget* widgetLostFocus, Widget* widgetGetFocus);
@ -876,7 +876,7 @@ CC_CONSTRUCTOR_ACCESS:
/**
* Dispatch a EventFocus through a EventDispatcher
*@param widgetLoseFocus The widget which lose its focus
*@param widgetGetFocus he widget whihc get its focus
*@param widgetGetFocus he widget which get its focus
*@return void
*/
void dispatchFocusEvent(Widget* widgetLoseFocus, Widget* widgetGetFocus);