| 2037 | //----------------------------------------------------------------------------- |
| 2038 | |
| 2039 | GuiControl* GuiControl::findFirstTabable() |
| 2040 | { |
| 2041 | // No tabbing if the control is disabled or hidden. |
| 2042 | if ( !mAwake || !mVisible ) |
| 2043 | return NULL; |
| 2044 | |
| 2045 | GuiControl *tabCtrl = NULL; |
| 2046 | iterator i; |
| 2047 | for (i = begin(); i != end(); i++) |
| 2048 | { |
| 2049 | GuiControl *ctrl = static_cast<GuiControl *>(*i); |
| 2050 | tabCtrl = ctrl->findFirstTabable(); |
| 2051 | if (tabCtrl) |
| 2052 | { |
| 2053 | mFirstResponder = tabCtrl; |
| 2054 | return tabCtrl; |
| 2055 | } |
| 2056 | } |
| 2057 | |
| 2058 | //nothing was found, therefore, see if this ctrl is tabable |
| 2059 | return ( mProfile != NULL ) ? ( ( mProfile->mTabable && mAwake && mVisible ) ? this : NULL ) : NULL; |
| 2060 | } |
| 2061 | |
| 2062 | //----------------------------------------------------------------------------- |
| 2063 |
no test coverage detected