| 388 | //----------------------------------------------------------------------------- |
| 389 | |
| 390 | void GuiControl::sleep() |
| 391 | { |
| 392 | #ifdef DEBUG_SPEW |
| 393 | Platform::outputDebugString( "[GuiControl] Putting to sleep %i:%s (%s:%s) awake=%s", |
| 394 | getId(), getClassName(), getName(), getInternalName(), |
| 395 | mAwake ? "true" : "false" ); |
| 396 | #endif |
| 397 | |
| 398 | if( !mAwake ) |
| 399 | return; |
| 400 | |
| 401 | iterator i; |
| 402 | for(i = begin(); i != end(); i++) |
| 403 | { |
| 404 | GuiControl *ctrl = static_cast<GuiControl *>(*i); |
| 405 | if( ctrl->isAwake() ) |
| 406 | ctrl->sleep(); |
| 407 | } |
| 408 | |
| 409 | if( mAwake ) |
| 410 | onSleep(); |
| 411 | } |
| 412 | |
| 413 | //============================================================================= |
| 414 | // Rendering. |
no test coverage detected