示例#1
0
void DockWindow::Float(DockableCtrl &dc, Point p)
{
	if (dc.GetParent() && p.IsNullInstance())
		p = GetScreenRect().TopLeft();
	else
		Register(dc);
	FloatContainer(*GetReleasedContainer(dc), p);
}
示例#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);
}