void ComboBox::ShowList() { if (!list) { list = new(__FILE__,__LINE__) ComboList(this, screen, rect.x, rect.y, rect.w, rect.h, items.size()); } if (list) { list->SetTextAlign(text_align); list->SetFont(font); list->SetText(text); list->SetSelection(seln); list->SetItems(items); list->Show(); list_showing = true; EventDispatch* dispatch = EventDispatch::GetInstance(); if (dispatch) { dispatch->MouseEnter(list); dispatch->SetFocus(list); } REGISTER_CLIENT(EID_CLICK, list, ComboBox, OnListSelect); REGISTER_CLIENT(EID_MOUSE_EXIT, list, ComboBox, OnListExit); } }
void ActiveWindow::SetFocus() { EventDispatch* dispatch = EventDispatch::GetInstance(); if (dispatch) dispatch->SetFocus(this); focus = true; ClientEvent(EID_SET_FOCUS); }