cocos2d-x  3.0-alpha0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DisplayManager Class Reference

DisplayManager manages Bone's display. More...

#include <CCDisplayManager.h>

Inheritance diagram for DisplayManager:
Object

Public Member Functions

 DisplayManager ()
 ctor ()
 DisplayManager ()
 ~DisplayManager ()
bool init (Bone *bone)
local init ( local bone)
virtual void initDisplayList (BoneData *boneData)
 Use BoneData to init the display list. More...
 
local initDisplayList ( local boneData)
 Use BoneData to init the display list. More...
 
void addDisplay (DisplayData *displayData, int index)
 Add display and use _DisplayData init the display. More...
 
var addDisplay ( var displayData, var index)
 Add display and use _DisplayData init the display. More...
 
local addDisplay ( local displayData, local index)
 Add display and use _DisplayData init the display. More...
 
void addDisplay (Node *display, int index)
void removeDisplay (int index)
var removeDisplay ( var index)
local removeDisplay ( local index)
ArraygetDecorativeDisplayList ()
var getDecorativeDisplayList ()
local getDecorativeDisplayList ()
void changeDisplayByIndex (int index, bool force)
 Change display by index. More...
 
NodegetDisplayRenderNode ()
int getCurrentDisplayIndex ()
var getCurrentDisplayIndex ()
local getCurrentDisplayIndex ()
virtual void setCurrentDecorativeDisplay (DecorativeDisplay *decoDisplay)
var setCurrentDecorativeDisplay ( var decoDisplay)
local setCurrentDecorativeDisplay ( local decoDisplay)
virtual DecorativeDisplaygetCurrentDecorativeDisplay ()
local getCurrentDecorativeDisplay ()
virtual DecorativeDisplaygetDecorativeDisplayByIndex (int index)
local getDecorativeDisplayByIndex ( local index)
virtual void setVisible (bool visible)
 Sets whether the display is visible The default value is true, a node is default to visible. More...
 
var setVisible ( var visible)
 Sets whether the display is visible The default value is true, a node is default to visible. More...
 
local setVisible ( local visible)
 Sets whether the display is visible The default value is true, a node is default to visible. More...
 
virtual bool isVisible ()
 Determines if the display is visible. More...
 
local isVisible ()
 Determines if the display is visible. More...
 
Size getContentSize ()
Rect getBoundingBox ()
var getBoundingBox ()
local getBoundingBox ()
Point getAnchorPoint ()
var getAnchorPoint ()
local getAnchorPoint ()
Point getAnchorPointInPoints ()
virtual bool containPoint (Point &_point)
 Check if the position is inside the bone. More...
 
var containPoint ( var _point)
 Check if the position is inside the bone. More...
 
local containPoint ( local _point)
 Check if the position is inside the bone. More...
 
virtual bool containPoint (float x, float y)
 Check if the position is inside the bone. More...
 
var containPoint ( var x, var y)
 Check if the position is inside the bone. More...
 
local containPoint ( local x, local y)
 Check if the position is inside the bone. More...
 
- Public Member Functions inherited from Object
 Object ()
 Constructor. More...
 
virtual ~Object ()
void release ()
 Release the ownership immediately. More...
 
void retain ()
 Retains the ownership. More...
 
Objectautorelease ()
 Release the ownership sometime soon automatically. More...
 
bool isSingleReference () const
 Returns a boolean value that indicates whether there is only one reference to the object. More...
 
unsigned int retainCount () const
 Returns the object's current reference count. More...
 
virtual bool isEqual (const Object *object)
 Returns a boolean value that indicates whether this object and a given object are equal. More...
 
virtual void acceptVisitor (DataVisitor &visitor)
virtual void update (float dt)

Static Public Member Functions

static DisplayManagercreate (Bone *bone)
local create ( local bone)

Public Attributes

virtual bool
getForceChangeDisplay(void)\n\n
public bool 
_visible
 getForceChangeDisplay More...
 
Bone_bone
var _bone
local _bone
- Public Attributes inherited from Object
unsigned int _ID
 object id, ScriptSupport need public _ID More...
 
int _luaID
 Lua reference id. More...
 

Protected Attributes

Array_decoDisplayList
Node_displayRenderNode
 Display render node. More...
 
