本文整理汇总了C++中XIBObject::AddOutputMember方法的典型用法代码示例。如果您正苦于以下问题:C++ XIBObject::AddOutputMember方法的具体用法?C++ XIBObject::AddOutputMember怎么用?C++ XIBObject::AddOutputMember使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类XIBObject
的用法示例。
在下文中一共展示了XIBObject::AddOutputMember方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: XIBObject
XIBObject *GetButtonContent(NIBWriter *writer, XIBObject *obj, char *mode)
{
XIBObject *buttonContent = new XIBObject();
buttonContent->_className = "UIButtonContent";
buttonContent->_outputClassName = "UIButtonContent";
buttonContent->_needsConversion = false;
char szName[255];
XIBObject *findObj;
sprintf(szName, "IBUI%sTitle", mode);
findObj = obj->FindMember(szName);
if ( findObj ) {
buttonContent->AddOutputMember(writer, "UITitle", findObj);
}
sprintf(szName, "IBUI%sImage", mode);
findObj = obj->FindMember(szName);
if ( findObj ) {
buttonContent->AddOutputMember(writer, "UIImage", findObj);
}
sprintf(szName, "IBUI%sBackgroundImage", mode);
findObj = obj->FindMember(szName);
if ( findObj ) {
buttonContent->AddOutputMember(writer, "UIBackgroundImage", findObj);
}
sprintf(szName, "IBUI%sTitleShadowColor", mode);
findObj = obj->FindMember(szName);
if ( findObj ) {
buttonContent->AddOutputMember(writer, "UIShadowColor", findObj);
}
sprintf(szName, "IBUI%sTitleColor", mode);
findObj = obj->FindMember(szName);
if ( findObj ) {
buttonContent->AddOutputMember(writer, "UITitleColor", findObj);
} else {
if ( strcmp(mode, "Normal") != 0 && buttonContent->_outputMembers.size() > 0 ) {
//findObj = obj->FindMember("IBUINormalTitleColor");
//buttonContent->AddOutputMember(writer, "UITitleColor", findObj);
} else if ( strcmp(mode, "Normal") == 0 ) {
UIColor *color = new UIColor(4, 4, 0.0f, 0.0f, 0.0f, 0.0f, "whiteColor");
buttonContent->AddOutputMember(writer, "UITitleColor", color->CreateObject(writer));
}
}
return buttonContent;
}
示例2: GetButtonContentStoryboard
static XIBObject* GetButtonContentStoryboard(NIBWriter* writer, XIBObject* obj, char* mode) {
XIBObject* buttonContent = new XIBObject();
buttonContent->_className = "UIButtonContent";
buttonContent->_outputClassName = "UIButtonContent";
buttonContent->_needsConversion = false;
obj = obj->FindMemberAndHandle(mode);
if (!obj) {
return buttonContent;
}
if (obj->getAttrib("image") != NULL) {
UICustomResource* image = new UICustomResource();
image->_imageName = obj->getAttrAndHandle("image");
buttonContent->AddOutputMember(writer, "UIImage", image);
}
if (obj->getAttrib("backgroundImage") != NULL) {
UICustomResource* image = new UICustomResource();
image->_imageName = obj->getAttrAndHandle("backgroundImage");
buttonContent->AddOutputMember(writer, "UIBackgroundImage", image);
}
if (obj->getAttrib("title") != NULL) {
buttonContent->AddOutputMember(writer, "UITitle", new XIBObjectString(obj->getAttrAndHandle("title")));
}
if (obj->FindMember("titleShadowColor") != NULL) {
buttonContent->AddOutputMember(writer, "UIShadowColor", obj->FindMemberAndHandle("titleShadowColor"));
}
if (obj->FindMember("titleColor") != NULL) {
buttonContent->AddOutputMember(writer, "UITitleColor", obj->FindMemberAndHandle("titleColor"));
} else if (strcmp(mode, "normal") == 0) {
UIColor* color = new UIColor(0, 4, 0.0f, 0.47f, 0.84f, 1.0f, NULL);
color->_isStory = true;
buttonContent->AddOutputMember(writer, "UITitleColor", color);
}
return buttonContent;
}