cocos2d-x  3.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
WidgetReader Class Reference

#include <WidgetReader.h>

Inheritance diagram for WidgetReader:
Ref WidgetReaderProtocol NodeReaderProtocol ButtonReader CheckBoxReader ImageViewReader LayoutReader LoadingBarReader SliderReader TextAtlasReader TextBMFontReader TextFieldReader TextReader

Public Member Functions

 WidgetReader ()
virtual ~WidgetReader ()
virtual void setPropsFromJsonDictionary (cocos2d::ui::Widget *widget, const rapidjson::Value &options)
virtual void setColorPropsFromJsonDictionary (cocos2d::ui::Widget *widget, const rapidjson::Value &options)
local setColorPropsFromJsonDictionary ( local widget, local options)
virtual void setPropsFromBinary (cocos2d::ui::Widget *widget, CocoLoader *cocoLoader, stExpCocoNode *pCocoNode)
local setPropsFromBinary ( local widget, local cocoLoader, local pCocoNode)
flatbuffers::Offset
< flatbuffers::Table > 
createOptionsWithFlatBuffers (const tinyxml2::XMLElement *objectData, flatbuffers::FlatBufferBuilder *builder)
local createOptionsWithFlatBuffers ( local objectData, local builder)
void setPropsWithFlatBuffers (cocos2d::Node *node, const flatbuffers::Table *widgetOptions)
void setLayoutComponentPropsWithFlatBuffers (cocos2d::Node *node, const flatbuffers::Table *widgetOptions)
cocos2d::Node * createNodeWithFlatBuffers (const flatbuffers::Table *widgetOptions)
- Public Member Functions inherited from Ref
void retain ()
 Retains the ownership. More...
 
void release ()
 Releases the ownership immediately. More...
 
Ref * autorelease ()
 Releases the ownership sometime soon automatically. More...
 
unsigned int getReferenceCount () const
 Returns the Ref's current reference count. More...
 
virtual ~Ref ()
- Public Member Functions inherited from WidgetReaderProtocol
virtual ~WidgetReaderProtocol ()
- Public Member Functions inherited from NodeReaderProtocol
 NodeReaderProtocol ()
virtual ~NodeReaderProtocol ()

Static Public Member Functions

static WidgetReader * getInstance ()
static void purge ()
local purge ()

Protected Member Functions

std::string getResourcePath (const rapidjson::Value &dict, const std::string &key, cocos2d::ui::Widget::TextureResType texType)
local getResourcePath ( local dict, local key, local texType)
void setAnchorPointForWidget (cocos2d::ui::Widget *widget, const rapidjson::Value &options)
std::string getResourcePath (CocoLoader *cocoLoader, stExpCocoNode *pCocoNode, cocos2d::ui::Widget::TextureResType texType)
var getResourcePath ( var cocoLoader, var pCocoNode, var texType)
local getResourcePath ( local cocoLoader, local pCocoNode, local texType)
std::string getResourcePath (const std::string &path, cocos2d::ui::Widget::TextureResType texType)
void beginSetBasicProperties (cocos2d::ui::Widget *widget)
void endSetBasicProperties (cocos2d::ui::Widget *widget)
- Protected Member Functions inherited from Ref
 Ref ()
 Constructor. More...
 
 Ref ()
 Constructor. More...
 

Protected Attributes

std::function< int(const
std::string &)> 
valueToInt
local valueToInt
std::function< bool(const
std::string &)> 
valueToBool
var valueToBool
local valueToBool
std::function< float(const
std::string &)> 
valueToFloat
var valueToFloat
local valueToFloat
float _sizePercentX
float _sizePercentY
float _positionPercentX
float _positionPercentY
float _width
float _height
cocos2d::Color3B _color
var _color
local _color
int _opacity
cocos2d::Vec2 _position
bool _isAdaptScreen
cocos2d::Vec2 _originalAnchorPoint
var _originalAnchorPoint
local _originalAnchorPoint
- Protected Attributes inherited from Ref
unsigned int _referenceCount
 count of references More...
 
var _referenceCount
 count of references More...
 
local _referenceCount
 count of references More...
 

Constructor & Destructor Documentation

var WidgetReader ( )
local WidgetReader ( )
virtual ~WidgetReader ( )
virtual
var ~WidgetReader ( )
virtual
local ~WidgetReader ( )
virtual

Member Function Documentation

void beginSetBasicProperties ( cocos2d::ui::Widget *  widget)
protected
var beginSetBasicProperties ( var  widget)
protected
local beginSetBasicProperties ( local  widget)
protected
cocos2d::Node*
createNodeWithFlatBuffers
( const flatbuffers::Table *  widgetOptions)
virtual

Implements NodeReaderProtocol.

var createNodeWithFlatBuffers ( var  widgetOptions)
virtual

Implements NodeReaderProtocol.

local createNodeWithFlatBuffers ( local  widgetOptions)
virtual

Implements NodeReaderProtocol.

