Initial WIP of the Modern Editor Layout

This commit is contained in:
Areloch 2018-12-08 12:50:31 -06:00
parent d8dc07ee2d
commit 8605c3115d
63 changed files with 1082 additions and 0 deletions

View file

@ -613,3 +613,25 @@ void GuiSplitContainer::onMouseDragged( const GuiEvent &event )
solvePanelConstraints(newDragPos, firstPanel, secondPanel, clientRect);
}
}
void GuiSplitContainer::setSplitPoint(Point2I splitPoint)
{
GuiContainer *firstPanel = dynamic_cast<GuiContainer*>(at(0));
GuiContainer *secondPanel = dynamic_cast<GuiContainer*>(at(1));
// This function will constrain the panels to their minExtents and update the mSplitPoint
if (firstPanel && secondPanel)
{
RectI clientRect = getClientRect();
solvePanelConstraints(splitPoint, firstPanel, secondPanel, clientRect);
layoutControls(clientRect);
}
}
DefineEngineMethod(GuiSplitContainer, setSplitPoint, void, (Point2I splitPoint), ,
"Set the window's collapsing state.")
{
object->setSplitPoint(splitPoint);
}