Merge pull request #40 from lovesnow/development
Add XML Class node to support XML attribute definition control attribute
This commit is contained in:
commit
452bc14706
@ -235,10 +235,15 @@ Box* WindowBuilder::Create(CreateControlCallback pCallback, Window* pManager, Bo
|
|||||||
strClassName = strValue;
|
strClassName = strValue;
|
||||||
}
|
}
|
||||||
else if( strName == _T("value") ) {
|
else if( strName == _T("value") ) {
|
||||||
strAttribute = strValue;
|
strAttribute.append(strValue);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
strAttribute.append(StringHelper::Printf(L" %s=\"%s\"",
|
||||||
|
strName.c_str(), strValue.c_str()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if( !strClassName.empty() ) {
|
if( !strClassName.empty() ) {
|
||||||
|
StringHelper::TrimLeft(strAttribute);
|
||||||
GlobalManager::AddClass(strClassName, strAttribute);
|
GlobalManager::AddClass(strClassName, strAttribute);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -277,11 +282,16 @@ Box* WindowBuilder::Create(CreateControlCallback pCallback, Window* pManager, Bo
|
|||||||
strClassName = strValue;
|
strClassName = strValue;
|
||||||
}
|
}
|
||||||
else if( strName == _T("value") ) {
|
else if( strName == _T("value") ) {
|
||||||
strAttribute = strValue;
|
strAttribute.append(strValue);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
strAttribute.append(StringHelper::Printf(L" %s=\"%s\"",
|
||||||
|
strName.c_str(), strValue.c_str()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if( !strClassName.empty() ) {
|
if( !strClassName.empty() ) {
|
||||||
ASSERT( GlobalManager::GetClassAttributes(strClassName).empty() ); //窗口中的Class不能与全局的重名
|
ASSERT( GlobalManager::GetClassAttributes(strClassName).empty() ); //窗口中的Class不能与全局的重名
|
||||||
|
StringHelper::TrimLeft(strAttribute);
|
||||||
pManager->AddClass(strClassName, strAttribute);
|
pManager->AddClass(strClassName, strAttribute);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user