Example #1
0
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);
}
Example #2
0
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);
}
Example #3
0
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;
}
Example #4
0
void AutoHideBar::MouseLeave()
{
    if (ctrl && ctrl->IsOpen())
        KillSetTimeCallback(1000, THISBACK(HideWindow), 2);
    TabInterface::MouseLeave();
}
Example #5
0
void AutoHideBar::MouseLeave()
{
	if (ctrl && ctrl->IsOpen())
		KillSetTimeCallback(autohide_timeout, THISBACK1(HideAnimate, ctrl), TIMEID_HIDE_TIMEOUT);				
	DockTabBar::MouseLeave();
}
Example #6
0
void  Ctrl::KillPostCallback(Callback cb, int id)
{
	KillSetTimeCallback(0, cb, id);
}