var _displayRenderNode
 Display render node. More...
 
local _displayRenderNode
 Display render node. More...
 
DecorativeDisplay_currentDecoDisplay
 Include current display information, like contour sprite, etc. More...
 
var _currentDecoDisplay
 Include current display information, like contour sprite, etc. More...
 
local _currentDecoDisplay
 Include current display information, like contour sprite, etc. More...
 
int _displayIndex
 Current display index. More...
 
bool _forceChangeDisplay
- Protected Attributes inherited from Object
unsigned int _reference
 count of references More...
 
var _reference
 count of references More...
 
local _reference
 count of references More...
 
unsigned int _autoReleaseCount
 count of autorelease More...
 
var _autoReleaseCount
 count of autorelease More...
 
local _autoReleaseCount
 count of autorelease More...
 

Detailed Description

DisplayManager manages Bone's display.

Constructor & Destructor Documentation

var ctor ( )
local DisplayManager ( )

Member Function Documentation

void addDisplay ( DisplayData displayData,
int  index 
)

Add display and use _DisplayData init the display.

If index already have a display, then replace it. If index is current display index, then also change display to _index

Parameters
displayDatait include the display information, like DisplayType. If you want to create a sprite display, then create a SpriteDisplayData param
indexthe index of the display you want to replace or add to -1 : append display from back
var addDisplay ( var  displayData,
var  index 
)

Add display and use _DisplayData init the display.

If index already have a display, then replace it. If index is current display index, then also change display to _index

Parameters
displayDatait include the display information, like DisplayType. If you want to create a sprite display, then create a SpriteDisplayData param
indexthe index of the display you want to replace or add to -1 : append display from back
local addDisplay ( local  displayData,
local  index 
)

Add display and use _DisplayData init the display.

If index already have a display, then replace it. If index is current display index, then also change display to _index

Parameters
displayDatait include the display information, like DisplayType. If you want to create a sprite display, then create a SpriteDisplayData param
indexthe index of the display you want to replace or add to -1 : append display from back
void addDisplay ( Node display,
int  index 
)
var addDisplay ( var  display,
var  index 
)
local addDisplay ( local  display,
local  index 
)
void changeDisplayByIndex ( int  index,
bool  force 
)

Change display by index.

You can just use this method to change display in the display list. The display list is just used for this bone, and it is the displays you may use in every frame.

Note : if index is the same with prev index, the method will not effect

Parameters
indexThe index of the display you want to change
forceIf true, then force change display to specified display, or current display will set to display index edit in the flash every key frame.
var changeDisplayByIndex ( var  index,
var  force 
)

Change display by index.

You can just use this method to change display in the display list. The display list is just used for this bone, and it is the displays you may use in every frame.

Note : if index is the same with prev index, the method will not effect

Parameters
indexThe index of the display you want to change
forceIf true, then force change display to specified display, or current display will set to display index edit in the flash every key frame.
local changeDisplayByIndex ( local  index,
local  force 
)

Change display by index.

You can just use this method to change display in the display list. The display list is just used for this bone, and it is the displays you may use in every frame.

Note : if index is the same with prev index, the method will not effect

Parameters
indexThe index of the display you want to change
forceIf true, then force change display to specified display, or current display will set to display index edit in the flash every key frame.
virtual bool containPoint ( Point _point)
virtual

Check if the position is inside the bone.

var containPoint ( var  _point)
virtual

Check if the position is inside the bone.

local containPoint ( local  _point)
virtual

Check if the position is inside the bone.

virtual bool containPoint ( float  x,
float  y 
)
virtual

Check if the position is inside the bone.

var containPoint ( var  x,
var  y 
)
virtual

Check if the position is inside the bone.

local containPoint ( local  x,
local  y 
)
virtual

Check if the position is inside the bone.

