| 1755 | //----------------------------------------------------------------------------- |
| 1756 | |
| 1757 | void GuiControl::setVisible(bool value) |
| 1758 | { |
| 1759 | mVisible = value; |
| 1760 | |
| 1761 | setUpdate(); |
| 1762 | |
| 1763 | for( iterator i = begin(); i != end(); i++) |
| 1764 | { |
| 1765 | GuiControl *ctrl = static_cast<GuiControl *>(*i); |
| 1766 | ctrl->clearFirstResponder(); |
| 1767 | } |
| 1768 | |
| 1769 | GuiControl *parent = getParent(); |
| 1770 | if( parent ) |
| 1771 | { |
| 1772 | parent->childResized( this ); |
| 1773 | |
| 1774 | // If parent is visible and awake and this control has just |
| 1775 | // become visible but was sleeping, wake it up now. |
| 1776 | |
| 1777 | if( parent->isVisible() && parent->isAwake() |
| 1778 | && this->isVisible() && !this->isAwake() ) |
| 1779 | awaken(); |
| 1780 | } |
| 1781 | |
| 1782 | if( getNamespace() ) // May be called during construction. |
| 1783 | onVisible_callback( value ); |
| 1784 | } |
| 1785 | |
| 1786 | //----------------------------------------------------------------------------- |
| 1787 |
no test coverage detected