| 1103 | } |
| 1104 | |
| 1105 | void CAView::removeAllSubviews() |
| 1106 | { |
| 1107 | // not using detachSubview improves speed here |
| 1108 | if (!m_obSubviews.empty()) |
| 1109 | { |
| 1110 | if (m_pobBatchView) |
| 1111 | { |
| 1112 | CAVector<CAView*>::iterator itr; |
| 1113 | for (itr=m_obSubviews.begin(); itr!=m_obSubviews.end(); itr++) |
| 1114 | { |
| 1115 | m_pobBatchView->removeViewFromAtlas(*itr); |
| 1116 | } |
| 1117 | } |
| 1118 | |
| 1119 | CAVector<CAView*>::iterator itr; |
| 1120 | for (itr=m_obSubviews.begin(); itr!=m_obSubviews.end(); itr++) |
| 1121 | { |
| 1122 | if(m_bRunning) |
| 1123 | { |
| 1124 | (*itr)->onExitTransitionDidStart(); |
| 1125 | (*itr)->onExit(); |
| 1126 | } |
| 1127 | |
| 1128 | (*itr)->setSuperview(NULL); |
| 1129 | } |
| 1130 | |
| 1131 | m_obSubviews.clear(); |
| 1132 | } |
| 1133 | |
| 1134 | m_bHasChildren = false; |
| 1135 | } |
| 1136 | |
| 1137 | |
| 1138 | void CAView::detachSubview(CAView *subview) |
no test coverage detected