Esempio n. 1
0
void DockWindow::FloatFromTab(DockCont &c, DockCont &tab)
{
	Rect r = c.GetScreenRect();
	tab.SetRect(r);
	tab.StateDocked(*this);
	c.RefreshLayout();
	tab.MoveBegin();
}
Esempio n. 2
0
void DockWindow::FloatContainer(DockCont &c, Point p)
{
	ASSERT(IsOpen());
	if (c.IsFloating()) return;
	if (p.IsNullInstance())
		p = GetScreenRect().CenterPoint();
	Detach(c);
	c.StateFloating(*this);
	Size best = CtrlBestSize(c, false);
	c.SetRect(Rect(p, best));
	c.Open(this);
}
Esempio n. 3
0
void DockWindow::FloatAnimate(DockCont &dc, Rect target)
{
	int max = dockpane[0].GetAnimMaxTicks();
	dc.IgnoreMinSize(true);
	Rect dr = dc.GetRect();
	target -= dr;
	target.top += 16; // Fudge for titlebar. Should get from OS?
	target.left /= max;
	target.right /= max;
	target.top /= max;
	target.bottom /= max;
	for (int i = 0; i < max; i++) {
		dr += target;
		dc.SetRect(dr);
		ProcessEvents();
		Sleep(dockpane[0].GetAnimInterval());
	}
	dc.IgnoreMinSize(false);
}