| 1740 | //----------------------------------------------------------------------------- |
| 1741 | |
| 1742 | void GuiControl::setVisible(bool value) |
| 1743 | { |
| 1744 | mVisible = value; |
| 1745 | |
| 1746 | setUpdate(); |
| 1747 | |
| 1748 | for( iterator i = begin(); i != end(); i++) |
| 1749 | { |
| 1750 | GuiControl *ctrl = static_cast<GuiControl *>(*i); |
| 1751 | ctrl->clearFirstResponder(); |
| 1752 | } |
| 1753 | |
| 1754 | GuiControl *parent = getParent(); |
| 1755 | if( parent ) |
| 1756 | { |
| 1757 | parent->childResized( this ); |
| 1758 | |
| 1759 | // If parent is visible and awake and this control has just |
| 1760 | // become visible but was sleeping, wake it up now. |
| 1761 | |
| 1762 | if( parent->isVisible() && parent->isAwake() |
| 1763 | && this->isVisible() && !this->isAwake() ) |
| 1764 | awaken(); |
| 1765 | } |
| 1766 | |
| 1767 | if( getNamespace() ) // May be called during construction. |
| 1768 | onVisible_callback( value ); |
| 1769 | } |
| 1770 | |
| 1771 | //----------------------------------------------------------------------------- |
| 1772 |
no test coverage detected