void DockWindow::StartFrameAnimate(int align, int targetsize) { FrameAnim &a = frameanim[align]; if (a.inc) dockframe[align].SetSize(a.target); a.target = max(targetsize, 0); a.inc = (targetsize - dockframe[align].GetSize()) / dockpane[0].GetAnimMaxTicks(); if (!a.inc) a.inc = (targetsize > dockframe[align].GetSize()) ? 1 : -1; KillSetTimeCallback(-dockpane[0].GetAnimInterval(), THISBACK(FrameAnimateTick), TIMEID_ANIMATE); }
void DockWindow::ContainerDragMove(DockCont &dc) { HighlightCtrl &hl = GetHighlightCtrl(); Point p = GetMousePos(); if (hl.GetParent()) { if (!hl.bounds.Contains(p)) StopHighlight(IsAnimatedHighlight()); return KillTimeCallback(TIMEID_ANIMATE_DELAY); } animdelay ? KillSetTimeCallback(animdelay, THISBACK1(StartHighlight, &dc), TIMEID_ANIMATE_DELAY) : StartHighlight(&dc); }
void AutoHideBar::HideAnimate(Ctrl *c) { ASSERT(ctrl); // If the popup has a child popup active then reset timer and keep the popup visible Vector<Ctrl *> wins = Ctrl::GetTopCtrls(); for(int i = 0; i < wins.GetCount(); i++) { if (wins[i]->IsPopUp() && wins[i]->GetOwner() == &popup) { KillSetTimeCallback(autohide_timeout, THISBACK1(HideAnimate, ctrl), TIMEID_HIDE_TIMEOUT); return; } } DockTabBar::KillCursor(); #ifdef PLATFORM_WIN32 Rect r = popup.GetRect(); AdjustSize(r, -r.GetSize()); Animate(popup, r, GUIEFFECT_SLIDE); #endif popup.Close(); ctrl->Remove(); ctrl = NULL; }
void AutoHideBar::MouseLeave() { if (ctrl && ctrl->IsOpen()) KillSetTimeCallback(1000, THISBACK(HideWindow), 2); TabInterface::MouseLeave(); }
void AutoHideBar::MouseLeave() { if (ctrl && ctrl->IsOpen()) KillSetTimeCallback(autohide_timeout, THISBACK1(HideAnimate, ctrl), TIMEID_HIDE_TIMEOUT); DockTabBar::MouseLeave(); }
void Ctrl::KillPostCallback(Callback cb, int id) { KillSetTimeCallback(0, cb, id); }