flatbuffers::Offset
<flatbuffers::Table>
createOptionsWithFlatBuffers
( const tinyxml2::XMLElement *  objectData,
flatbuffers::FlatBufferBuilder *  builder 
)
virtual

Implements NodeReaderProtocol.

var createOptionsWithFlatBuffers ( var  objectData,
var  builder 
)
virtual

Implements NodeReaderProtocol.

local createOptionsWithFlatBuffers ( local  objectData,
local  builder 
)
virtual

Implements NodeReaderProtocol.

void endSetBasicProperties ( cocos2d::ui::Widget *  widget)
protected
var endSetBasicProperties ( var  widget)
protected
local endSetBasicProperties ( local  widget)
protected
static WidgetReader* getInstance ( )
static
var getInstance ( )
static
local getInstance ( )
static
std::string getResourcePath ( const rapidjson::Value &  dict,
const std::string &  key,
cocos2d::ui::Widget::TextureResType  texType 
)
protected
var getResourcePath ( var  dict,
var  key,
var  texType 
)
protected
local getResourcePath ( local  dict,
local  key,
local  texType 
)
protected
std::string getResourcePath ( CocoLoader *  cocoLoader,
stExpCocoNode *  pCocoNode,
cocos2d::ui::Widget::TextureResType  texType 
)
protected
var getResourcePath ( var  cocoLoader,
var  pCocoNode,
var  texType 
)
protected
local getResourcePath ( local  cocoLoader,
local  pCocoNode,
local  texType 
)
protected
std::string getResourcePath ( const std::string &  path,
cocos2d::ui::Widget::TextureResType  texType 
)
protected
var getResourcePath ( var  path,
var  texType 
)
protected
local getResourcePath ( local  path,
local  texType 
)
protected
static void purge ( )
static
var purge ( )
static
local purge ( )
static
void setAnchorPointForWidget ( cocos2d::ui::Widget *  widget,
const rapidjson::Value &  options 
)
protected
var setAnchorPointForWidget ( var  widget,
var  options 
)
protected
local setAnchorPointForWidget ( local  widget,
local  options 
)
protected
virtual void
setColorPropsFromJsonDictionary
( cocos2d::ui::Widget *  widget,
const rapidjson::Value &  options 
)
virtual
var setColorPropsFromJsonDictionary ( var  widget,
var  options 
)
virtual
local
setColorPropsFromJsonDictionary
( local  widget,
local  options 
)
virtual
void
setLayoutComponentPropsWithFlatBuffers
( cocos2d::Node *  node,
const flatbuffers::Table *  widgetOptions 
)
var
setLayoutComponentPropsWithFlatBuffers
( var  node,
var  widgetOptions 
)
local
setLayoutComponentPropsWithFlatBuffers
( local  node,
local  widgetOptions 
)
var setPropsFromBinary ( var  widget,
var  cocoLoader,
var  pCocoNode 
)
virtual
local setPropsFromBinary ( local  widget,
local  cocoLoader,
local  pCocoNode 
)
virtual
virtual void
setPropsFromJsonDictionary
( cocos2d::ui::Widget *  widget,
const rapidjson::Value &  options 
)
virtual
var setPropsFromJsonDictionary ( var  widget,
var  options 
)
virtual
local setPropsFromJsonDictionary ( local  widget,
local  options 
)
virtual
void setPropsWithFlatBuffers ( cocos2d::Node *  node,
const flatbuffers::Table *  widgetOptions 
)
virtual

Implements NodeReaderProtocol.

var setPropsWithFlatBuffers ( var  node,
var  widgetOptions 
)
virtual

Implements NodeReaderProtocol.

local setPropsWithFlatBuffers ( local  node,
local  widgetOptions 
)
virtual

Implements NodeReaderProtocol.

Member Data Documentation

cocos2d::Color3B _color
protected
var _color
protected
local _color
protected
float _height
protected
var _height
protected
local _height
protected
bool _isAdaptScreen
protected
var _isAdaptScreen
protected
local _isAdaptScreen
protected
int _opacity
protected
var _opacity
protected
local _opacity
protected
cocos2d::Vec2 _originalAnchorPoint
protected
var _originalAnchorPoint
protected
local _originalAnchorPoint
protected
cocos2d::Vec2 _position
protected
var _position
protected
local _position
protected
float _positionPercentX
protected
var _positionPercentX
protected
local _positionPercentX
protected
float _positionPercentY
protected
var _positionPercentY
protected
local _positionPercentY
protected
float _sizePercentX
protected
var _sizePercentX
protected
local _sizePercentX
protected
float _sizePercentY
protected
var _sizePercentY
protected
local _sizePercentY
protected
float _width
protected
var _width
protected
local _width
protected
std::function<bool(const
std::string&)> valueToBool
protected
var valueToBool
protected
local valueToBool
protected
std::function<float(const
std::string&)> valueToFloat
protected
var valueToFloat
protected
local valueToFloat
protected
std::function<int(const
std::string&)> valueToInt
protected
var valueToInt
protected
local valueToInt
protected

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