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); } }
int ActiveWindow::ReleaseCapture() { EventDispatch* dispatch = EventDispatch::GetInstance(); if (dispatch) return dispatch->ReleaseMouse(this); return 0; }
bool ActiveWindow::SetCapture() { EventDispatch* dispatch = EventDispatch::GetInstance(); if (dispatch) return dispatch->CaptureMouse(this) == 1; return false; }
ActiveWindow* ActiveWindow::GetCapture() { EventDispatch* dispatch = EventDispatch::GetInstance(); if (dispatch) return (ActiveWindow*) dispatch->GetCapture(); return 0; }
void ActiveWindow::KillFocus() { EventDispatch* dispatch = EventDispatch::GetInstance(); if (dispatch) dispatch->KillFocus(this); focus = false; ClientEvent(EID_KILL_FOCUS); }
void ActiveWindow::SetFocus() { EventDispatch* dispatch = EventDispatch::GetInstance(); if (dispatch) dispatch->SetFocus(this); focus = true; ClientEvent(EID_SET_FOCUS); }
bool TacRefDlg::ReleaseCaptureBeauty() { EventDispatch* dispatch = EventDispatch::GetInstance(); if (dispatch && beauty) return dispatch->ReleaseMouse(beauty) ? true : false; return 0; }
void ActiveWindow::Show() { EventDispatch* dispatch = EventDispatch::GetInstance(); if (dispatch) dispatch->Register(this); ListIter<View> v_iter = view_list; while (++v_iter) { View* view = v_iter.value(); view->OnShow(); } ListIter<ActiveWindow> c_iter = children; while (++c_iter) { ActiveWindow* child = c_iter.value(); child->Show(); } shown = true; }
void ActiveWindow::Hide() { EventDispatch* dispatch = EventDispatch::GetInstance(); if (dispatch) { dispatch->Unregister(this); focus = false; } ListIter<View> v_iter = view_list; while (++v_iter) { View* view = v_iter.value(); view->OnHide(); } ListIter<ActiveWindow> c_iter = children; while (++c_iter) { ActiveWindow* child = c_iter.value(); child->Hide(); } shown = false; }