void LLPanel::setFocus(BOOL b) { if( b ) { if (!gFocusMgr.childHasKeyboardFocus(this)) { //refresh(); if (!focusFirstItem()) { LLUICtrl::setFocus(TRUE); } onFocusReceived(); } } else { if( this == gFocusMgr.getKeyboardFocus() ) { gFocusMgr.setKeyboardFocus( NULL ); } else { //RN: why is this here? LLView::ctrl_list_t ctrls = getCtrlList(); for (LLView::ctrl_list_t::iterator ctrl_it = ctrls.begin(); ctrl_it != ctrls.end(); ++ctrl_it) { LLUICtrl* ctrl = *ctrl_it; ctrl->setFocus( FALSE ); } } } }
void LLPanel::setCtrlsEnabled( BOOL b ) { LLView::ctrl_list_t ctrls = getCtrlList(); for (LLView::ctrl_list_t::iterator ctrl_it = ctrls.begin(); ctrl_it != ctrls.end(); ++ctrl_it) { LLUICtrl* ctrl = *ctrl_it; ctrl->setEnabled( b ); } }
// virtual void LLPanel::clearCtrls() { LLView::ctrl_list_t ctrls = getCtrlList(); for (LLView::ctrl_list_t::iterator ctrl_it = ctrls.begin(); ctrl_it != ctrls.end(); ++ctrl_it) { LLUICtrl* ctrl = *ctrl_it; ctrl->setFocus( FALSE ); ctrl->setEnabled( FALSE ); ctrl->clear(); } }