| 2052 | //----------------------------------------------------------------------------- |
| 2053 | |
| 2054 | GuiControl* GuiControl::findFirstTabable() |
| 2055 | { |
| 2056 | // No tabbing if the control is disabled or hidden. |
| 2057 | if ( !mAwake || !mVisible ) |
| 2058 | return NULL; |
| 2059 | |
| 2060 | GuiControl *tabCtrl = NULL; |
| 2061 | iterator i; |
| 2062 | for (i = begin(); i != end(); i++) |
| 2063 | { |
| 2064 | GuiControl *ctrl = static_cast<GuiControl *>(*i); |
| 2065 | tabCtrl = ctrl->findFirstTabable(); |
| 2066 | if (tabCtrl) |
| 2067 | { |
| 2068 | mFirstResponder = tabCtrl; |
| 2069 | return tabCtrl; |
| 2070 | } |
| 2071 | } |
| 2072 | |
| 2073 | //nothing was found, therefore, see if this ctrl is tabable |
| 2074 | return ( mProfile != NULL ) ? ( ( mProfile->mTabable && mAwake && mVisible ) ? this : NULL ) : NULL; |
| 2075 | } |
| 2076 | |
| 2077 | //----------------------------------------------------------------------------- |
| 2078 |
no test coverage detected