static DisplayManager* create ( Bone bone)
static
var create ( var  bone)
static
local create ( local  bone)
static
Point getAnchorPoint ( )
var getAnchorPoint ( )
local getAnchorPoint ( )
Point getAnchorPointInPoints ( )
var getAnchorPointInPoints ( )
local getAnchorPointInPoints ( )
Rect getBoundingBox ( )
var getBoundingBox ( )
local getBoundingBox ( )
Size getContentSize ( )
var getContentSize ( )
local getContentSize ( )
virtual DecorativeDisplay*
getCurrentDecorativeDisplay
( )
virtual
var getCurrentDecorativeDisplay ( )
virtual
local getCurrentDecorativeDisplay ( )
virtual
int getCurrentDisplayIndex ( )
var getCurrentDisplayIndex ( )
local getCurrentDisplayIndex ( )
virtual DecorativeDisplay*
getDecorativeDisplayByIndex
( int  index)
virtual
var getDecorativeDisplayByIndex ( var  index)
virtual
local getDecorativeDisplayByIndex ( local  index)
virtual
Array* getDecorativeDisplayList ( )
var getDecorativeDisplayList ( )
local getDecorativeDisplayList ( )
Node* getDisplayRenderNode ( )
var getDisplayRenderNode ( )
local getDisplayRenderNode ( )
bool init ( Bone bone)
var init ( var  bone)
local init ( local  bone)
virtual void initDisplayList ( BoneData boneData)
virtual

Use BoneData to init the display list.

If display is a sprite, and it have texture info in the TexutreData, then use TexutreData to init the display's anchor point If the display is a Armature, then create a new Armature

var initDisplayList ( var  boneData)
virtual

Use BoneData to init the display list.

If display is a sprite, and it have texture info in the TexutreData, then use TexutreData to init the display's anchor point If the display is a Armature, then create a new Armature

local initDisplayList ( local  boneData)
virtual

Use BoneData to init the display list.

If display is a sprite, and it have texture info in the TexutreData, then use TexutreData to init the display's anchor point If the display is a Armature, then create a new Armature

virtual bool isVisible ( )
virtual

Determines if the display is visible.

See Also
setVisible(bool)
Returns
true if the node is visible, false if the node is hidden.
var isVisible ( )
virtual

Determines if the display is visible.

See Also
setVisible(bool)
Returns
true if the node is visible, false if the node is hidden.
local isVisible ( )
virtual

Determines if the display is visible.

See Also
setVisible(bool)
Returns
true if the node is visible, false if the node is hidden.
void removeDisplay ( int  index)
var removeDisplay ( var  index)
local removeDisplay ( local  index)
virtual void
setCurrentDecorativeDisplay
( DecorativeDisplay decoDisplay)
virtual
var setCurrentDecorativeDisplay ( var  decoDisplay)
virtual
local setCurrentDecorativeDisplay ( local  decoDisplay)
virtual
virtual void setVisible ( bool  visible)
virtual

Sets whether the display is visible The default value is true, a node is default to visible.

Parameters
visibletrue if the node is visible, false if the node is hidden.
var setVisible ( var  visible)
virtual

Sets whether the display is visible The default value is true, a node is default to visible.

Parameters
visibletrue if the node is visible, false if the node is hidden.
local setVisible ( local  visible)
virtual

Sets whether the display is visible The default value is true, a node is default to visible.

Parameters
visibletrue if the node is visible, false if the node is hidden.

Member Data Documentation

Bone* _bone
var _bone
local _bone
DecorativeDisplay*
_currentDecoDisplay
protected

Include current display information, like contour sprite, etc.

var _currentDecoDisplay
protected

Include current display information, like contour sprite, etc.

local _currentDecoDisplay
protected

Include current display information, like contour sprite, etc.

Array* _decoDisplayList
protected
int _displayIndex
protected

Current display index.

var _displayIndex
protected

Current display index.

local _displayIndex
protected

Current display index.

Node* _displayRenderNode
protected

Display render node.

var _displayRenderNode
protected

Display render node.

local _displayRenderNode
protected

Display render node.

bool _forceChangeDisplay
protected
var _forceChangeDisplay
protected
local _forceChangeDisplay
protected
virtual bool
getForceChangeDisplay (void)\n
\n public bool _visible

getForceChangeDisplay

setForceChangeDisplay Whether of not the bone is visible. Default is true

var _visible

getForceChangeDisplay

setForceChangeDisplay Whether of not the bone is visible. Default is true

local _visible

getForceChangeDisplay

setForceChangeDisplay Whether of not the bone is visible. Default is true


The documentation for this class was generated from the following file: