| 311 | } |
| 312 | |
| 313 | void SkinDataUtility::fillRegionEnable(DataPtr _skinData, const RectVisible& _value) |
| 314 | { |
| 315 | const VectorString& names = getRegionNames(); |
| 316 | |
| 317 | for (Data::VectorData::const_iterator child = _skinData->getChilds().begin(); |
| 318 | child != _skinData->getChilds().end(); |
| 319 | child++) |
| 320 | { |
| 321 | if ((*child)->getType()->getName() != "Region") |
| 322 | continue; |
| 323 | |
| 324 | const std::string& name = (*child)->getPropertyValue("Name"); |
| 325 | |
| 326 | if (name == names[RegionLeftTop]) |
| 327 | (*child)->setPropertyValue("Enable", _value.left && _value.top); |
| 328 | else if (name == names[RegionTop]) |
| 329 | (*child)->setPropertyValue("Enable", _value.top); |
| 330 | else if (name == names[RegionRightTop]) |
| 331 | (*child)->setPropertyValue("Enable", _value.right && _value.top); |
| 332 | else if (name == names[RegionLeft]) |
| 333 | (*child)->setPropertyValue("Enable", _value.left); |
| 334 | else if (name == names[RegionCenter]) |
| 335 | (*child)->setPropertyValue("Enable", true); // всегда доступен |
| 336 | else if (name == names[RegionRight]) |
| 337 | (*child)->setPropertyValue("Enable", _value.right); |
| 338 | else if (name == names[RegionLeftBottom]) |
| 339 | (*child)->setPropertyValue("Enable", _value.left && _value.bottom); |
| 340 | else if (name == names[RegionBottom]) |
| 341 | (*child)->setPropertyValue("Enable", _value.bottom); |
| 342 | else if (name == names[RegionRightBottom]) |
| 343 | (*child)->setPropertyValue("Enable", _value.right && _value.bottom); |
| 344 | } |
| 345 | } |
| 346 | |
| 347 | void SkinDataUtility::ShowRegions(DataPtr _skinData) |
| 348 | { |
nothing calls this directly
no test coverage detected